Importing Historical Data from Stooq
This tutorial is a next step in getting know Chartsy|One program. It will guide you through the process of downloading a historical database of US stock prices from stooq.com website and importing it into your technical analysis program.
Stooq.com is a financial online charting and stock news website that also offers for free a text-based downloadable historical databases for stocks, futures, currencies and indices from various exchanges. Currently the data from American (NASDAQ, NYSE), British and Polish (GPW) exchanges is available. The data is adjusted for splits and dividends however it might not happen right away after closing the trading session, thus the data may carry gaps for a few days until it is corrected. There are not many website in our universe that offer downloadable free stock data, so each such website is worth to mention, especially for novice traders who often cannot afford pricey other services or - more probably - are unsure if they are destined to trading at all and wish to start with something more affordable.
In this tutorial we will guide you through the whole process of downloading a historical database of US stock prices and importing it to the Chartsy|One program for further analysis. While both Metastock and ASCII formats are available to download, we are particularly interested in ASCII format files, since Chartsy|One currently does not support Metastock imports.
Start by visiting URL www.stooq.com/db/h/ with your browser; it's a place where historical data from Stooq lives. The downloadable files are updated every working day, few hours after closing the US exchanges. Please note that the data is ment for private use only, it cannot be used for commercial purposes without permission. The following screenshot taken on September 4, 2017 shows how the Stooq download page should look like.
On the mentioned Stooq download page, locate Daily, ASCII, U.S. file and download it. You may be asked to solve the captcha before being allowed to download the file.
Start Chartsy|One, right click on the Symbols item from the Symbol List panel, then click Attach CSV File/Archive as shown on the image below. If Symbol List panel is not visible in your program, open it first by selecting Window -> Symbols from the top menu.
The file chooser window shown on the screen below will be opened. [File chooser. Navigate to historical ]
Chartsy|One can handle many CSV formats. It allows you to define your own ASCII mapping or to choose a predefined file format. In this tutorial we will choose predefined format for Stooq database files. To do so please choose "*.zip, Stooq compressed" in File Type field of the file chooser dialog. In the file chooser navigate to the folder where your historical data file from Stooq has been downloaded, select it and click Open. Do not unpack the downloaded files, Chartsy|One is very efficient in handling compressed historical data archives. At this point your downloaded historical data should be shown in the Symbol List as a mapped file.
[A CSV archive file carrying the stock historical data mapped in Chartsy|One.]
Once you have the CSV archive file properly mapped, as shown above, you can at this point:
- Open new charts, by double clicking the archive and typing the symbol name you are looking for.
- Browse the archive content by expanding its hierarchical nodes in the view.
- Run scanners on all or a subset of symbols from the archive.
Feature: CSV Archive Refresh
On the next day you can refresh your historical CSV archives by following the steps below:
- Download updated files from the Stooq website. Use the same browser and download to the same folder on the disk as previously. If the browser appends automatically a numerical sufix to the filename it is completely fine. If the browser asks you for a filename, use the same name and override/replace the file downloaded previously.
- Navigate to Chartsy|One platform, right click on the file in the Symbol List panel and click Refresh. The Chartsy|One will automatically scan the folder where the file is located searching for similarly named files and choosing the newest one.
- Check visually if the filename was changed correctly.
- If the file for some reason wasn't automatically refreshed, it is usually necessary to remove this file from the Symbol List and attach it again manually by following all steps outlined in the previous chapter of this guide.
Feature: Multi-Resolution CSV Archives
With Chartsy|One and its ASCII mapping feature you can go a step further and combine multiple CSV archives into a single stock data repository. For example, you can download both Daily and Hourly ASCII data (for the same exchange, of course) and attach it to the Chartsy|One platform using the command "Attach Multiple CSV Archive/Files". This approach gives you the following benefits:
- Charting with access to daily and intraday resolution time-frames.
- Scanning using daily and intraday bars at the same time.
- Easier data updates.