Very Long Term Trend Following: The Data Implications

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.
Algonquin
Roundtable Knight
Roundtable Knight
Posts: 158
Joined: Sun Jan 28, 2007 9:38 pm
Location: Greenwich, CT

Very Long Term Trend Following: The Data Implications

Post by Algonquin »

As many systematic trend followers migrate to very long term trend following systems, do the problems inherent in backadjusted data become more manifest and problematic? Thus, for example, if a trader is using a moving average system based on 300+ days, or a channel breakout system predicated on a 200+ day channel, are there increased, practical implications that arise from using backadjusted data? Given the increasing move toward this style of trend following, I thought it would be a timely topic for our group. All comments and thoughts are welcome.
sluggo
Roundtable Knight
Roundtable Knight
Posts: 2987
Joined: Fri Jun 11, 2004 2:50 pm

Post by sluggo »

I don't think it's totally crazy to follow this chain of reasoning:
  1. I've got $80K (or $200K, or $600K, or ...) invested in this Very Long Term trading idea
  2. I'm nervous about the reliability of backadjusted continuous contracts
  3. Maybe it'd be a good investment of $1K (or $5K, or ...) to buy my very own continuous contract backadjuster that works exactly and precisely MY WAY
  4. Maybe I'll hunt around for a programmer who can provide me this service
  5. And then I'll sleep soundly, secure in the knowledge that my investment of 1 or 2% of my account size, has purchased data-massaging software I really trust. Software whose output I'm comfortable using to make big-dollar investment decisions. Peace of mind: priceless.
Angelo
Roundtable Fellow
Roundtable Fellow
Posts: 90
Joined: Fri Apr 29, 2005 4:31 am
Location: Italy

Re: Very Long Term Trend Following: The Data Implications

Post by Angelo »

Algonquin wrote:As many systematic trend followers migrate to very long term trend following systems, do the problems inherent in backadjusted data become more manifest and problematic? Thus, for example, if a trader is using a moving average system based on 300+ days, or a channel breakout system predicated on a 200+ day channel, are there increased, practical implications that arise from using backadjusted data? Given the increasing move toward this style of trend following, I thought it would be a timely topic for our group. All comments and thoughts are welcome.

Hi Algonquin,

you raise a very important question: in my opinion continuos contracts don’t mimic real time trading, especially during long bull markets, because the “adjustmentsâ€
AFJ Garner
Roundtable Knight
Roundtable Knight
Posts: 2071
Joined: Fri Apr 25, 2003 3:33 pm
Location: London
Contact:

Post by AFJ Garner »

Back adjusted data seems to me a perfectly reasonable solution to the problem inherent in back testing futures trading strategies, long term or not. The arguments are so well rehearsed there seems little value in repeating them here - from Bob Fulk's interesting paper, to the discussions in Babcock and in Le Beau and Lucas, the dissertations of Bob Pelletier and so forth. It’s not an argument either side can win; “forâ€
Algonquin
Roundtable Knight
Roundtable Knight
Posts: 158
Joined: Sun Jan 28, 2007 9:38 pm
Location: Greenwich, CT

Post by Algonquin »

To be more precise, my intention in raising this issue is not to resurrect the tired debate surrounding back adjusted contracts. Instead, I am attempting to draw attention to some potentially more subtle issues that may arise as tested data series become more elongated. Specifically, over very lengthy periods of time the likelihood increases that back adjusting will generate significant price "drifts," as more instances arise where old contracts are repeatedly concatenated and adjusted in a single price direction. One of my concerns is that significant and recurrent price drifts will impact the timing of entry signals. For example, if there are a series of significant upward and downward price drifts, could the timing of a channel breakout entry vary significantly from what would have resulted when trading the actual contracts. Is the difference in days? Weeks? Does it even matter? Are there other problems that may arise from longer occurring drifts? These are some of the concerns and questions I thought I would put to our group.
Angelo
Roundtable Fellow
Roundtable Fellow
Posts: 90
Joined: Fri Apr 29, 2005 4:31 am
Location: Italy

