Investment Studio > Getting started > Taking control

Creating a portfolio

Looking at existing portfolios is all fine and well, but it goes without saying that it's the creation of your own portfolios that makes things really interesting.

>>> If it goes without saying, why did you just say it? <<<

I'll pretend that I didn't hear that.

There are basically two ways to create a new portfolio: you can copy the selected portfolio or you can copy the current portfolio template (more on that below). Either way, you use the Grid object in the Portfolios view.

To copy the selected portfolio, click the Copy button in the Grid's toolbar, or right-click the Grid to open its pop-up menu, then use Portfolios > Copy. The copy will be inserted in the Grid next to the original portfolio. You can select the new portfolio and check the contents of the Assets, Quotes, Transactions and System views to convince yourself that all properties of the original are inherited.

To copy the current portfolio template...

>>> ...you still haven't explained what this "template" thing is... <<<

Right. The portfolio template (there is only one) is a partial copy of a portfolio. It has blank basic properties (name, symbol, currency) and doesn't include assets and transactions, but other than that it's just as if you hade used the Copy button and then hidden the copy somewhere (I say "hidden" because it's not displayed in the Grid or anywhere else in Investment Studio's user interface).

You can replace the current template with a new template, based on the selected portfolio, by clicking the Make template button in the Grid's toolbar or by using the equivalent entry (Portfolios > Make template) in the Grid's pop-up menu.

>>> And how do I use this portfolio template? <<<

Click the New button in the Grid's toolbar, or select Portfolios > New in the Grid's pop-up menu. A copy of the template will be inserted in the Grid after the selected portfolio (or after existing portfolios if none is selected).

>>> Thus leaving me with a copy of a copy... Is there any real advantage to using such a deferred copy instead of a straight one? <<<

It depends on what you're trying to achieve. Do you want the new portfolio to inherit assets and transactions or not? For instance, if you're doing incremental development of a trading system, trying variations on your system rules and comparing the results, it obviously makes most sense to use a straight copy. On the other hand, if you are starting a new portfolio from scratch, using the template probably makes more sense.

>>> So which method should I use now? <<<

Either one is fine, but I suggest that you use the template.

>>> OK, I've created a new portfolio. Now what? <<<

First of all, you should make sure that the new portfolio is clearly labeled and distinguishable from the original, so you don't risk modifying the wrong portfolio by mistake.

>>> Walk me through it, will you? <<<

Like all Grids, the Grid in the Portfolios view is customizable, so the details may vary. It's strongly recommended that every portfolio's name, symbol and currency be displayed in an editable cell. I'll assume that your setup follows this recommendation. Entering all three properties is then simply a matter of selecting the appropriate cell and typing away. The currency cell's in-place editor (opened when you start typing into the cell) should also contain a button which you can use to open a currency selection dialog. See the notes on entering strings (name, symbol) and currency codes in Grids. Also read the notes on portfolio names, symbols and currencies.

A possible complication is that some of the cells which you need to edit may be so-called fixed-field cells:

When the Fixed fields button is depressed in the Grid's toolbar (or, equivalently, when Customize > Fixed fields is checked in the Grid's pop-up menu), fixed-field cells are uneditable and non-scrolling. Click the Fixed fields button (or the equivalent pop-up menu item) to make such cells behave like ordinary ones.

A tip before we move on: when you modify portfolio properties, all objects in the Portfolios view (Charts, Graphs, the Grid itself) are recomputed. The time required is roughly proportional to the number of days in the view's date range. If your objects have been set up to perform heavy number crunching, it can therefore make sense to reduce the date range before you start editing portfolio properties.

Adding assets

At this point, the Grid in the Portfolios view should contain a new portfolio with its own name and symbol. You should also have entered the portfolio's currency.

>>> Done. <<<

Select the portfolio, switch to the Assets view and look in its Grid. If the portfolio was created from a template, there should be no assets in it. If the portfolio is a copy of another portfolio, it should contain the same assets as the original portfolio.

>>> When you say "the same assets", do you mean literally the same? If I edit an asset in the new portfolio, will that asset change in the original portfolio too? <<<

