Contract month selection and rolling parameters

Discussions about the testing and simulation of mechanical trading systems using historical data and other methods. Trading Blox Customers should post Trading Blox specific questions in the Customer Support forum.
Post Reply
ColdFact
Senior Member
Senior Member
Posts: 31
Joined: Wed Oct 27, 2010 2:07 pm

Contract month selection and rolling parameters

Post by ColdFact » Tue Nov 01, 2011 5:56 pm

I use CSI data. I have noticed that profitability doubles in various markets from Rough Rice to Crude Oil to Natural Gas (among others) by rolling the contracts 90-120 days before expiration, as opposed to rolling them based on open interest and volume. (I'm using a long-term trend following strategy) I have a hard time believing that this would be the case in a live portfolio, but I cannot seem to find a bug that would explain it away. Has anyone else had this experience? Does anyone have any idea how to verify the validity of the results other than trading the system in real time and comparing it to the simulated results?

Many thanks to anyone who participates in this discussion!!

-ColdFact

svquant
Roundtable Knight
Roundtable Knight
Posts: 126
Joined: Mon Nov 07, 2005 3:39 am
Location: Silicon Valley, CA
Contact:

Post by svquant » Tue Nov 01, 2011 10:43 pm

You need to understand the term structure for each futures contract in your portfolio as well as if it is in contango or backwardation. In general under some circumstances upto 1/3 of commodity returns are determined by the term structure vs the trend. For some of the commodities you mentioned, energy complex, being 90 days out is not a big issue but for some the markets could get thin.

ColdFact
Senior Member
Senior Member
Posts: 31
Joined: Wed Oct 27, 2010 2:07 pm

Thanks svquant for the quick response :)

Post by ColdFact » Wed Nov 02, 2011 10:03 am

I'm confused as to how backwardation or contango is relevant. I have noticed that there is very little difference (and it seems random as to whether the difference is positive or negative) for the grains/dairy/etc - but the difference in return is hugely positive across every single energy market. What I'm interested in knowing, is what could make this be the case? I have tested it in every 5 year period since 1973, and it is consistently true that using a rolling method 4 months-ish out makes the profitability much higher - generally as a result of having a higher percentage of wins.

Toosday
Roundtable Fellow
Roundtable Fellow
Posts: 70
Joined: Fri Jun 03, 2011 11:21 am
Location: Austin, TX

Post by Toosday » Wed Nov 02, 2011 10:49 am

I believe the reason this happens is that the "price insurance" premium embedded in the futures prices decreases as time to delivery decreases. By rolling earlier your premium is not reducing at the rate it would as delivery becomes closer. I would think this would be observed on long contango contracts or short backwardized contracts.

svquant
Roundtable Knight
Roundtable Knight
Posts: 126
Joined: Mon Nov 07, 2005 3:39 am
Location: Silicon Valley, CA
Contact:

Post by svquant » Wed Nov 02, 2011 10:59 am

ColdFact

There are some papers on this subject of backward/contango that have been written mostly with respect to long only commodity indexes but in long/short portfolios too.

In general if you are long then backwardation is a "tail wind" and contango a "head wind" and vise versa for short position. Additionally if you are long a contract in contango in general the further out you are on the curve the less impact that contango will have, i.e. a lighter head wind.

Perhaps take a break from the keyboard and dig up some reading materials and you will see in general why this is the case. Energies are the classic example and one where the dynamics of the last 5 years have really changed and where using longer dated contracts for longs helps a lot.

Some keywords to use in a search is "optimal roll" for some basic information.
Last edited by svquant on Wed Nov 02, 2011 3:18 pm, edited 1 time in total.

ColdFact
Senior Member
Senior Member
Posts: 31
Joined: Wed Oct 27, 2010 2:07 pm

Many thanks!

Post by ColdFact » Wed Nov 02, 2011 11:05 am

This makes sense, thanks so much!

The comments/advice are very much appreciated, going to read/research more :)

Bravochico
Full Member
Full Member
Posts: 24
Joined: Wed Sep 14, 2011 11:46 pm
Location: Southern California, Ca

Post by Bravochico » Wed Nov 02, 2011 12:03 pm