Post by Angelo »

AFJ Garner wrote:
But I do recall Sluggo mentioning somewhere software that can test individual contracts - in such a way of course that the false profits and losses of "gaps" are eliminated.
I missed this one.
May I ask if this software is proprietary or commercially available?

AFJ Garner wrote:
.............................
Look at Eric Crittenden’s research on very long term stock trading. Look at the excellent long term track record of FundX’s simple momentum strategy on mutual funds. Look at Mebane Faber’s interesting paper on tactical asset allocation, testing a very long term system using indices as proxies – a very valid concept given the growth of ETFs with tiny tracking error.

Agreed, you may need different parameters for the S&P futures contract to the S&P cash. Owing to different volatilities perhaps. Perhaps owing to a better efficiency ratio and a straighter line of the cash data series over the backadjusted futures price series. But statistically speaking, by using many different instruments and not just futures, I have little difficulty in convincing myself that a much longer term system has (or should I say "had"?) validity.
Very well said.
But, I wonder how this is related to the topic discussed here.
AFJ Garner
Roundtable Knight
Roundtable Knight
Posts: 2071
Joined: Fri Apr 25, 2003 3:33 pm
Location: London
Contact:

Post by AFJ Garner »

Very well said.
But, I wonder how this is related to the topic discussed here.
I was wondering whether Algonquin was worried about small sample size in testing very long term strategies. I now see that his worries were different and I am thinking through the implications he raises!
A
AFJ Garner
Roundtable Knight
Roundtable Knight
Posts: 2071
Joined: Fri Apr 25, 2003 3:33 pm
Location: London
Contact:

Post by AFJ Garner »

Re the software I will try to track down the reference for you: I may have made a note of it somewhere. Failing which maybe Sluggo could comment?
Tim Arnold
Site Admin
Site Admin
Posts: 9015
Joined: Tue Apr 06, 2004 1:41 pm
Location: Boston, MA
Contact:

Post by Tim Arnold »

The back adjusted contracts I use have no 'drift' in that they are designed to roll at the precise time that I would roll while trading. So the back adjusted series represents precisely the data stream that I would actually be working with. There is no drift or spread or anything else that would adversely affect the test results.

In addition, the software product that I use for back testing accounts for the contract rolls on the precise dates that my data rolls, and I would have rolled in real trading, and charges the account for slippage and commission.

Trade what you test, and test what you trade. I guess I am not seeing the issue of concern here.
sluggo
Roundtable Knight
Roundtable Knight
Posts: 2987
Joined: Fri Jun 11, 2004 2:50 pm

Post by sluggo »

This ad appeared on page 90 of the June 2005 issue of Technical Analysis of Stocks & Commodities magazine. The publisher refers to this issue as Volume 23, Number 6. People here might be interested in the italicized portion of the ad.

However, my experience with very longterm trendfollowing (approx 0.4 round trip trades per year, in each market) on a 50 market portfolio, mirrors Tim Arnold's remarks. I test what I trade and trade what I test. I use CSI Unfair Advantage to generate my backadjusted continuous contracts and I run my backtests AND my real-money live trading software, off these backadjusted continuous contracts. After a ton of very careful analysis and real time tracking, I am satisfied that they are not producing systematic errors or distortions which cause simulation results to diverge from actual real-life market experience. But hey that's just me. I made my bed and I am sleeping in it. You will need to do the same.

A useful exercise is to gather a dozen individual futures contracts which span a very long term trend (I suggest: copper, 2003 to 2006) and manually calculate the entry point, the rollover points, and the exit point. Figure up the profit or loss on each individual futures contract and make a table of cumulative profit (or loss) versus time. Now create a backadjusted continuous contract and pump it through your trading software for the same stretch of time. Compare the trading software's "equity curve" against your manual table of cumulative profit (or loss) versus time. Are they different?
Attachments
Software ad
Software ad
mechtrade.jpg (18.53 KiB) Viewed 23585 times
Angelo
Roundtable Fellow
Roundtable Fellow
Posts: 90
Joined: Fri Apr 29, 2005 4:31 am
Location: Italy

