Simian Savants LLC Charting Software LogoSSChart Candlestick Stock Charting Software banner
 Using the CPSYM utility  
 

Using cpsym.exe to migrate data

There is a command line utility "cpsym.exe" included with SSChart, that can be used to copy data from one symbol data file to another symbol data file. You can not simply rename the file to do this, due to the symbol being encoded in the file.

Since this a command line utility, it must be run a command prompt window. You can start a command prompt window by navigating the windows start menu to:

{All Programs | Accessories | Command Prompt}

(You could also use {Start | Run..} and then type cmd at the prompt.)

In the command propt window you will need to change the current directory to your SSChart data directory. If you installed SSChart in the default location this will be: C:\Program Files\SSchart\Data. so type the command:

cd \program files\sschart\data

After you hit <enter> the prompt in the command window should show:

C:\PROGRAM FILES\SSCHART\DATA

confirming the the current directory has been changed. To run a command in the command prompt, the "exe" file for what you are running either has to be in the current directory, or in the "PATH" environment variable. To make in more convenient, in SSChart version 3.00 (and later) we put a copy of the "cpsym.exe" file in the data directory when you install SSChart.

On Mar-30-2009 the Gold and Silver futures on ECBOT moved to NYSELIFFE exchange. As an example we will copy our existing data for the Jun09 gold future "ZG" to the symbol using the new exchange. The old symbol was FE_ZG_200906 and the new symbol is FQ_ZG_200906. If you are currenly collecting quotes for this symbol, you should close SSChart before using cpsym to copy the intraday "1min" data file.

To copy the file you will use the following command:

cpsym FE_ZG_200906.1min FQ_ZG_200906<enter>

As long as you typed everything correctly, cpsym should respond with

FE_ZG_200906.1min -> FQ_ZG_200906 copied

If you don't actually have data file by the first name given, or mistype something you will get an error message instead. (NOTE: The file extension on the second file specified is optional, but if present, must be the same as the extension on the first file).

To migrate the daily data file you would use:

cpsym FE_ZG_200906.dyd FQ_ZG_200906


Using cpsym to ccreate continous daily futures data after rollover:

If you regularly watch futures, you might want to create a continous daily data file for futures that spans contracts. First of all, there are two ways to get a daily data file. The first is to create one from your current intraday data. To do this, you must first have an intraday data file. Once you have some intraday data, you can drop the symbol into a daily chart (either from an SLFMap, or using the <Shift><Left-click> drag from an intraday chart, to the daily chart). When you drop the symbol into the daily chart, SSChart automatically creates the daily data chart the first time if none exists. (NOTE: However, if you do not have any intraday data yet for the symbol, then it can not do this, and the symbol in the daily chart remains unchanged).

Once you have the daily chart selected, with data in it, you can select {Data | Update from Intraday Data} from the main menu. There is also a selection in the pop-up menu in an SLFMap to do this for every symbol in the SLFMap.

If you select {Update} in the daily chart, the program will update from IB's historical data farm. (It does this for any symbol containing an "_" character). This update is only for a single contract. It can be useful however the "splice" several contracts together to get a longer picture.

For example to merge the data for the Apr09 Oil future with the May09 future we can do the following:

At the time of rolling over the future to MAY, we will copy the daily data file for the APR contract to a file for the MAY contract. This will preserve the past data collected for APR and carry it forward to the MAY contract. Fore this example the symbols are:

FN_QM_200904 for the April-09 NYMEX oil future, and

FN_QM_200905 for the May-09 NYMEX oil future. The daily data file has the extension ".dyd". So we will do:

cpsym FN_QM_200904.dyd FN_QM_200905.dyd

This copies the APR daily data file to the file that will be used for the MAY contract. (Note if you already had a MAY data file it will be overwritten. This is not problem however, simply do an update on the MAY daily chart, to update to most recent data to the file.)

You can also use a "price offset" to adjust the price when you do the copy. If we wanted to subtract 1.50 from the price data for the APR contract as we copied it to the May file, we could do:

cpsym FN_QM_200904.dyd FN_QM_200905 -1.50

Using this method you can extend your daily historical futures data at each rollover point to span years. (NOTE: The file extension on the second file specified is optional, but if present, must be the same as the extension on the first file).

 
Last Revised Monday, 11-May-2009 15:53:18 EDT
SSChart is a trademark of Simian Savants LLC
Copyright (c) 1999-2009 Simian Savants LLC. All rights reserved.