Research Guides
FindIt:

Datastream DS Windows

Questions? Email Lippincott Library

Datastream International is a comprehensive source of machine-readable international economic and financial data. A partial list of its files includes: stock and bond prices, financial accounts, exchange rates, stock market indices, and economic time series.

Time series data can be retrieved in spreadsheet format or in a text file. It is also possible to create graphs and to run special programs.

EXAMPLES OF PROGRAMS:

  SINGLE ITEM TIME SERIES   900B
  TIME SERIES   301V
  COMPARISON BETWEEN TWO DATES   301D
  3-MONTH MOVING AVERAGE DATA   301B
  COMPANY ACCOUNTS   190A
  LINE GRAPHS   401A
  MULTIPLE LINEAR REGRESSION   301R
  SIMPLE REGRESSION AND CORRELATION   301S

For more information, please consult the USER GUIDES and SUMMARY OF PROGRAMS (available from the Lippincott Reference Desk).

1. EXPORTING DATA TO A SPREADSHEET

There are two ways to export data to a spreadsheet:

  1. Through a Macro which allows up to several items to be retrieved in separate columns in the same spreadsheet.
  2. As a single file.

Your data may be IMPORTED into a spreadsheet with a .prn or a .csv extension.
You may OPEN a file in Excel with a .csv extension.

NOTE: This program is CASE-SENSITIVE.
You must use UPPER-CASE letters. It is easiest to use the the CAPS LOCK.
You can clear the screen at any time by clicking on the CLEAR box.


A.) MACRO

NOTE: Do not use more than 4 VARIABLES per macro!

Before you begin the macro, find the codes for data items in the Datastream manual, or online by clicking on Code (See Item 3 below, ONLINE CODE LOOKUP).

  1. Click on Macro.
  2. Click on Run Macro.
  3. Scroll down in the Files box to download.mac and click on it. Click on OK.
  4. Insert disk into drive A. Click on OK.
  5. Enter a file name. Do not include an extension (Datastream will automatically provide a .csv extension). Click on OK.
  6. Enter codes, separated by commas. Click on OK.
  7. Type in start date, i.e.: 01-22-85 (MM-DD-YY). Click on OK.
  8. Type in end date. Click on OK or press Enter for most recent.
  9. Select frequency (D,W,M,Q or Y). Click on OK.
  10. Data will be retrieved, one item at a time. This may take a few moments. Please wait.
  11. Remove your disk or begin another macro.

B.) SINGLE ITEM TIME SERIES (Program 900B)

  1. Click on Downloading Data.
  2. In the Type of Data box, click on Any.
  3. From the Program Available box, select A single series over a period of time. "900B" will appear in the Program number box at the top of the screen:
  4. Press Enter. "DATASTREAM: 900B" will appear at the top of the screen.
  5. Insert disk into drive A.
  6. Click on File.
  7. Click on Convert Data Channel/Fundline.
  8. CSV File will be highlighted. Click on OK.
  9. Overtype the asterisk with the file name of your choice. The default extension is .csv, but you may change it to a .prn extension. Click on OK.
  10. At the EXPRESSION prompt, type in the Datastream code (if known) or locate it through the online Code lookup (see Item 3, ONLINE CODE LOOKUP) and click on it to accept and automatically transfer to the prompt line. If you have typed in the code manually, press Enter to continue.
  11. Type in start date. (MM-DD-YY). Press Enter.
  12. Type in end date and press Enter, or just press Enter for most current.
  13. Enter frequency (D,W,M,Q, or Y). Press Enter.
  14. Output is displayed on the screen. Keep pressing Enter to move to the next screen or use Autopage by clicking on the icon at the top of the screen. Be sure to display the last screen.
  15. Click on File.
  16. When you click on End Data Channel/Fundline data will begin writing to your disk.
  17. Remove disk or begin a new series by pressing Clear.

2. DOWNLOADING TEXT FILE TIME SERIES (Program 301V)

