Quote from jacksmith:
One common story I had heard about trading system is that,
Successfully backtest for 3 year's data, yet the system blows up in 3 days,
what causes this ?
Thanks.
IMO, the most robust way to backtest a systematic strategy is to do the following. I will give a simple example later to clarify.
1) use a historical data set that is long enough to cover multiple periods of market regimes including bullish, bearish and ranging.
2) select "Training Period (TP)" which is a subset of the data where the market exhibited regime changes. This training period is a rolling subset of data that is used to optimize you system parameters.
3) select an "Out-of-Sample Period (OOSP)" which is also a rolling subset of data. This period is used to backtest using the optimized parameters from step 2.
4) to find parameter, you need to start with the first TP and optimize your parameters. The objective function to maximize can be the cumulative return, the Sharpe Ratio, etc. I personally use the product of the two.
5) to back test, use the optimized parameters from step 4 to trade in OOSP which should start right after the last data used in TP. Log the trading results in OOSP.
6) to complete backtest, you need to repeat steps 4 & 5 after rolling TP subset forward by OOSP.
Here is a simple example:
Lets assume you have ~10 years of daily historical data starting from Jan 2000. Lets also assume that the Training Period (TP) and the Out-of-Sample Period (OOSP) are 3M and 1M respectively. First you start with the first 3M data i.e. Jan-Mar 2000 and optimize/calibrate the parameters to maximize the performance of your model. Then utilize these parameters to trade the month of April (without any further calibration!!!). Log your trading performance for April. Next you need to roll forward your TP by OOSP, i.e., use Feb-April as the new TP to optimize/calibrate parameters and use the new parameters to trade and log the month of May. This procedure requires you to optimize/calibrate 12 times for every year of data and trade only out-of-sample without calibration. The final backtest is now reflected in the log of all your out-of-sample trades. By following this, you avoid curve fitting.
One final check is to repeat the entire procedure but using a different start date. For example choosing your first TP from Jan 15 to April 15 instead. This is essentially like rolling your historical data set forward or backward to make sure your trading strategy is robust irrespective of when your start trading.
I hope this helps.