Before you play a single candle of your backtest, you've already made a decision that can shape the final result: the date your historical range starts. Cherry-picking your backtesting date range means choosing that starting point, without meaning to, in a way that includes or leaves out the stretch of history that suits your strategy best.
A different bias from the two you already know
If you've already read about confirmation bias and hindsight bias, this is the third member of the family. It strikes at a different point in the process:
| Bias | When it strikes | What it distorts |
|---|---|---|
| Date range cherry-picking | Before you start, when you choose the dates | The entire backtest at once |
| Hindsight bias | During the replay, trade by trade | Each individual entry decision |
| Confirmation bias | Afterward, when you review the results | Your explanation of why it worked |
A perfect journal, free of hindsight and confirmation bias, is still worthless if the date range was biased from the start.
See plansHow it sneaks in without you noticing
It's almost never deliberate. It hides in decisions that sound perfectly reasonable at the time:
- Choosing "the last 2 years" because it's a convenient range to practice on, without noticing it lines up with a strong, sustained uptrend in that instrument.
- Skipping a specific stretch "because the market was acting weird those months." That's usually a way of quietly excluding the period where your strategy would have failed the most.
- Stopping the backtest just before a recent losing streak you already know by heart because you traded through it.
- Testing the strategy on two or three different ranges "to compare," and ending up, without meaning to, with the one that gave the best result.
An example with the same strategy
Here's the same breakout strategy (one that enters when price breaks out of a sideways range), tested over two different periods of the same currency pair:
| Range chosen | Market context | Resulting win rate |
|---|---|---|
| Last 18 months (chosen "just because") | Strong, sustained directional trend | 58% |
| Last 5 years (range set in advance) | Includes sideways ranges and high-volatility stretches | 39% |
Both results are real. Neither one is "wrong" as far as the data goes. The problem starts when you pick the 18-month range after seeing that it performs better, instead of setting it as your rule beforehand.
Set the range for your backtesting session before you see a single result. Your rule decides the range, not the outcome.
See plansA routine for choosing an unbiased range
- Define your rule before you see any results. For example, "all available history" or "the last 5 full years," never "the stretch that looks best."
- Deliberately include difficult periods: high volatility, trends against you, long sideways ranges. A strategy that only works in easy conditions isn't a robust strategy.
- If you need to widen the range, write down why. Widening it once with an objective rule is reasonable. Widening it several times until the result improves is not.
- Pair this with a large enough sample. An unbiased range that's too short still won't give you statistical significance, meaning confidence that your results aren't just luck.
Frequently asked questions
- Is this the same as confirmation bias?
- No. Confirmation bias happens after the backtest, when you review your results and pay more attention to the winners. This bias happens before you play a single candle, when you choose which stretch of history to test your strategy on.
- Is it the same as hindsight bias?
- No, that's a different one too. Hindsight bias happens trade by trade, when your eyes jump ahead of the current candle. This one affects the whole backtest at once, before you start, when you set the full date range.
- How many years of history should I use at a minimum?
- There's no universal number, but you should fix the rule before you see any results. For example: "the last 5 full years" or "all available history," never "whichever period gave the best result after I tried a few."
- Should I deliberately include crisis periods or high-volatility stretches?
- Yes, if you want to know whether the strategy survives tough conditions. Leaving those periods out because they're "not representative" is exactly the kind of decision this bias dresses up as neutral.
- Can I widen the date range after seeing a bad result?
- You can, but write down the change and why you made it. Widening the range once, using an objective rule (for example, "include all available history"), is reasonable. Widening it again and again until you land on a stretch with better results is cherry-picking.
- Does Trade & Repeat help me choose an unbiased date range?
- The history available for each instrument and timeframe is visible as soon as you choose the range for your replay session. Picking that range with a rule you set in advance, rather than adjusting it after you've seen the result, is still your call.
Keep reading: Confirmation bias in backtesting: why you only review your winning trades · How to keep a backtesting journal without falling into hindsight bias · How many trades you need for your win rate to be statistically significant
Educational content only; it is not financial advice. Trading financial markets involves the risk of losing capital.