No. Portfolios never share assets in that sense. The assets in the new portfolio are copies of the assets in the original portfolio. They are (initially) identical copies, but nevertheless copies. Note however that price quotes can be (and often are) shared, so editing quotes for an asset can potentially have repercussions for other assets, too.

>>> I'll keep that in mind. Shall we add some assets now? <<<

By all means. I suggest that you delete any assets already in the portfolio and then add at least one asset with constant price and one with variable price. You should have no problem doing this after reading the section on managing assets (no pun intended).

Make sure that each asset in the portfolio has a unique name and symbol, and that its currency has been declared. Please read the notes on asset names, symbols and currencies. The previous remarks about editing Grid cells in the Portfolios view apply here, too.

Depending on your setup, there may also be additional information to enter, like each asset's class (stocks, bonds, cash or other) and color (for use in Charts and Graphs).

>>> Done. <<<

If the Grid is set up to display asset NAVs (recommended) it should now be reporting that all asset NAVs equal 0. If you switch back to the Portfolios view, and if its Grid is set up to display portfolio NAVs (also recommended) it should now report that the new portfolio's NAV equals 0, too.

>>> How can it tell? I never entered the number of asset units held! <<<

You're not expected to. That number is computed from each asset's transaction history, i.e. by keeping track of how many units you've bought and sold over time.

>>> Do I sense a smooth transition to the Transactions view here? <<<

Absolutely.

Recording transactions

With your new portfolio still selected in the Portfolios Grid, switch to the Transactions view.

>>> Clicking the Transactions tab... here it comes... looks boring. No charts in this view? <<<

None needed. The Transactions view is basically a ledger, a bookkeping tool. Please read the overview of the Transactions view, then return here.

>>> I'm back, and I have a question. For each asset in my new portfolio, there seems to be a "null transaction" involving no money and 0 units of the asset, datestamped today. Where did those transactions come from? <<<

They were created automatically when you added your new assets to the portfolio. Their primary purpose is to provide at least one transaction date for each asset until you start booking real transactions.

>>> What for? <<<

There are many operations which require the first and/or the last transaction date for each asset to be known (computation of the latest portfolio NAV, for instance). If new assets didn't come with default transactions, they would cause such operations to fail.

>>> So I shouldn't delete those null transactions? <<<

Not until you have something to replace them with. Sometimes you just need to edit them a bit. Consider the case of a watchlist portfolio, basically a collection of interesting stocks (or other assets) which you want to follow but not trade (yet). Presumably, you want to see as much as possible of each asset's price history, and you want to be able to compare the relative performance of all assets in the watchlist over their common history. To achieve this, you "buy" one unit of each asset on the date of the asset's first price quote.

>>> So you're saying that for each transaction, I should enter 1 for the number of units traded, the date of the first price quote as the transaction date and the quoted price as the principal? Where do I get date and price? In the Quotes view? <<<

You got the idea, but there's no need to enter anything manually. Just select each null transaction and click the First quote button in the view's toolbar.

>>> That seemed to do the trick for the variable price assets, but not for the constant price ones. <<<

Constant price assets have no quote history, so the whole concept of "first quote" makes no sense for them. This isn't really an issue, since constant price assets don't belong in a watchlist anyway. A more plausible situation is a constant price asset used to describe a bank account (or similar cash instrument) initially holding all capital in the portfolio. In such cases, you should make sure that the first transaction in the asset (used to establish the initial cash position) precedes any actual trading in the portfolio.

>>> You know, we haven't actually entered any new transactions yet... <<<

By all means, go ahead and enter a few transactions from scratch. You should have no problem doing so after reading the section on editing transactions. When you're done, go back to the Assets and Portfolios views and verify that the asset unit counts, asset NAVs and portfolio NAV reflect the transaction history.

Manually entered transactions can be used to keep track of your trading in a real portfolio. Without going into details at this point, you should also be aware of the possibility of system-generated transactions. When a portfolio includes a trading system, the Grid in the Transactions view should expose the "soft transaction" flag. All transactions generated by a trading system are marked as soft, and all existing soft transactions in the system's date range are deleted when the system is executed again.

