Au.Tra.Sy blog - Automated trading System Au.Tra.Sy blog - Automated trading System
Search
Continuous Contract options

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.

Continuous contracts allow you to chart Futures contract prices in one long time-series (here Copper ranging from 1965 to 2009)

Continuous contracts allow you to chart Futures contract prices in one long time-series (here Copper ranging from 1965 to 2009)

Let’s look at the different possibilities:

Non-adjusted contracts

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.

Standard Back-Adjusted contracts

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.

Proportionally Back-Adjusted contracts

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.

Forward-Adjusted contracts

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).

Nth Nearest contracts

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 contract

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.

Perpetual Contracts™

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.

Other parameters: when to roll-over?

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:

Unfair Advantage settings to generate a Proportionally Forward-Adjusted Contract

Unfair Advantage settings to generate a Proportionally Forward-Adjusted Contract

To be continued…

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)

Related Posts with Thumbnails

arrow2 Responses

  1. cordura21
    53 mos, 3 wks ago

    Hey Jez. Why you ended up using “forward instead of back adjusted? Doesn’t it bother you using levels that are much different to the current ones? Was it to avoid the negative historic adjustments?
    Cheers, Cord

  2. 53 mos, 3 wks ago

    hi cordura
    No strong reason for it, it sounds just more logical to me, but as you point out you’d miss the recent prices being close to reality..
    And there was something that was bothering me in having negative historical prices.

    To be honest, since this post I have been using different setting depending on what I want to achieve. For example you need to use point-based adjustments for correct P&L calculation in Trading Blox backtests – which works fine if you are using stops such as ATR, etc. A bit more of a problem if you wanted to enter at, say, 130% of current price.

    Basically there is unfortunately not “one-size-fits-all”…. And you need to use the one that corresponds to each use – I have even developed some funky “non-standard” ones for special uses… Nothing’s simple!

Leave A Comment