(Maximum of 104 Values.)

  1. Click on Reports.
  2. In the Type of Data box, click on Any.
  3. In the Programs available box, select Up to 104 values for any Series. Click on it.
  4. 301V will appear in Program Number box. Press Enter.
  5. Put your disk in drive A or B.
  6. Click on File.
  7. Click on Capture to Plain Text.
  8. Overtype asterisk with the file name of your choice. Datastream will automatically provide a .txt extension. Click on OK.
  9. At the EXPRESSION prompt, type in the Datastream code (if known). Or you can highlight your code from the online Code lookup (See Item 3, ONLINE CODE LOOKUP), and double click on it or press Enter. The Code will then appear at the EXPRESSION prompt.
  10. Click on or tab to DISPLAY FREQUENCY. Select frequency (M,D,Q, or Y).
  11. Type in start date.
  12. Type in end date or press Enter for most recent.
  13. Click on Autopage icon if there is more than one page, or press Enter to go to the next page. Display all pages of data.
  14. Click on File. Click on Stop Capture to save file.
  15. Remove disk or begin a new series.

3. ONLINE CODE LOOKUP

  1. Click on Code.
  2. Using the pull-down menu in the Code Dialog box, select data type from Code Categories and click on it, i.e.: Bonds, Equities, Interest Rates, etc.
  3. Click on it.
  4. At the Find prompt, type in the name of the item you want.
  5. If you have used the ONLINE CODE LOOKUP while at the EXPRESSION prompt, double-click on the correct item name to transfer it to the EXPRESSION prompt for your time series. The Datastream code is listed in the Mnemonics column. For Futures and Options the code is listed in the Class column.

4. CODE LOOKUP: SEARCH FUNCTION

In addition to looking up codes by specific data item names, item codes may also be retrieved when only part of a name is known or when data items are needed with certain criteria such as a specific country, currency, or base-date. Different criteria will apply to different data. This is done through the Edit function in Code.

  1. Click on Code.
  2. Choose data type from Code Categories, i.e.: Equities or Bonds.
  3. Click on data type you've chosen, then on OK.
  4. Click on Edit.
  5. Click on Search.
  6. Click on desired extract criteria, i.e.: Name, Base-Date, Currency or Mnemonic.
  7. Type in request. There are several ways to do this:
    1. Locate equities or other data by country by entering a particular currency code in the Currency box. Currency codes may be found in Search Criteria by clicking on the Currency box. At the bottom of the screen, click on the Currency... box which is now visible. Use the Find box to type in a country and then double-click to automatically transfer the correct code to the Currency... box.
    2. For a particular base-date, type in a date, i.e.: 01-01-87. For all items within a particular year, type *-year (i.e. *-84 for all equities with data available from 1984).
    3. It is also possible to combine Extract Criteria such as currency and base-date. You might want to do this if you were looking for a stock from a country which includes at least twenty years of data. For example, you could request U$ (U.S. dollars) for currency and 1984 as a base year.
  8. Click on OK. Extraction will take place, displaying a list of appropriate codes.

5. CODE LOOKUP: DATATYPES

Datatypes are used to extract different types of data for any item, i.e. price-high or volume for a stock.

  1. Once inside Code, click on Datatypes.
  2. Review available Datatypes by scrolling down the screen or using the Find box. These may be attached to the end of your mnemonic to retrieve different types of information about any given data item. The Datatype should be enclosed in parentheses ( ). For example, U:IBM(DY), for the dividend yield (DY) of IBM.

6. CODE LOOKUP: DEAD STOCKS

(Stocks that move from one exchange to another are not "de-listed." The entire data set can be found using the most current code.)

  1. Type CODE at the Program prompt. An Input page will appear.
  2. In the first field, type the name of stock.
  3. In the second field, type D for dead stock.

7. CONVERTING CURRENCY

It is possible to convert the currency of a given data item by adding ~ and the currency expression to the end of a mnemonic. For example, to convert data to U.S. dollars, add ~U$ to the end of a code, i.e.: D:HUW~U$. To convert data to Deutschmarks add ~DM to the end of the code, i.e.: U:IBM~DM.

8. FUTURES CONTRACTS

Click on Code. Click on Futures/Options and then select Futures. Click on OK. At the Find prompt enter your choice and press Enter.

The code is found in the Class column. To retrieve a time series, you must construct the complete mnemonic by using the appropriate three-letter code and then add the month and year of the contract.

