Training Zone Banner

 Tutorial 33 – Importing Data

In Tutorial 18, we looked at how to export data from ShareScope for use in other applications.

In this tutorial, we look at the different ways of importing data into ShareScope. This may be useful if, for example, you have holdings which are not listed in the program (e.g. overseas instruments) but wish to add them to ShareScope portfolios.

Data can be added to ShareScope by adding it manually or by importing it from a file. We will look at each of these in turn:


 Adding a share manually

Share data can be added manually via the Add new data function in the Edit menu.

This displays the following dialog:

Here you can enter the name of the share and other fundamental information – Normal Market Size (NMS), Number of shares issued, Share type, Listing, Currency and Event type.

To begin entering price information for the share, click on the Share Price tab at the top of the dialog.

This displays a list of trading days with the corresponding price(s) on that date. By default, this shows only the closing price. However, you can also choose to add open, high, low and volume data by de-selecting the Display close only option at the bottom of the dialog.

As we have not yet entered any information, all dates are marked with the entry Missing. To enter a price next to a date, double click on the relevant Missing entry and type in that day’s price data using the keyboard.

To move to the next date in the list, press Enter or Tab. You can also use the Up and Down cursor keys to scroll up and down the list.

Note: prices should be entered in the minor currency unit (e.g. pence, cents).

On the right hand side of the dialog, you will notice four additional options:

Adjust: This option allows you to adjust all prices prior to and including a given date and is useful in the case of a share split or consolidation.
BR>To do this, simply select the first date, click on Adjust and enter the adjustment factor. Click OK once you have finished.
Interpolate: In instances where data is missing between two dates, the Interpolate function will estimate the Missing value based on an average of the price before and the price after that date – creating a smooth (as opposed to stepped) line on graphs.
Next anomaly: This allows you to identify suspected price anomalies in your data. Click on the Next anomaly button to set the level at which anomalies are detected (default setting = 5%) and press OK to skip to the next suspected anomaly.
Start date: By default, you can only edit the last month of data in this dialog. However, if you wish to enter older price date, simply enter a new date in the New start date box and press Set.

Once you are happy with your entries, click OK.

Your new data will now appear in the All list, the Imported data list and the list you selected in the Share type option. For example, if you selected Ord then the new item will appear in the Share list.

Imported shares can also be added to a portfolio in the same way as any other share.

By default, the new item will appear in a grey font to distinguish it from other items in the list. To change this to another colour, right-click and select List design.... In the dialog, open the Text tab and click on Imported items to access the various display options.

Note: ShareScope will not automatically update price information for imported data. You will need to do this yourself. See Editing and deleting Imported Data for more information.


 Importing from a file

An alternative to adding data manually within the program is to use the Import function. This is particularly useful if you have the price data contained within another program and simply want to transfer it into ShareScope.

In this section, we look at two key areas:

 Importing individual items

ShareScope allows you to import the following information using either Excel (.csv) or General (.exp) format:

  • Share name
  • Price / Date
  • NMS
  • Number of shares
  • Type
  • Listing
  • Currency
  • Event

You will notice that these are the options available within the Add New Data dialog we looked at in the last section.

To successfully import a file into ShareScope, it will need to follow a particular format. If the format is not recognised, the data cannot be imported.

We will shortly look at an example to illustrate this, but first we will look at the formatting “rules”:

Share name This can be entered on any row and is identified by ShareScope as any non blank line without a colon, date or field separator.

Price / Date Dates must be in order with the oldest date first and expressed in the format dd/mm/yy. Three-letter months are also supported e.g. 30-Mar-09, to allow data to be imported from a variety of sources, such as Yahoo.

The Price/Date field separator is a semi-colon. So, for example, a price of 190p on 30th March 2009 , should be expressed as 30/04/09;190

Prices are any number with a maximum of five digits with two decimal places, typically the format might be 107 or 23.25. Do not use a comma in larger numbers (i.e. “two thousand” should be expressed 2000 – not 2,000)

Importing OHLCV data:

If there are fewer than 4 columns shown to the right of the date, the first column will be read as the Close, and the other columns ignored.

If there are 4 columns to the right of the date, these will be read as Open, High, Low and Close (in that order).

If there are 5 or more columns to the right of the date, these will be read as Open, High, Low, Close and Volume (in that order). Any extra data will be ignored./P>

The following details can be entered after the share name and should be followed by a colon (:).

Italicised below are recognised formats:

NMS Enter any number to the nearest half.
Number of shares Enter any number.
Type Share type can be: ord, warrant, ADR, convertible, preference, zero preference, index, capital, income, gilt, rate, bond, ETF. Note: ShareScope determines the type from the first 3 letters, so you may abbreviate this entry if you wish.
Currency Any currency name or ISO currency code as listed in Tools : Options: Currencies, for example. Pounds, GBP, British pounds, Euro, EUR, US Dollars, USD.
Listing Select from: Full, AIM, Index, Other.
Event The events types you can add are making offer, rights or suspended.

Let’s illustrate with an example from Excel. The share below is titled “My Share”.

Here’s another example, this time illustrating how to use OHLCV data:

To import the file, click on the File menu in ShareScope and select Import and then Import a share.

Importing multiple files:

If you have a number of files you wish to import, you can use the File : Import : Import all shares in a folder option to quickly add all items in a single go. To do this, you will first need to create a new folder on your desktop and copy and paste in the required files.