Adding downloads

>>> Something's bothering me. Back in the Assets view, when I added variable price assets to the portfolio, I had to pick them from a list of available quote download items. What if there is no download item for the asset which I want to add? <<<

In that case, you need to create the missing download item first. Let's go back to the Downloads view.

>>> Clicking the Downloads tab... we're there. <<<

New download items can be added to an existing download list, but we might as well create a new list while we're at it. Right-click the download list box to the left to open its pop-up menu. In the pop-up menu, click New. An empty list will be created. Select the new list entry, wait a moment, then click it to open its in-place editor. Enter a name for your new list and press Enter to close the in-place editor.

>>> Done. <<<

Now that we have a sandbox to play in, we need to decide how to create our new download item. We could start from scratch and create a blank download item...

>>> How? <<<

Right-click the download item box to the right, then click New in its pop-up menu. But that's the hardest way, since you'll have to enter all the new item's properties manually. A better way is to make a copy of an existing download item and then modify it. The more similar the two, the better, of course.

>>> Example, please! <<<

Let's say that you want to create a download item for Dell (NASD:DELL) quotes. You can find Dell quotes in many places, but you happen to already have a bunch of download items set up to grab various US stock quotes from Yahoo. So you fire up your web browser (or use the Browser object in the Downloads view), pay a visit to Yahoo Finance and verify that the ticker symbol is indeed DELL.

Next, in the Downloads view, you select one of your existing Yahoo download items, right-click to open its pop-up menu, select Copy to... and click the name of your new download list.

>>> Thus creating a copy of the download item in my new list. I suppose we'll be editing that copy next? <<<

Exactly. So you select your new list, select the new download item, right-click it and click Properties in the pop-up menu. You may have to wait a few moments for the downloader to start, if it wasn't already running - the item properties dialog is managed by the downloader.

>>> I'm looking at it now. Seems a bit complicated... <<<

It may look a bit intimidating at first, but it's really pretty straightforward. The documentation is here. Check it out before continuing.

>>> All right, I'm with you again. What am I supposed to do in this dialog? <<<

The first, most important step after creating a copy of an existing download item is to change the data path in the Item box, at the top of the dialog. This is the path to the target file (in our case, the quote file) maintained by the download item. Until you change it, you risk corrupting the original download item's target file. So start by entering the path to the new quote file (the file need not exist yet, but the path must valid). Next (still in the Item box) change the item's name, symbol and (if necessary) its currency.

>>> Well, that wasn't so hard. Anything else? <<<

Yes, you still haven't touched the actual download instructions. I'll assume that the download item uses a script to generate the download URL, and that it gets the ticker symbol from one of the Arguments (below the Item box). You need to locate the old ticker symbol and replace it with Dell's (DELL).

>>> Done. <<<

That should be it. Since the original download item was already set up to parse data on Yahoo's format, there should be no need to change anything else. Click OK to commit to the changes and close the dialog.

>>> OK, I'm back in the Downloads view. Is the download item ready to use now? <<<

Almost. We still haven't downloaded any quotes, so let's run a test update. Right-click the new download item to open its pop-up menu, then click Update. Watch the event list in the downloader window as you do this. When the downloader says it's done, open the download item's Properties dialog again and look at the bottom of the Item box, where the contents of the target file should be displayed. If quotes were successfully downloaded and parsed, they should be visible there.

Also look for any remarks left by the downloader in the Downloads view's item box.

Assuming that all went well, your new download item is now ready. Before you start using it, you may want to consider moving it (i.e. copying it and deleting the original) to the same list as the other Yahoo quote download items. But as far as Investment Studio is concerned, it's ready. If you now go back to the Assets view and add a new variable price asset to the selected portfolio, your new download item will be in the list of available quote sources.

Adding Charts, Graphs and Browsers

So far, we've left the layout of all views alone. The Assets and Quotes views in our new portfolio probably contain some Charts, Graphs or Browsers, but only because they were inherited from the portfolio template. Now it's time to start adding our own objects.

