Backtesting
How far back should you backtest
How much history a test needs depends on trade frequency and on which market conditions have to be covered. Here are the rough numbers and the reasoning.
There are two ways to answer this. One is a number of months. The other is a number of trades and a number of market conditions. The second one is the answer that actually matters, but the first is a useful starting point.
Rough starting points
New Trading give a straightforward set of ranges. For day trading, "3–6 months of intraday data (1-minute or tick charts)". For swing trading, "3–5 years to capture different market conditions". For long term trading, "at least 10 years to account for multiple market cycles" [1].
Use those as a floor, not a target. They are about having enough calendar time to see different markets, not about having enough trades.
The better question is how many trades
Six months means very different things to different traders. If you take four trades a week, six months is about a hundred trades. If you take four a month, it is twenty four, and twenty four is not a test.
So work backwards. Decide how many trades you need, then work out how much calendar time that takes at your frequency. If the answer is four years, that is your answer.
Cover more than one kind of market
Whatever period you pick, it has to include a rising market, a falling one, and a quiet range. Ideally it includes at least one period where volatility spiked.
A strategy tested only through a strong uptrend has learned that price goes up. That works beautifully until it does not.
This is the real reason for the multi year ranges above. It is not that old data is better. It is that a long enough window is the only cheap way to be sure you saw more than one kind of market.
When older data stops helping
There is a limit. Market structure changes. Fifteen year old intraday data comes from a market with different participants, different speeds and different spreads.
For intraday strategies, data older than about five years is worth less than recent data. For longer term ones, older data still carries information because the behaviour it captures is slower moving.
If you have a lot of history, one good approach is to build on the older part and keep the most recent year sealed as your out of sample check.
Sources
- New Trading, "How To Backtest A Trading Strategy: A Step-by-Step Guide". https://www.newtrading.io/backtesting-guide/
ForgeX