For a March, 1993 aluminum futures contract, the contract code would be NAL0393. For a continuous time series type CS00 at the end of the three-letter code, i.e.: NALCS00 for aluminum futures.

9. OPTIONS

Series data is also available for Traded Options. Time series are available for currency, index or futures options as well as for certain non-U.S. equity options. As in Futures, you must first build a mnemonic. Click on Code. Click on Futures/Options and then select Options. Click on OK. At the Find prompt enter your choice and press Enter.

The code can be found in the Class column, i.e.: ISO for S&P 500. A continuous series code can be created for either equity or index options only. Add to the Class code either C.SERIESP for puts or C.SERIESC for calls, (i.e.: ISOC.SERIESC).

For further assistance refer to the TRADED OPTIONS: USER GUIDE (request from the Lippincott Reference Desk).

10. STOCK INDICES

Time series data is available for stock indices using the 301V or 900B programs. The online code lookup can be used to find mnemonics. Codes may also be obtained by typing in HELP SI? at the program number prompt before beginning the time series program. It is also possible to get listings of the individual companies which make up a particular index, although this is not available for every index.

  1. Click on online Code.
  2. Click on Equity Lists.
  3. Click on OK.
  4. Click on Extract.
  5. Type in the correct market code at the MK box (this refers to the country of the index) for the index, i.e.: US for the S&P 500.
  6. Scroll through list for the appropriate code, i.e.: LS&PCOMP, for the S&P 500.
  7. Close Code lookup.
  8. Click on Reports in the Type of Request box.
  9. Click on Indices in the Type of Data box.
  10. Click on Moving Averages (301B) in the Programs available box. Press Enter.
  11. Type in mnemonic at expression prompt, i.e., LS&PCOMP for the S&P 500. Press Enter.
  12. The list will appear.
  13. Press Enter or click on the Autopage icon to scroll through.
  14. Download by following download instructions for 301V (capture to plain text...).

11. HISTORIC BETAS

Datastream also provides historic betas for stocks. These may be retrieved in either a report or spreadsheet format (programs 301V or 900B). You must specify a stock index and the specific stock. Use online code lookup for mnemonics.

  1. Click on Reports or Data for Spreadsheets in the Type of Request box.
  2. Click on Any in the Type of Data box.
  3. Click on A single series over a period of time in the Programs available box. Press Enter.
    (Either 301V or 900B will appear on the screen).
  4. At the Expression prompt, type in the following formula (you will need to specify the index, the time frequency, your search dates and the correct Datastream code for the stock): REGB#(PCH#(index,1M), PCH#(stock,1M),?M)
  5. For example, to obtain 4 years of monthly betas for IBM, based on the S&P 500, type in the following: REGB#(PCH#(S&PCOMP,1M), PCH#(U:IBM,1M),48M)
  6. Where S&PCOMP is the code for the S&P 500, 1M specifies the data frequency (monthly), U:IBM is the Datastream code for IBM and 48M indicates a time series of 48 months or 4 years. (Betas can be provided for other time intervals by changing the Ms in the formula to Ys [years] or Qs [quarters], etc.)
  7. Continue to specify criteria and open disk for downloading directions for 900B or 301V.

12. TOTAL RETURNS

It is also possible to create a formula for Total Returns for a stock or index. This can be used for a time series (program 301V or 900B).

  1. Use Online Code Lookup to find the correct mnemonics.
  2. Click on Reports or Data for Spreadsheets in the Type of Request box.
  3. Click on Any in the Type of Data box.
  4. Click on A single series over a period of time in the Programs available box. Press Enter.
    (Either 301V or 900B will appear on screen).
  5. At the Expression prompt type the following formula: PCH#(mnemonic(RI),1M) where 1M stands for the frequency. (Frequency could by changed by replacing the 1M with 1W for weekly, etc.) For example: PCH#(S&PCOMP(RI),1M) will retrieve the Monthly Total Return for the S&P 500.
  6. Continue to specify criteria and open disk for downloading. Remember to be consistent with frequency. If you request Monthly in the return formula, be sure to use Monthly when prompted to select a frequency.
*