As mentioned previously in What everybody ought to know about continuous Futures contracts, there are multiple ways to concatenate Futures contracts. Unfair Advantage offers a rich choice of concatenation algorithms – I will use UA as the base for this post.
Please also refer to the Unfair Advantage online manual.
Let’s look at the different possibilities:
Take the front-month contract (nearest expiration date) and roll it over into the next one at expiration date. This generates a series of actual traded prices. But as we discussed in our previous post, it does have negative impacts when used for back-testing because of the potential big gaps at roll-over times.
A solution to this “big gap” problem is to move each contract up or down by a certain amount (the gap value) so that the rollover junction is continuous. This is point-based adjustment and is usualy performed “backwards”. You would start from the current contract, move the previous contract by a set amount, then subsequently move each of the anterior contracts to eliminate each gap you come across until the first contract of the timeseries.
But as we saw in the last post, this point-based adjustment is not ideal either, as it loses the relative price differences and can even make past prices become negative. This is where ratio-based adjustment comes to the rescue.
By applying a relative or proportional adjustment for each contract you will be able to maintain the historical price ratios and rid remove the gaps. This is equivalent to stock split adjustments in the Equities world. This is also done backwards – starting from the most recent contract going back, one by one, to the first contract in the series.
Again, please check the last post for more details on the issues discussed above.
Both point-based adjustment and ratio-based adjustment are usually worked out backwards – this allows to keep reference of the real/actual traded price in the current contract. However the same logic can be applied forward (start from the first contract and adjust your way up to the last contract). This will result in different contract values to back-adjusted contracts (but ratios would stay identical in case of proportional adjustments).
This is a slight variation to all cases discussed above. Instead of always considering the nearest contract (ie front-month), you can decide to look at the nth nearest contract instead. For example, in Copper, the 3rd nearest contract is currently March 2010: HGH10. Once the current front-month contract expires (October 2009: HGV09), you would roll into the next available 3rd nearest contract which is May 2010: HGK10.
This process should insulate you from possible more volatile price changes in the front-month contract around expiration time.
Gann contracts use a specific contract month and roll over only to the same contract in the next year. A March Gann contract, for example, consists of the nearest March contract for each day.
This is an algorithm trademarked by CSI. To avoid the “gap” problem around rollover time, CSI have decided to smooth the transition phase out. The shift from one contract to the next one(s) spreads over time. The algorithm uses a time-weighted average of different expiration date contracts to gradually shift from the front-month to the further month as expiration date approaches. You can find more details in the UA manual.
You can roll-over right at expiration time. However this does not reflect actual trading activity, where physical roll-over (ie money flowing from one contract to the next) takes place earlier.
You can decide to always roll-over n days before expiration but you can also decide to track actual market activity to trigger the roll-over. You would observe Open interest or Volume and roll-over when one of them shifts from one contract to another. This is a much more realistic approach.
Here is a screenshot of the settings I have used in Unfair Advantage to extract and concatenate the data, it is proportionally forward-adjusted with a roll-over triggered by a 2 consecutive shifts in Open Interest, but less than 5 days prior to expiration:
There are many more options which will all be addressed in a further post detailing how to use the Unfair Advantage API to extract data directly from your own code (Exciting!).
Note: You can receive a 10% discount on CSI data subscriptions (use coupon code LIBERTY)