Why backtests matter
Backtesting is the process of testing a trading strategy on historical data to estimate how it might have performed. For systematic traders, it is the first filter for whether an idea has any edge at all.
A good backtest can answer practical questions like:
- Does the strategy have positive expectancy?
- How volatile is the equity curve?
- What is the maximum drawdown?
- Does performance survive different market regimes?
A simple expectancy formula is:
Expectancy = (Win Rate × Avg Win) - (Loss Rate × Avg Loss)
If that number is positive after realistic costs, the strategy may be worth further study. But a great backtest is not proof of future profits.
The main reason: markets are not stationary
Historical data is only one sample of the market. The future is influenced by changing volatility, interest rates, liquidity, crowding, and macro conditions.
A strategy that worked from 2017 to 2021 may fail in 2022 if:
- volatility regime changed,
- correlations shifted,
- the market became more trendless,
- transaction costs rose,
- the signal got crowded.
This is why traders often split data into in-sample and out-of-sample periods. A common workflow is:
- Build the strategy on one time window.
- Test it on a later, untouched window.
- Check whether the edge survives.
Walk-forward analysis is even better because it repeatedly re-optimizes on one segment and tests on the next. That helps reveal whether a strategy adapts or only fits one era.
Overfitting: the silent backtest killer
Overfitting happens when a strategy is tuned too closely to historical noise instead of a real market pattern. The more parameters you add, the easier it is to create a beautiful equity curve that does not generalize.
Examples of overfitting include:
- trying 50 indicator combinations and choosing the best one,
- optimizing entry and exit thresholds to the exact decimal,
- using too little data for too many rules,
- selecting only the assets or periods that look best.
A useful rule of thumb: the more degrees of freedom a strategy has, the more skeptical you should be.
If a moving-average crossover works only with a 17/43 pair and fails with 20/50 or 15/40, that is a warning sign. Robust strategies usually perform reasonably across a range of nearby parameters, not just one magic setting.
Backtests often ignore real-world trading frictions
Many backtests look better than live trading because they assume ideal execution. In reality, you face:
- bid-ask spreads,
- commissions,
- slippage,
- order delays,
- partial fills,
- market impact.
For example, a strategy that trades frequently on a 5-minute chart may show a 0.4% average trade profit before costs. If spread and slippage total 0.25% per round trip, most of the edge disappears.
This is especially important for lower-timeframe strategies and less liquid assets. A backtest should include realistic assumptions for:
- spread: often 1 tick or more in liquid markets, wider in volatile periods,
- slippage: a small fixed amount or a percentage of price,
- fees: exchange commissions and financing costs where relevant.
If your edge vanishes after adding costs, the strategy was never truly tradable.
Data quality and lookahead bias
A backtest is only as good as its data. Common problems include:
- survivorship bias: using only stocks that exist today,
- lookahead bias: accidentally using future information,
- bad corporate action adjustments,
- missing delisted symbols,
- inaccurate intraday timestamps.
Lookahead bias is especially dangerous. A classic example is using the day’s close to generate a signal and entering at that same close, even though you would not know the final close until the bar ends.
To avoid this, make sure signals are based only on information available at decision time. If you use daily data, many strategies should execute on the next open or next bar.
A high win rate is not enough
Many beginners assume a strategy with a 70% win rate must be strong. Not necessarily. If average losses are much larger than average wins, the strategy can still lose money.
What matters is distribution, not just win rate.
A strategy with:
- 70% wins at +0.5R,
- 30% losses at -2.0R,
has negative expectancy:
0.70 × 0.5R - 0.30 × 2.0R = 0.35R - 0.60R = -0.25R
Here, R is the amount risked per trade. This is why you should review average win, average loss, profit factor, and drawdown together.
Regime shifts can break a valid edge
Some strategies depend on a specific market environment. For example:
- trend-following systems often struggle in choppy ranges,
- mean-reversion systems can fail during strong directional moves,
- volatility breakout systems may underperform when volatility compresses.
A macro regime tracker can help you see whether a strategy is being tested in the type of environment where it is supposed to work. If a system only succeeds in one narrow regime, its live performance may be unstable.
How to stress-test a backtest
Before trusting a strategy, test how fragile it is.
Useful checks include:
- increase fees and slippage by 25% to 100%,
- test on a different asset universe,
- shorten and lengthen indicator periods slightly,
- split the sample into multiple market regimes,
- test on out-of-sample data only,
- compare daily, weekly, and intraday behavior.
A robust strategy should not collapse from small changes. If tiny parameter tweaks destroy performance, the edge is likely weak or accidental.
Practical takeaway
A great backtest is a starting point, not a guarantee. The goal is not to find the prettiest equity curve; it is to find a strategy that survives realistic costs, different regimes, and unseen data.
A disciplined workflow is:
- Define the idea clearly.
- Backtest with realistic costs.
- Check for overfitting and bias.
- Validate out of sample.
- Paper trade before risking capital.
That process does not eliminate risk, but it greatly improves the odds that a strategy is based on something real rather than historical luck.
Educational content only, not financial advice.