Risk management · 1 Nov 2026 · 5 min read
8 Backtesting Mistakes That Make Strategies Look Better Than They Are
A backtest shows how a rule would have performed on past data, but small mistakes can make a weak idea look excellent. Learn the eight most common traps, from overfitting to ignoring costs, and how to avoid them.
What a backtest can and cannot do
A backtest applies a fixed set of rules to historical prices and records the trades that would have happened. Done well, it answers a useful question: did this rule have an edge in the past, and how bad did the losing periods get?
It cannot promise future results. Markets change, and the past contains luck. The goal is not to find a perfect equity curve but to find rules that are simple, sensible and robust enough to deserve further testing with virtual money.
1. Lookahead bias
Using information that would not have been available at the time of the trade. A classic example is buying at the day's open because the day's close was above a moving average; at the open you could not have known the close.
Fix: make sure signals are calculated on completed candles and orders execute on the next candle. Good backtesters enforce this automatically.
2. Overfitting (curve fitting)
Tuning parameters until the past looks perfect: RSI 13 instead of 14, a stop of 2.3% instead of 2%, a filter that only removes three bad trades. The result describes the past noise rather than a real pattern.
Fix: prefer round, common settings; check that nearby settings give similar results; keep rules few. If changing RSI 14 to 15 destroys the result, the edge was probably luck.
3. Ignoring costs and slippage
Brokerage, STT, exchange fees, GST, stamp duty and the gap between the expected and actual fill price add up, especially for strategies that trade often with small targets. Many intraday ideas that look good before costs are negative after them.
Fix: include realistic charges in every test and assume some slippage on stop-loss exits.
4. Too few trades
Ten trades with a 70% win rate say almost nothing; random chance can easily produce that. Results become more meaningful with many trades across different market conditions.
Fix: test over several years and many stocks. Look at the number of trades before looking at the profit.
5. Survivorship bias
Testing only on stocks that exist in an index today ignores companies that were removed after falling sharply or delisting. The test universe is quietly filled with winners.
Fix: be aware of it, prefer broad lists, and treat results on today's index members as somewhat optimistic.
6. Testing on one market phase
A trend-following rule tested only in a strong bull run will look brilliant; a mean-reversion rule tested only in a sideways year will too. Neither tells you how the rule behaves when conditions change.
Fix: test across rising, falling and sideways periods, and split the data: build on one period, then check on another you did not use for tuning (out-of-sample testing).
7. Looking only at total return
Total return hides the journey. A strategy that made 40% but had a 35% drawdown along the way would be very hard to follow in real life.
Fix: also check maximum drawdown, the longest losing streak, win rate, average win versus average loss, and how long the strategy spent below its previous peak.
8. Changing the rules after seeing the result
Every time you adjust a rule because of what the backtest showed, you use up some of the data's honesty. Do it enough times and you will always find something that worked on that data.
Fix: write the idea down before testing, limit the number of variations, and keep a final check on unused data or forward-test with paper trading before trusting it.
From backtest to live: forward testing
A backtest that survives all eight checks is still only evidence about the past. The next step is a forward test: run the exact rules on live data with virtual money for a few weeks or months and compare the results with the backtest.
Expect the live results to be somewhat worse: fills are not perfect, the market regime may differ, and you might hesitate on signals. If live results are wildly different, find out why before going further. A strategy you cannot follow consistently in paper trading will not become easier with real money.
A worked example of an honest test
Idea, written before testing: buy NIFTY 50 stocks when the 20-day EMA crosses above the 50-day EMA on the daily chart, exit on the reverse cross, with a 6% stop-loss. Test it on 2 years of data for all 50 stocks with charges on, then on a different 2-year period without changing anything.
Suppose the first period shows 140 trades, a 42% win rate, average win 2.1 times the average loss, and a 14% maximum drawdown, and the second period is weaker but still positive. That is a modest, plausible edge worth forward testing with paper money for a few months. If the second period had been sharply negative, the honest conclusion would be that the first result was mostly the market phase.
Backtest on iTradeChart
The no-code strategy builder lets you write rules with 85+ indicators and candle patterns, then backtest over 3 months to 5 years on up to 10 stocks. Signals use completed candles and orders fill on the next candle's open, charges are included by default, and results show win rate, drawdown, trades on the chart and an equity curve.
Once a rule holds up, deploy it in paper mode to see how it behaves on live data before ever considering real money.
Key takeaways
- Backtests describe the past; they do not promise the future.
- Avoid lookahead bias by acting on the next candle after a completed signal.
- Prefer simple rules and check that nearby settings give similar results.
- Always include charges and test many trades across different market phases.
- Check drawdown and losing streaks, not just total return.
Live prices, virtual money, no sign-up needed.
Questions
What is overfitting in trading?
Tuning a strategy so closely to past data that it captures random noise rather than a real pattern, so it fails on new data.
How many trades does a backtest need?
There is no fixed number, but dozens are a minimum and a hundred or more across different periods is much more convincing.
What is out-of-sample testing?
Checking a strategy on data that was not used to design or tune it.
Can I backtest without coding?
Yes. iTradeChart's strategy builder lets you build rules and backtest them without writing code.
For education only. Examples use made-up numbers. Nothing here is investment advice or a recommendation to buy or sell any security.