Post by Angelo »

sluggo wrote: However, my experience with very longterm trendfollowing (approx 0.4 round trip trades per year, in each market) on a 50 market portfolio, mirrors Tim Arnold's remarks. I test what I trade and trade what I test. I use CSI Unfair Advantage to generate my backadjusted continuous contracts and I run my backtests AND my real-money live trading software, off these backadjusted continuous contracts. After a ton of very careful analysis and real time tracking, I am satisfied that they are not producing systematic errors or distortions which cause simulation results to diverge from actual real-life market experience. But hey that's just me. I made my bed and I am sleeping in it. You will need to do the same.

A useful exercise is to gather a dozen individual futures contracts which span a very long term trend (I suggest: copper, 2003 to 2006) and manually calculate the entry point, the rollover points, and the exit point. Figure up the profit or loss on each individual futures contract and make a table of cumulative profit (or loss) versus time. Now create a backadjusted continuous contract and pump it through your trading software for the same stretch of time. Compare the trading software's "equity curve" against your manual table of cumulative profit (or loss) versus time. Are they different?

Hi Tim, Sluggo,

real time experience (as the one you’ve just posted) is invaluable. Thanks.
And – Tim- if my guess about the “software product you useâ€
Last edited by Angelo on Tue Mar 27, 2007 11:38 am, edited 1 time in total.
Forum Mgmnt
Roundtable Knight
Roundtable Knight
Posts: 1842
Joined: Tue Apr 15, 2003 11:02 am
Contact:

Post by Forum Mgmnt »

Angelo,

I don't want to seem rude but it appears to me that you did not actually go through the process of the test that sluggo outlined. Did you actually run the test or did you just make the assumption that you knew the answer without actually performing the steps of the test as sluggo outlined?

I have performed the test that sluggo outlined above in the past and have come up with a different answer than you did. One so different that it forces me to ask the above question of you.

- Forum Mgmnt

P.S. I suggest that you compare just one transition to see what actually happens with a single rollover during the back-adjustment process. You may be surprised.
Angelo
Roundtable Fellow
Roundtable Fellow
Posts: 90
Joined: Fri Apr 29, 2005 4:31 am
Location: Italy

Post by Angelo »

Forum Mgmnt wrote:Angelo,

I don't want to seem rude but it appears to me that you did not actually go through the process of the test that sluggo outlined. Did you actually run the test or did you just make the assumption that you knew the answer without actually performing the steps of the test as sluggo outlined?

I have performed the test that sluggo outlined above in the past and have come up with a different answer than you did. One so different that it forces me to ask the above question of you.

- Forum Mgmnt
Forum Mgmnt,

you are not rude, and I don't want to be neither.
I'm aware that Sluggo kindly share with us his real world experience on more than one subject.

But I also think that not everything needs to be tested.
You can reach some conclusions by the inductive approach (testing) or by the deductive approach (reasoning....).

But, I don't want to over-use your hospitality, so I'm leaving.

Have a nice day.


PS I've just made a real time rollover in a S&P MIB (Italian futures), selling the long march at 40000 at buying June at 39000 circa, due to the dividend effect.
So what?
Last edited by Angelo on Wed Mar 28, 2007 7:35 am, edited 1 time in total.
Jake Carriker
Site Admin
Site Admin
Posts: 1493
Joined: Fri Sep 12, 2003 10:32 am
Location: Austin, Texas

Post by Jake Carriker »

Hi Angelo,

Perhaps you will find some information here that will help you with your question.

If you work a few examples you may come to understand that the gap between the old active contract month and the new active month has no bearing on trading profits within the context of continuous back/forward adjusted price series.

Best,
Jake
AFJ Garner
Roundtable Knight
Roundtable Knight
Posts: 2071
Joined: Fri Apr 25, 2003 3:33 pm
Location: London
Contact:

Post by AFJ Garner »

Assuming you want to back test using actual contract data you still need to work out how to calculate your indicators. Or rather on what data series you will calculate your indicators.

