AmiBroker Documentation Item No. ab305.html

This is the part of AmiBroker documentation. Copyright ©2002 Tomasz Janeczko. All rights reserved.


HOWTO: Setup complete US stocks database using Yahoo free quotes.

Introduction

The purpose of this document is to explain how to use AmiQuote and AmiBroker to build complete US stocks database using free quotes from Yahoo finance sites. AmiQuote is a companion program to AmiBroker stock charting/analysis software.

Requirements

You will need REGISTERED AmiBroker version 4.00 or higher and AmiQuote 1.4x installed. (Trial version of AmiBroker is not enough for this purpose because it does not save the database)

Installing template

To make things easier we have created a template database that contains 7700+ US symbols with full names and appropriate assignments to market, group, sector/industry already created. The template does not however contain any quotes so after installing it we will need to download historical quotes.

First you have to download self-extracting archive of US-Stocks template from here: USStocksTemplate.exe (190KB) - OLD ONE.

You can use updated US Database: http://www.icc-az.com/amibroker_files/Stocks.zip

Then you should run the extactor and you will see the following screen:

Now click on Next and choose choose the directory where you want to extract the database (you can simply accept default location of C:\Program Files\AmiBroker\US-Stocks). Then click Next and the database will be created in the location of your choice:

 

Updating database

Now you should run AmiBroker and open created database using File | Open Database menu:

You will see the directory selector dialog where you should choose US-Stocks database folder and click OK:

Now the database of 7700+ symbols is loaded. Symbols are assigned to correct categories which you can check by unfolding for example Sectors folder in the Workspace | Symbols tree. The database does not however contain any quotes which is communicated by "DJA - chart not available - too few quotations" message that you can see displayed in the price chart.

Now the only thing left is to download quotes. All you have to do it to choose Tools | Auto update quotes menu:

This will launch AmiQuote that will automatically retrieve the symbol list from AmiBroker and start downloading 2 years of historical data for all 7700+ symbols:

Please note that it may take upto 1 minute for AmiQuote to retrieve 7400 symbols from AmiBroker. During this time AmiQuote may appear "frozen" - this is normal and you should just wait until symbol list appears.

After download is finished AmiQuote will start updating quotes in AmiBroker. Please note that you have to have AmiBroker running while AmiQuote is updating otherwise quotes won't be imported to AmiBroker.

At any time you can stop the download by pressing Stop button (red rectangle) and resume it by pressing Download button (green arrow) in AmiQuote. (This way you can also import already downloaded quotes before downloading all symbols). You can stop, adjust From-To date range and start again to download longer/shorter history.

When download and update completes you should be able to see historical charts covering 2 last years. Then you should choose File | Save Database to permanently store quotes into AmiBroker's database.

Important notes

Please note that 2 years worth of end-of-day data for 7700+ stocks accounts for roughly 220MB (megabytes) of data (7700+ files 29KB each). On regular 56kbps modem it may take upto 10 (ten) hours to download that much data. Using ADSL 512kbps connection you should be able to complete download in 1.5 - 2 hours.

If your internet connection is weak you should consider downloading much less data (shorter history or less symbols).

Daily downloads (using Current mode of AmiQuote) are much faster - you should get complete one day update in a matter of minutes.

Further information

For further information please consult AmiBroker User's Guide section Tutorial: How to update US quotes automatically using AmiQuote. and Tutorial: How to download quotes manually using AmiQuote

In case of any further questions, comments and suggestions please contact: support@amibroker.com


Part of AmiBroker documentation project. Copyright (C)2002 Tomasz Janeczko. All rights reserved.