This displays the Import Preview dialog:

Here you can specify the settings for your imported data and preview any changes you make.

To accommodate different date formats, ShareScope lets you specify the date and field separator format used in the source file. In our above example, we have used a dd/mm/yy format, so we need to ensure the option Day Month Year is selected along with a forward slash / as the Date Separator in the Date format section.

If ShareScope cannot match the data to the selected import options, it will be displayed in red in the preview area. The example above shows an error with the price/date format.

The Field separators options allow you to specify how the date and price are separated. In our example we used a semi-colon (31/03/09;198.2) to separate the date and price. To specify this as the separator, select Other and enter ; into the box to the right.

We can now see the price and date have been separated, with the price under a new column heading (Close). The text no longer displays in red - meaning that the selection is now valid.

There is also the option to use the file name for the share if the imported file does not include a name. If this is not selected and no share name is given then ShareScope will prompt for a name.

 Importing multiple items in the same file

You can also choose to import prices for multiple shares from within the same file using either Excel (.csv) or General (.exp) format.

In this case, entries in the input file should be a series of lines in the form:

Name, date, price(s), (volume).

Note: that you are limited to importing name, data and volume data only using this method. If you wish to import other information (e.g. share type, listing, NMS), you will need to import a file for each item. See the Importing from a file section above.

In the example below, we have used tabs (i.e. columns) as the field separator. However, you can also use commas, spaces, or any other character on the keyboard. Please note that if spaces are used, the name field must not contain spaces or ShareScope will not accept it.

Generally speaking, the same formatting “rules” apply as before.

To reiterate:

  • Prices are any number with a maximum of five digits with two decimal places, typically the format might be 107 or 23.25.
  • You should not use a comma when expressing larger numbers (i.e. “two thousand” should be expressed 2000 – not 2,000)
  • If there are fewer than 4 entries to the right of the date, the first entry will be read as the Close, and the others ignored.

    i.e. Name, date, close, (anything after this point ignored).
  • If there are 4 entries to the right of the date, these will be read as Open, High, Low and Close (in that order)

    i.e. Name, date, open, high, low, close.
  • If there are 5 or more entries to the right of the date, these will be read as Open, High, Low, Close and Volume (in that order). Any extra data will be ignored.

    i.e. Name, date, open, high, low, close and volume.

Again, most common date formats are recognised. Three-letter months are also supported e.g. 26-Jul-06, to allow data to be imported from a variety of sources.

To illustrate, here’s another example using OHLCV data:

To import the file, click on the File menu in ShareScope and select Import and then Import all shares in a file.

This will display the Import Preview dialog which we discussed earlier. Click here to revisit this section

 Editing and deleting imported data

You can easily update and edit price information for imported stocks from within ShareScope. This means that you won’t have to re-import files every time you want to update price information.

Note: Remember ShareScope will not automatically update price information for imported data. You will need to do this yourself.

To edit imported data, simply right-click on the share in a list screen and select Edit Imported data from the context menu.

This will display the Input or amend imported share data dialog which we looked at the Adding a share manually section. Here you can update the price of the share and make any other changes you require.

To delete imported data from ShareScope, select the item you want to delete and select Delete imported data from the Edit menu. Alternatively, click on Delete all imported data if you wish to delete ALL imported data from ShareScope.

 Import share list

You can also use ShareScope’s import functionality to quickly and easily add a list of shares to a portfolio. This might be particularly useful if, for example, you’re adding a large number of items to a stock watchlist based on a list you may have seen online or read in an investment publication.

Note: don’t forget you can also add multiple shares to a portfolio by using the Shift and Ctrl keys in conjunction with the mouse (just as you would in other Windows applications). Simply select all the items you wish to add, right click and select Add [n] selected shares to [portfolio name].

When using the Import share list function, the input file should be in plain text format, e.g. a txt file.

As you are using data which already exists within the program, you only need to enter the share’s EPIC code or ShareScope ID. You can also choose to add the exchange code - although this is optional for UK stocks (however you will need to enter this for non-UK stocks)

To illustrate, let’s look at the different ways you can enter Vodafone to the input file:

VOD
vod
EPIC code. Either upper or lower case may be used.
 
1906
1,906
ShareScope ID. A comma is optional.
 
LSE:VOD The exchange code is optional. VOD on its own would cause the same share to be added.

Note: if an EPIC is numeric, it must be preceded by the exchange code (otherwise the EPIC will be interpreted as a ShareScope ID). For example, the stock 888 will need to be expressed as LSE:888.

Note: to find a share’s ShareScope ID, add this column to a list screen using Add General Column : ShareScope ID.

When entering multiple items, each share should be listed on a separate line, as the image below illustrates:

Where there is more than one type of share listed for a company, the ordinary share is added.

To import the file, open ShareScope and select File. From the drop-down menu, select Import and click Import share list.

From the Add Share List dialog, locate the file you wish to import and select Open. Now select the portfolio to which the shares should be added and press OK.

To create a new portfolio containing these shares, click the New Portfolio button.

Remember, if you have any trouble finding or using any of these features, please don’t hesitate to call our Customer Support team. They will be delighted to help.

From outside London: 0845 045 0111
From London: 020 7749 8504
Email: support@sharescope.co.uk