Pattern Recognition & Trading Decisions
Preparing Data Files to Use "Indicators.exe"
The .cmx data format required by Indicators.exe was originally developed to investigate the performance of futures trading systems. It contains futures–specific fields in respect of open interest and delivery month that are not required for stocks. Indicators.exe uses this format, makes no use of open interest or delivery month, but requires a figure (typically ‘0’) for open interest and a letter character (typically ‘H’) in the delivery month field. Where futures data is available, it is good practice to use correct, rather than fictional, figures for open interest and delivery month. Whilst these are redundant for stocks, it does make sense to standardise data file formats and methods for reading them, so that a wide range of programs can be developed to use the same data files.
A labelled sample of the data required is shown in table 1, but note that the first row that contains descriptive names of the columns of data, must be excluded from any .cmx file.
Table 1 – (Labelled) sample of .cmx data.
Authoritative examples of .cmx format are files SPX.cmx and SPC.cmx given in the book’s accompanying CD-ROM.
There are numerous sources of market data available over the Internet, the best of which are probably from subscription services, two of which are mentioned in the book’s CD-ROM file, Indicators.pdf. Having acquired ASCII data from a data provider, there is then an issue of whether their software will deliver it in .cmx format. Where it will not, for those who can program in 3GL languages, the easiest solution is probably to write a program to read in the data providers’ ASCII data from their permitted format and write it out in .cmx format. Another way of achieving the same result is to write a macro for Excel or some other spreadsheet package, which is probably also an attractive route for those who wish to acquire free market data from the Internet. There is an overhead in the initial preparation of .cmx files, but regular updating of them is not onerous once they have been prepared.
Tips for Using Excel:
1. A typical way of working is to download market data from the Internet, open the downloaded file in Excel and create a new (.cmx) worksheet to receive the data in .cmx format.
2. Columns of data from the worksheet of raw downloaded data are copied from the worksheet of raw data into a clipboard and pasted from the clipboard into appropriate columns of the .cmx worksheet. Copying to clipboard can be done by first highlighting the column(s) to be copied then pressing Ctrl-C or clicking Edit > Copy with the left mouse button. Pasting from the clipboard is done by making the top left hand cell of the area to be pasted active and then pressing Ctrl-V or clicking Edit > Paste Special > Values.
3. When using Excel, any hidden formulae or odd rows after the last genuine row of .cmx data will produce errors when the program attempts to use a saved data file. One way to avoid this is to insert another worksheet, copy only the genuine .cmx part of any previous worksheet to clipboard, and then paste it into the new worksheet by using the left mouse button with Edit > Paste Special > Values.
4. A worksheet containing only genuine .cmx data (without hidden formulae, spurious lines at the end or anything else that should not be there) should be saved as a space-separated text file, named as the ticker symbol of the instrument to be traded. For example, if 3M’s stock (ticker symbol MMM) were being examined the file would initially be named MMM.txt. Immediately after saving it should be re-named MMM.cmx. At this stage it should be ready for the Indicators.exe to use.
5. If it is intended to track the progress of a stock, then while the spreadsheet is still open, another version might be saved as (say) MMMTrack.txt, but in this case as a tab-separated text file which will be easier to import into Excel as new data becomes available. The new data can be input manually, or pasted as described here. A space-separated version is saved, and re-named for use with the program, and the tab-separated (tracking) version saved in preparation for the next update.
© 2005-2010, Technical Forecasts Ltd. | Privacy Statement