London Metals Exchange data & backtesting

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
ecritt
Roundtable Knight
Roundtable Knight
Posts: 134
Joined: Sat Aug 28, 2004 3:44 am
Location: Phoenix, AZ
Contact:

London Metals Exchange data & backtesting

Post by ecritt »

I've been studying the LME contracts for a couple of months now. I'm convinced that backtesting on the LME data that comes out of CSI (or any other data source I've seen) is not realistic. The data are price quotes for a new 3 month forward. The day after you purchase a forward contract it ceases to be a 3 month forward. With each passing day its term to maturity shrinks, and ultimately converges with the cash market. But the only data you have for backtesting purposes are the quoted prices, each day, for a NEW 3 month forward.

During periods of extreme and/or persistent contango or backwardation, relying on the quoted prices of a new 3 month forward can result in dramatic errors in profit/loss estimates.

To illustrate this I use data for LME Copper 3 month forwards and LME Copper cash to create a synthetic equity curve representing 1 contract rolled every 3 months from 1968 to current. At the beginning of January I assume purchase of a 3 month forward at its quoted price. At the end of March I assume liquidation at the quoted cash market rate (futures price converges to spot price at expiration). Then I repeat, purchasing a 3 month forward contract and and again liquidating 3 months later at the cash market rate, so on an so forth. As you can see in the attached chart, most of the time the synthetic equity curve closely tracks the quoted prices for LME Copper, both 3 month forwards and cash. However, there was a rather nasty 90% drawdown during the 1980's that only shows up if you actually roll the position; it does not show up in the quoted prices for 3 month fowards or cash. Evidently the contango during that period of time was both persistent and extreme.

Any thoughts on how to properly backtest LME data? Or am I just wrong about this?
Attachments
LME_Cop.jpg
LME_Cop.jpg (157.36 KiB) Viewed 13880 times
sluggo
Roundtable Knight
Roundtable Knight
Posts: 2987
Joined: Fri Jun 11, 2004 2:50 pm

Post by sluggo »

You can trade whichever prompt dates you like (I happen to prefer the 3rd Wednesday of the month) and you can roll them whenever you like.

One thing you could do, if you wished, is to initiate new a position in a prompt date 4 months away. When a month passes (making it now a 3 month forward), roll it to a 4 month forward. Thus your forward varies between 4 months and 3 months.

Or if 12 rolls per year is not your cup of tea, initiate in a 4 month forward, hold for 2 months, then roll. Wallah, 6 rolls per year.

The paperback book on the LME's website is fairly good: https://secure.lme.com/Shop/product.aspx?id=478
AFJ Garner
Roundtable Knight
Roundtable Knight
Posts: 2071
Joined: Fri Apr 25, 2003 3:33 pm
Location: London
Contact:

Post by AFJ Garner »

A brief look at the cash (spot) charts and back adjusted charts of Comex Copper confirms the point. As regards copper, you have the luxury of using the Comex futures contract and can back test it accordingly. Not so with Zinc and the other base metals.

Sluggo is of course correct - you can roll when you like and rolling a 4 month forward after 3 months will undoubtedly have an effect (of some sort) on contango/backwardation. Testing would no doubt establish which rolling method would (in the past) have minimized contango.

But ecritt' stark and realistic point remains - any back test is highly misleading unless you create a new price series reflecting the actual rolling method you want to test. I have long been uneasy about the situation and have pointed out elsewhere that contango has in the past severely diminished returns from commodities such as gold and wheat held through futures contracts (and of course this is the only method of exposure possible for long term holding of perishable commodities such as wheat).

Thus far I have not bothered to create the necessary data series. But ecritt is 100% correct - it needs to be done. Thank you for prodding us into action!
LeviF
Roundtable Knight
Roundtable Knight
Posts: 1436
Joined: Mon Dec 22, 2003 12:24 pm
Location: Des Moines, IA
Contact:

Post by LeviF »

Are there some physicals that are more sensitive to current interest rates than others?
LeviF
Roundtable Knight
Roundtable Knight
Posts: 1436
Joined: Mon Dec 22, 2003 12:24 pm
Location: Des Moines, IA
Contact:

Post by LeviF »

AFJ Garner wrote:...any back test is highly misleading unless you create a new price series reflecting the actual rolling method you want to test. I have long been uneasy about the situation and have pointed out elsewhere that contango has in the past severely diminished returns from commodities such as gold and wheat held through futures contracts (and of course this is the only method of exposure possible for long term holding of perishable commodities such as wheat).
I see the issue with using LME data as noted by ecritt, but for this comment by AFJG, isnt that the whole point of getting backadjusted data?
RedRock
Roundtable Knight
Roundtable Knight
Posts: 944
Joined: Fri Jan 30, 2004 3:54 pm
Location: Arizona

Post by RedRock »

The LME is unique as when you trade, they write a contract 'just for you' with a prompt date x days out. This individual date contract will not match the standard 3 mo rolling contract CSI provides. LME is not the best place to begin trading forwards/futures...
AFJ Garner
Roundtable Knight
Roundtable Knight
Posts: 2071
Joined: Fri Apr 25, 2003 3:33 pm
Location: London
Contact:

Post by AFJ Garner »

Levi wrote: Isn't that the whole point of getting backadjusted data?
Yep: but as Eric points out, in the case of LME data you must do your own back adjusting!
LeviF
Roundtable Knight
Roundtable Knight
Posts: 1436
Joined: Mon Dec 22, 2003 12:24 pm
Location: Des Moines, IA
Contact:

Post by LeviF »

Why did you mention gold & wheat?

Forgive me, my knowledge on the mechanics of futures contracts is pretty limited...
AFJ Garner
Roundtable Knight
Roundtable Knight
Posts: 2071
Joined: Fri Apr 25, 2003 3:33 pm
Location: London
Contact:

Post by AFJ Garner »

Because as with COMEX copper, they are normal futures contracts, often in contango, and by comparing the spot chart with the back adjusted chart you can see the effect of contango in the same way as you can with Eric's charts above. Without constructing the synthetic 3 month contract (putting LME metals onto the same basis as normal futures contracts) you are unable to see the effect of contango by looking at the rolling 3 month forward data.
ecritt
Roundtable Knight
Roundtable Knight
Posts: 134
Joined: Sat Aug 28, 2004 3:44 am
Location: Phoenix, AZ
Contact:

Post by ecritt »

Levi wrote:Why did you mention gold & wheat?

Forgive me, my knowledge on the mechanics of futures contracts is pretty limited...
See attached chart of gold during the 1980's and 1990's.

((( EDIT: The pink line below is incorrect. Thanks to Jez Liberty for uncovering my programming logic error. A valid version of the pink line would not be materially different from the standard back adjusted contract. )))
Attachments
Gold_Contango.jpg
Gold_Contango.jpg (157.05 KiB) Viewed 13717 times
Last edited by ecritt on Mon May 31, 2010 7:08 pm, edited 2 times in total.
ecritt
Roundtable Knight
Roundtable Knight
Posts: 134
Joined: Sat Aug 28, 2004 3:44 am
Location: Phoenix, AZ
Contact:

Post by ecritt »

AFJ Garner wrote:Because as with COMEX copper, they are normal futures contracts, often in contango, and by comparing the spot chart with the back adjusted chart you can see the effect of contango in the same way as you can with Eric's charts above. Without constructing the synthetic 3 month contract (putting LME metals onto the same basis as normal futures contracts) you are unable to see the effect of contango by looking at the rolling 3 month forward data.
Here was my first crude attempt to create a synthetic of LME Copper. Notice it is quite similar to COMEX Copper.
Attachments
LME_Copper.jpg
LME_Copper.jpg (106.45 KiB) Viewed 13709 times
ecritt
Roundtable Knight
Roundtable Knight
Posts: 134
Joined: Sat Aug 28, 2004 3:44 am
Location: Phoenix, AZ
Contact:

Post by ecritt »

sluggo wrote:You can trade whichever prompt dates you like (I happen to prefer the 3rd Wednesday of the month) and you can roll them whenever you like.

One thing you could do, if you wished, is to initiate new a position in a prompt date 4 months away. When a month passes (making it now a 3 month forward), roll it to a 4 month forward. Thus your forward varies between 4 months and 3 months.

Or if 12 rolls per year is not your cup of tea, initiate in a 4 month forward, hold for 2 months, then roll. Wallah, 6 rolls per year.

The paperback book on the LME's website is fairly good: https://secure.lme.com/Shop/product.aspx?id=478
Yes, this is very similar to what a couple of CTA's have told me. The problem is creating a time series for backtesting...and for generating signals in real time. Working on that now. Thanks for the book link; I've been looking for just such a thing. I also purchased "Wolff's Guide to the LME"; facinating read so far.
AFJ Garner
Roundtable Knight
Roundtable Knight
Posts: 2071
Joined: Fri Apr 25, 2003 3:33 pm
Location: London
Contact:

Post by AFJ Garner »

ecritt wrote: The problem is creating a time series for backtesting...and for generating signals in real time.
Yes. Prior to running one's system each day to generate signals, there will be the extra step of generating updated synthetics for the day. Oh dear me, I can see I am going to have to do some work.
LeviF
Roundtable Knight
Roundtable Knight
Posts: 1436
Joined: Mon Dec 22, 2003 12:24 pm
Location: Des Moines, IA
Contact:

Post by LeviF »

I use Blox for tasks similar to this. I have a simulation suite that i run that manipulates the data each day, then i run my order gen suite after that.
Moto moto
Roundtable Knight
Roundtable Knight
Posts: 427
Joined: Mon Jun 01, 2009 4:12 am
Location: once again in the UK

Post by Moto moto »

"Oh dear me, I can see I am going to have to do some work."

One of the best lines I have read on any trading forum ever. thanks.

(interesting discussion none the less - the difference between reality and fantasy for many systems that seem to fail in the real world most likely lies in the quality of the data in the back test?)
LeapFrog
Roundtable Knight
Roundtable Knight
Posts: 695
Joined: Mon May 17, 2004 4:18 pm
Location: Boston, MA

Ebullio Hedge Fund loses 86% in one month on LME metals...

Post by LeapFrog »

http://www.businessweek.com/news/2010-0 ... ate1-.html

Looks like these guys got squeezed big time.
Post Reply