I've heard a lot of arguments on how "properly constructed" perp contracts should eliminate this issue. Yet I continue to see discrepancies like coldfact.

When TB is able to import raw contacts for testing, it will be a huge leap.

I always use raw contracts for backtesting and almost without exception, TF results degrade compared to using perp contracts.

ColdFact
Senior Member
Senior Member
Posts: 31
Joined: Wed Oct 27, 2010 2:07 pm

Response to Bravochico

Post by ColdFact » Wed Nov 02, 2011 3:45 pm

Do you have a rough estimate in your experience, for how much the performance is inflated by using the perp contracts? I'd love to be able to adjust my expectations appropriately. Also, do you find that specific markets are more/less affected?

Bravochico
Full Member
Full Member
Posts: 24
Joined: Wed Sep 14, 2011 11:46 pm
Location: Southern California, Ca

Post by Bravochico » Wed Nov 02, 2011 3:56 pm

There was no firm figure for it, but it was big enough to cause concern.

It's a case by case issue. The idiosyncratic details of your strategy will also effect it.

Id love to be shown differently, but until then I would never base any conclusions on perp contracts. You gotta use raw contracts or some derivation scheme. Perhaps use perp signal days and then go to raw data to estimate PnL.

Call me a heretic, but I've seen this movie a few times before.

Eventhorizon
Roundtable Knight
Roundtable Knight
Posts: 229
Joined: Thu Jul 08, 2010 2:36 pm
Location: Boulder, CO
Contact:

Post by Eventhorizon » Wed Nov 02, 2011 3:57 pm

Bravochico,

Would it be possible for you to cobble together an example that shows how using raw contracts would give a different back-test result from using continuous contracts?

I am really interested to understand the mechanism, and whether the issue is just a case of using the "wrong" type of continuous contract, or whether the only solution is to use raw contracts.

Thanks

Bravochico
Full Member
Full Member
Posts: 24
Joined: Wed Sep 14, 2011 11:46 pm
Location: Southern California, Ca

Post by Bravochico » Wed Nov 02, 2011 4:48 pm

I'm cafe lounging in Europe at the moment.

When I get back, I'll dig up some examples but it will be a few weeks.

I'm not discounting the use of perp data, simply stating it's only a starting point and that I'd never put real money on perp data only. Never,ever.

b-cat
Full Member
Full Member
Posts: 22
Joined: Wed Dec 31, 1969 7:00 pm

Post by b-cat » Wed Nov 02, 2011 5:00 pm

Are you using volatility-based position sizing? If so, that could be something to think about as well. It's been my experience that deferred contracts often have significantly lower vol than front months, for various reasons.

depending on how your sizing algo works, less vol might mean more contracts.

may be worth researching :)
Attachments
CL_closingPrices.PNG
closing prices for back adjusted CL contracts 1, 2 and 3 months out.
CL_closingPrices.PNG (60.7 KiB) Viewed 5256 times
CL_ATR.PNG
ATR for back adjusted CL contracts 1, 2 and 3 months out.
CL_ATR.PNG (54.13 KiB) Viewed 5255 times

trackstar
Roundtable Fellow
Roundtable Fellow
Posts: 76
Joined: Sun Mar 09, 2008 11:03 pm
Location: Houston Texas

Post by trackstar » Wed Nov 02, 2011 6:07 pm

my guess would be that b-cat hit the nail on the head......

thanks for posting that data!

sluggo
Roundtable Knight
Roundtable Knight
Posts: 2986
Joined: Fri Jun 11, 2004 2:50 pm

Post by sluggo » Wed Nov 02, 2011 8:01 pm

you could formulate and (using Blox) test a hypothesis:
  • at the same level of risk, trading deferred contracts produces greater (gain-to-pain ratios) than trading front month contracts
Don't exert the effort to do this unless you think it's very important .

mgdpublic
Roundtable Knight
Roundtable Knight
Posts: 117
Joined: Tue May 12, 2009 1:35 pm

Post by mgdpublic » Mon Jan 09, 2012 2:51 pm

Bravochico, do you use TB to test individual contracts? I want to be able to do that as well but indicator creation get's iffy in some markets.

Post Reply