Friday, July 19, 2013

How to join historical data from expired contracts by rollover

1. Download the oldest contract you intend to use.
2. Make shure that the symbol and data for the next contract symbol is free. If not, delete the symbol with data. Roll over to the next consecutive contract symbol by right clicking directly on the symbol in a quote page and choose Rollover Future and fill in the symbol for the next contract month. Now there should be data for a particular contract under the name of the next consecutive contract. 
3. Download data for the new contract beginning at rollover date (i.e. for monthly contracts two regular trading days before previous expiration). It's very important to restrict the download backwards in time to prevent data of the previous contract from being overwritten.
4. Equalize the data by using the split function (File-Functions...-Adjust for Splits). Enter the real closing price for the previous contract at rollover date in the first box under Split Ratio and the adjusted closing price in the second box and make shure the Calendar Spread Adjustment button is checked. Adjustment for calendar spread can be made at any time later as long as the rollover time and date is known or rule consistent. Most convinient and fail safe at this point could be to download the previous contract again in order to calculate the calendar spread and then adjust the calendar spread before rolling o to the next contract.
5. Repeat the procedure (2-4) until current rolling.