Sample Search: Find the exchange rate between the US Dollar and South Korean Won.
Finding the code:
Entering the Macro:
Enter your mnemonic. Enter the code exactly as it appeared on the Datastream screen. Surround the mnemonic with quotation marks, followed by a comma outside of the quotation marks. In this example involving exchange rates, it would appear as "KOUSDSP", (see image) You may enter more than one mnemonic. Line up all mnemonics in a column, surrounding each one by quotation marks and fllowing each by a comma, including the LAST code.
Opening the CSV file:
- On the main Datastream screen, enter HELP ER? in the box next to Program Number. Press Enter.
- Select 2 for "National Exchange Rates." Type "2" at the bottom of the screen and press Enter.
- From the list of Exchange Rate Quotes, select 35 for South Korea. Press Enter.
- The screen will now list mnemonics for exchange rates with a variety of countries. The United States Dollar is not listed. Press Enter for the next screen.
- Note the mnemonic for the exchange rate comparing the South Korean Won to the US Dollar. It is KOUSDSP.
- Drag the cursor to the box marked Macro at the top of the screen. Click on Macro and the click on Edit Macro. Select "download.mac" from the list of choices and then click "OK."
- A notepad screen will appear. Change ONLY what it is within quotation marks on this screen. At the top line change the file name to a:\yourfile.csv
- At the line that begins SEND, enter the dates of your search. After the first quotation mark, there is a comma. After this comma, enter the starting date in the form of MM-DD-YY, followed by a comma (see image). Enter the ending date in the same manner. If you want your data to run until the present, do not include an ending date and simply leave the two commas following the starting date. After the commas, enter the frequency for which you want the data. Note the following frequency codes:
Daily = D
Weekly = W
Monthly = M
Quarterly = Q
Yearly = Y
- After TESTLIST:
- Move the cursor to File at the top of the notepad screen and select SAVE. Click on
- Save and then minimize this screen.
Running the Macro:
- Return to the main Datastream screen. Press CLEAR so that he original screen appears.
- Select Macro at the top of the screen. Select Run Macro and then select download.mac. Click on OK.
- If the macro ran properly, a screen of white numbers should flash up on the main Datastream screen and then the original Datastream screen should return.
- Open Microsoft Excel and open your file. If your file does not appear, make sure the browser is selected to search for "All Files." Do not run a macro program while that Excel file is open. The macro will not run properly.
14. Make sure your data is saved to your USB port or on your H Drive.
DO NOT LEAVE FILES SAVED TO THE SSRC COMPUTERS THEY WILL BE ERASED.
Things to Remember:
As of January 1, 1999 most European countries are now using the Euro for capital market transactions. Comparability of pre-existing exchange rates is a serious problem.