>>>Fine with me, but first we need to make some room. Those views are packed tight. <<<

They should be - no point to wasting precious screen space. Basically, you have two options: either reduce the size of some existing tile(s) or delete them altogether (no, overlapping tiles are not a good idea). All tiled objects can be resized (just drag their borders, as with ordinary windows). Only Charts, Graphs and Browsers can be deleted (right-click them, then click Delete in their pop-up menu).

Notes objects can not be deleted, but they can be hidden (click the Notes button in the view's toolbar) as can the quote editor in the Quotes view (click the Edit quotes button in the view's toolbar).

>>> What about Grids? <<<

Grids are sacred. You can neither delete nor create them.

>>> OK, I've freed up some screen space now. How do I add a Chart, or a Graph, or a Browser? <<<

The easiest way, at least with Charts and Graphs, is to pick them from the Gallery.

Click the Gallery button in the view's toolbar to open the Gallery dialog; use the tabs at the top of the dialog to select the Gallery section containing the kind of object which you want to create (Charts, Graphs or Browsers); select the object in the list to the left; click Make. A copy of the object will be added to the view. Move and resize it to fit in with the other objects.

>>> That was almost too easy... <<<

It is pretty easy. The Gallery dialog knows which view it was invoked from, and will only display gallery sections containing objects supported by that view. So there is no risk of inadvertantly adding a Chart to the Web view, for instance (the Web view only supports Browsers). But you still need to have some understanding of what you're doing: Charts and Graphs depend on data sources, usually portfolio or asset quotes, and adding a portfolio-oriented object to the Assets or Quotes view, or an asset-oriented object to the Portfolios view, is likely to yield confusing results.

>>> So how can I tell if I'm looking at a portfolio-oriented object? <<<

It's recommended that portfolio-oriented objects be explicitly identified as such by their names in the Gallery dialog's list. If you see a Chart called "NAV", plain and simple, you should expect it to be an asset-oriented Chart. "Portfolio NAV" would tell you to expect a portfolio-oriented Chart. Same goes for Graphs, of course. Keep this in mind when you start creating your own Gallery entries (see below).

Ultimately, it's always possible to add a Chart or Graph to the view and then inspect (and edit) its source definitions.

>>> How? <<<

Click Data > Sources in the object's pop-up menu. But let's not get into that now.

Rather, let me show you an alternative to the Gallery dialog. Remember the portfolio template? There is a similar mechanism for Charts, Graphs and Browsers, too. If you click Gallery > Make default in the pop-up menu of a Chart, a copy of that Chart is saved to disk and can then be duplicated simply by clicking the New chart button in any view's toolbar, in any portfolio. This allows Charts to be copied quickly, without having to pass through the Gallery dialog.

>>> What do you mean by "pass through the Gallery dialog"? <<<

If you had clicked Gallery > Add in the Chart's pop-up menu, a copy of the Chart would have been added to the Gallery dialog (try it!). That's the appropriate method if you like your Chart so much that you want to make a permanent Gallery entry of it. But if all you want to do is copy it to another location, you should use Gallery > Make default.

>>> And what does Gallery > Clear Default in the Chart's pop-up menu do? <<<

That shouldn't be too hard to guess: it creates a default Chart with blank properties, so you'll get a "clean" object (no captions, no data sources, default colors) the next time you click New chart. Might be of interest when you start developing your own objects from scratch.

All of the above also applies to Graphs (New graph button ) and Browsers (New browser button ), of course.

>>> Come to think of it, you haven't said much about Browsers yet. Anything about those in particular that I should keep in mind? <<<

Don't point them to online sources unless you want your computer to go online whenever they are updated. If you have a fixed connection (cable modem, DSL or similar) that's not a problem (in fact, it's a feature). If you are still using a phone modem, consider using the downloader to retrieve online documents (news stories, charts etc.) to files on your hard drive and pointing your Browser objects to those files instead.

Also, Browsers tend to be more context-specific than Charts and Graphs, so you will probably not be using the Gallery's Browsers section a whole lot.

On to Part III...