And that can lead to some very different and distorted results if you concatenate contracts without adjusting for the gaps.
Angelo
Roundtable Fellow
Roundtable Fellow
Posts: 90
Joined: Fri Apr 29, 2005 4:31 am
Location: Italy

Post by Angelo »

AFJ Garner wrote:Assuming you want to back test using actual contract data you still need to work out how to calculate your indicators. Or rather on what data series you will calculate your indicators.

And that can lead to some very different and distorted results if you concatenate contracts without adjusting for the gaps.
Hi AFJ,

if someone finds it's no a wasting of time to look into this matter a bit more deeply, one option (among others) would be to reckon the trading signals on the back adjusted data, but calculate the Profit/Loss of the trades on real contracts data, with real rollovers (that is: paying the contango, and cashing the backwardion, when they happened).

Nothing complicated.
Tim Arnold
Site Admin
Site Admin
Posts: 9015
Joined: Tue Apr 06, 2004 1:41 pm
Location: Boston, MA
Contact:

Post by Tim Arnold »

Assuming 4 rolls a year, with present short term interest rates (I assume the present ones in the future, since I've no crystal ball), there is almost a 4% annual difference between performance on back adjusted data (which – by definition – eliminates this gap) and performance you should expect in real trading .
My question is what sort of back adjusted data are you using? With my backadjusted data the gaps are removed. Are you just concatenating the data together without adjusting for spread?

If you string together a series of actual prices for multiple months, then of course you will have large gaps between every month. You can't back test with this sort of data.
Angelo
Roundtable Fellow
Roundtable Fellow
Posts: 90
Joined: Fri Apr 29, 2005 4:31 am
Location: Italy

Post by Angelo »

Tim wrote: My question is what sort of back adjusted data are you using? With my backadjusted data the gaps are removed. Are you just concatenating the data together without adjusting for spread?

If you string together a series of actual prices for multiple months, then of course you will have large gaps between every month. You can't back test with this sort of data.

Hi Tim,

I'm talking about "Point based Back adjusted data (as Stridsman call them on "trading system that work" p. 32-37) or "data adjusted by differences (and not by ratios)"
In my understanding those are the sample data courtesy given with Trading Blox.

The gaps are removed from data when you back adjust, but are not removed from reality.

For example, in the link posted above by Jack Carriker (thaks for your input, Jake) they are talking about a "gap" of 0.60c rolling crude oil

Jack is correct in saying that is not a loss.
But it is not a profit neither, and - unluckily - when you use "Point based back adjusted data" you don't reckon that - in order to roll - you have cashed out not only commission and slippage but also these 0.60 cents per lot.

I don't know how you test. In my testing, I'm not able to account for these 0.60 cents of "added cost" for rolling".

Anyway Tim, I don't really want having other pro's wasting time on a matter they think of scarce importance.

I DO like Trading Blox, even after having on my PC what I consider the best "testing engines" commercially available (including the standard Win version of the main competitor), so - please - don' take this as a critic to your software.

Let's just say, I would like to be able to perform the test suggested by Sluggo and c.f. (that is, looking for differences in results by testing both continous and real data series) NOT by hand but with a commercially available software. End of it.

I apologize for my yesterday's harsh reaction, but was a little annoying to see people reacting as I was just arriving from the moon, when I do know there are other pro's - and not just a "Mister Nobody" from Italy - that don't consider "back adjusted data" the "non plus ultra" solution fo feed a testing engine.
Will76
Senior Member
Senior Member
Posts: 36
Joined: Mon Oct 24, 2005 10:06 am
Location: London

Post by Will76 »

Hi Angelo,

I think you have picked an excellent forum to get clear on back adjusting, i hope that you might keep an open mind in my response.

I rarely post responses on the TB forum, however after reading this thread I recall a time in my trading having some frustration and confusion on back adjusting and how it works, i am guessing based on your responses that you might have misunderstood the comments made, i also notice based purely on your replies that you seem to feel a bit defensive. It would be nice to see this tread end with clarity to help all those who might be unclear on backadjusting.

I wondered if you were aware that when 'back adjusting' this (in my experience) involves changing the entire historical data series to account for the 'difference' in the roll, in this way you "keep the reality" of what actually happens when you roll a contract.

For me personally, I was able to understand the backadjusting process very clearly when I 'manually calculated' a couple of rolls on a single product (like Coffee) and noticed what happens to the historical prices on each roll, also I ntoiced how the P&L is conserved correctly, it takes a couple of minutes but it very useful doing it this way to get clear on the process. you might like to to give it a shot.

All the best !
Jake Carriker
Site Admin
Site Admin
Posts: 1493
Joined: Fri Sep 12, 2003 10:32 am
Location: Austin, Texas

Post by Jake Carriker »

Angelo,

I don't mean to appear argumentative, and I have no kind of dogmatic attachement to backadjusted price series. I don't think you are arriving from the moon. It could be that all of us trying to give assistance are missing the point entirely. What will help immensely is if you can go through the example below and point out any difficulties you see with it. If there is a problem with the example and it somehow leaves out some unseen added costs of rolling, you can point it out and correct the example. That way those of us who are currently confused can correct the error in our thinking. If you can't find an error and you decide that this specific example extends into a general principle, then you get to learn something valuable. Either way, everyone wins. Here is the example:

We have futures market X. There is price data for 4 contract deliveries available for this market. They are June 2006, September 2006, December 2006, and March 2007. Futures market X is very strange in that the price has never changed during the trading life of these contracts. The June contract traded at 1 from inception to expiration. Likewise, the September contract always traded at 2, the Dec at 3, and the March at 4.

We decide that we would like to create a continuous backadjusted series to facilitate our analysis of Market X. We choose to "roll" the contract on the first day of the month prior to the expiration month. Thus, we roll from the June 2006 contract to the September 2006 contract on May 1. We roll from Sep to Dec on August 1, and so on. At each splice point, where we change contract deliveries, we calculate the difference between the price of the old contract and the new contract and add the difference to all previous prices in the series such that the last price of the old contract now equals the first price of the new contract.

Here is how our first rollover works: On May, 1 2006 we switch from the June contract (price = 1) to the September contract (price = 2). Since September trades at a 1 point premium to June, we must add 1 point to all the June prices to "kill the gap" between the old and new prices. So, in our newly created backadjusted price series each price is "2".

When we roll from Sep to Dec on August 1, 2006 we repeat this process. Since the Dec contract trades at 3 and the June is at 2, we need to add another point to each price previous to the December contract when we do the splice. Now every price in the series is "3". As you might imagine, when we roll again into the March 2007 contract the all prices are adjusted again, and now every price in the series is "4".

We now have a continuous backadjusted series that includes all the data from all 4 contract delivieries. We can look at a chart of this series and observe that price never moves once, it is just a flat line at 4. I wonder if this accurately represents the P/L of a position in market X? Let's check...

The trader consults his chart on April 1st, 2006 and decides to buy one contract of the June delivery at 1. He holds the position a while and notices that it is time to roll into the next delivery. At the opening of trading on May 1, 2006, he sells his June contract at 1 and buys the September at 2. Ignoring the frictional costs of trading, we can see that the P/L of the June position is 0. He bought at 1 and sold at 1. Time passes, and the trader notices it is time to roll again. He sells the September contract at 2 and buys the December contract at 3. Just like before, a buy of the September at 2 and a sell at 2 mean the PL for the trade is zero. The same thing occurs on the last roll. The trader sells Dec at 3 and buys March at 4. Sometime in early January the trader tires of waiting for this stupid market to move and liquidates his position, whereupon the market promptly goes to 10 ;)

So, stepping through roll-by-roll and splice-by-splice we see that the backadjusted continuous series exactly represented the experience of the trader trading real life actual contracts. The 1 point gap between each contract did not influence the P/L one bit. In fact, the gap between contracts could have been 10 points and our results wouldn't have changed one iota. There is no "added cost" to rolling regardless of the gap between contracts.

I sincerely hope that this helps.

Jake
Post Reply