Insights Systems

Backtesting a strategy properly: avoiding the four classic traps

31 May 2026 · 8 min read

Share
Illustration for the guide "Backtesting a strategy properly: avoiding the four classic traps" — algorithmic trading code on a dark screen in a server room.
Systems guide: Look-ahead bias, survivorship, over-fitting and unrealistic costs — the errors that make bad systems look brilliant.

Look-ahead bias, survivorship, over-fitting and unrealistic costs — the errors that make bad systems look brilliant.

Key takeaways

  • Include realistic costs and slippage or the test is fiction.
  • Reserve out-of-sample data before you start optimising.
  • Prefer fewer parameters and a longer sample over a perfect curve.

The purpose of a backtest is not to find the best-performing rule set. It is to estimate whether a plausible idea has an edge that survives contact with costs and variance. Optimising until the equity curve looks beautiful achieves the opposite.

Trap one is look-ahead bias: using the day's close to decide a trade taken during that day, or using an adjusted price series that already reflects future corporate actions. It is easy to do accidentally and it inflates results dramatically.

Trap two is survivorship. Testing today's index constituents over ten years quietly excludes every company that failed, which makes almost any long-only rule look good.

Trap three is over-fitting. Every added parameter buys a better historical curve and reduces the probability of live performance. Hold out at least a quarter of your data and never touch it during development.

Trap four is cost realism. Include brokerage, exchange fees, GST, STT, stamp duty and a slippage assumption that reflects the instrument's actual spread. Strategies with a small per-trade edge usually die here — better to learn it in the test than with capital.

Share

Your edge deserves
real capital

Start today from ₹1,499, trade Equity, F&O, Currency or MCX your way, and get paid in rupees on exactly the terms you were shown on day one.

Compare accounts

Trade · Prove · Get Funded — evaluation fee refunded with your first INR payout.