Selecting Time Periods for Backtesting
When people say they want recent data for backtesting, I wonder two things:
1. How do they test longer term strategies using only recent data? Anything involving a 200 day moving average, for example, needs nearly a year of data just to calculate the average. Then it needs multiple years of data to get various signals and see how they play out.
2. How did they do in 2008 relying on anything resembling the recent past of 2003-2007. It seems to me that you need to go back to 2001, at the very least, to find data that represents a crash.
When I selected time periods for backtesting, I looked for a nice long segment that included sideways, up, and down markets. I ultimately decided on May 1994- April 2004 as the core time period for my testing. This includes the tech bubble and the bubble bursting in a double-dip recession. 1994 showed less volatility, and the 1998 crisis broke up the monotony of the rising market.
Added to the core period is the next segment for out-of-sample testing. I read somewhere (sorry, forgot where) that the out-of-sample period should be one-third the length of the initial period. May 2004- April 2007 fit that bill timewise. The market action during this period was flat and upward biased.
Yes, I could detrend the data but I’ve found that approach very unintuitive. If I am testing trend-following strategies, it doesn’t make sense to me to remove the trend. Instead, I do a baseline test using a simple strategy and use it for comparison to supposedly smarter strategies. This approach, and the fact that I apply it during varying market conditions, provides a way to see if a strategy really adds value. A strategy demonstrates “alpha” by doing better than the baseline.
Another note about my time periods. I began my efforts with this data set in May 2007. Hence the time periods run May - April of each year.
My third time period, May 2007 - April 2008 came about because a) it was there, and b) this period is now one-third the previous period, making it the out-of-sample for the out-of-sample data. As it turns out, the market action was again very different, allowing further stress-testing of the strategies. Here again, I think it would be a mistake to focus solely on the carnage of the recent past. Dawn has so far always followed the dark of night.
December 17th, 2008 Filed under Backtesting Set UpTags: backtesting, baseline, data, long, signal, strategy, time period, Volatility







