A backtest is a hypothesis wearing the costume of evidence. It shows you an equity curve, a win rate, a Sharpe — and four specific mistakes let almost any idea produce a curve that never survives a live market. None of the four throws an error. Each quietly flatters the result, and the more of them a backtest ignores, the better the past looks. If your backtest hasn't survived all four, it isn't evidence yet. It's a hypothesis.
Lie 1 — Look-ahead: using information you didn't have yet
Look-ahead bias is acting on data that wasn't available at the moment you claim to have acted. The commonest version is subtle: your signal is “close crosses above the 20-EMA”, and your backtest enters at that same close. But you only know the close after the candle has finished — by which point the price is gone. Enter on the next bar's open, not the signal bar's close.
It hides in quieter places too: using a day's high or low to decide an intraday entry, using earnings or index-revision data stamped with the announcement date rather than when it was actually published, or normalising a whole series (min-max, z-scores) with statistics computed over the full period — including the future. Look-ahead produces the most beautiful curves of all, because a strategy that can see even one bar ahead is nearly unbeatable. When a backtest looks too good, this is the first thing to suspect.
Lie 2 — Survivorship: testing only on what's still here
Survivorship bias is building your test universe from the names that exist today and quietly dropping the ones that didn't make it. Backtest a stock strategy on the current NIFTY 50 and you're testing companies that were successful enough to still be in the index — the failures that were removed never enter the sample, so any “buy quality” rule looks brilliant.
In options it wears a different mask. A dataset that begins “in 2023” has already discarded every contract that expired before then, and a premium-selling test with only clean-data strikes can silently skip the violent expiries where short options blew up. The rule: test on the universe as it was on each historical date — delistings, index changes and expired contracts included — not the survivors' roster you can see now.
Lie 3 — Ignoring costs: the drag that doesn't bend the curve
Costs are the lie that survives longest, because they don't change the shape of the equity curve — they just lower it, by an amount most people never subtract. On an Indian options trade that's STT on the sell side, brokerage per order (not per trade), exchange charges plus 18% GST, and the two costs no statement shows: slippage and impact.
They multiply on exactly the strategies traders like most — multi-leg, high-frequency, small-edge. A four-leg structure entered and exited is up to eight orders, each paying the spread. A gross “winner” can be break-even after per-leg STT and slippage, and a loser once impact on the illiquid wings is honest. The full cost stack, with a worked example, is in what an options trade really costs in India — and you can watch it happen to a live setup in the 5 EMA post-mortem.
Lie 4 — Curve-fitting: tuning the past until it looks perfect
Curve-fitting (overfitting) is optimising a strategy's parameters on the same data you then judge it on. Try enough moving-average lengths, stop distances and entry filters and one combination will fit the historical noise almost perfectly — and describe nothing about the future. The tell is fragility: change the fast EMA from 9 to 10 and the “edge” collapses. A robust rule degrades gracefully as you nudge its parameters; a curve-fit one falls off a cliff.
The only real defence is out-of-sample discipline — hold back a slice of history you never look at while building, and test the finished strategy on it exactly once. If you peeked, it isn't out-of-sample anymore. The same arithmetic that makes small samples untrustworthy is in why 77% over 31 trades means almost nothing.
Why it takes all four
These are independent failure modes — a strategy can be clean on three and die on the fourth. A perfectly cost-modelled, out-of-sample-tested strategy is still worthless if it entered on the signal bar's close. A look-ahead-free, cheaply-traded strategy is still a mirage if it was tuned to death. That is why “my backtest is profitable” is the start of the question, not the answer. Profitable after look-ahead is removed, on a survivor-free universe, net of real costs, on data it never saw — that is a result worth a second look. Anything less is a hypothesis.
A checklist you can run today
Before you trust any backtest — yours or anyone else's:
- Look-ahead: does every entry use only information available before the entry bar? Enter on the next bar, never the signal bar's close.
- Survivorship: was the universe the one that existed on each historical date — delistings, index changes and expiries included — not today's survivors?
- Costs: are STT (sell-side, per leg), brokerage per order and a realistic slippage all applied and shown?
- Curve-fitting: does the edge survive small changes to its parameters, and was it tested once on data held back from the build?
- Re-read the result net of all four. If the edge doesn't survive, it was never an edge.
Where this is built in
Algoshastra treats a backtest as guilty until proven innocent. Orders fill on the correct bar, costs — STT per leg, brokerage per order, slippage — are applied and itemised by default, and every verdict states the exact window it was tested on and the sample it was built from, so a small, one-regime, gross-P&L “winner” gets labelled for what it is. You describe a strategy in plain English and get a verdict with the reasoning attached — including the honest “not enough evidence.” For the full quant treatment, see the honest backtest guide.
Common questions
What is look-ahead bias in backtesting?
Look-ahead bias is using information in a backtest that would not have been available at the moment you claim to have acted. The commonest form is entering a trade at the same candle's close that produced the signal — you only know that close after the bar has finished, so the price is already gone. Other forms include using a day's high or low to make an intraday decision, using revised or announcement-dated data, or scaling a series with statistics computed over the whole period, including the future. It produces the most flattering equity curves because a strategy that can see even one bar ahead is nearly unbeatable. The fix is to act on the next bar's open, using only data available before it.
What is survivorship bias in a trading backtest?
Survivorship bias is building the test universe from instruments that still exist today and silently dropping the ones that didn't make it. Backtesting a stock strategy on the current NIFTY 50 tests only companies successful enough to remain in the index — the removed failures never enter the sample, so 'buy quality' rules look brilliant. In options it appears when a dataset that starts in a recent year has already discarded every contract that expired earlier. The correct approach is to test on the universe as it existed on each historical date — delistings, index changes and expired contracts included — not the survivors' roster visible now.
What is curve-fitting or overfitting a strategy?
Curve-fitting (overfitting) is optimising a strategy's parameters on the same data you then use to judge it. Try enough combinations of moving-average lengths, stop distances and filters and one will fit the historical noise almost perfectly while describing nothing about the future. The tell is fragility: if changing a fast moving average from 9 to 10 collapses the 'edge', it was fitted to the past, not discovered in it. The defence is out-of-sample testing — hold back a slice of history you never look at while building, and test the finished strategy on it exactly once.
How do I know if a backtest is reliable?
Check it against four independent failure modes before trusting the number. One: no look-ahead — every entry uses only information available before the entry bar. Two: no survivorship — the universe is the one that existed on each historical date, not today's survivors. Three: real costs — STT on the sell side per leg, brokerage per order, and a realistic slippage are all applied and shown. Four: no curve-fitting — the edge survives small parameter changes and was tested once on held-back data. A result that survives all four, on a large enough sample spanning different market regimes, is worth a second look. Anything less is a hypothesis, not evidence.
Read next
The honest frame
Investment in securities market are subject to market risks. Read all the related documents carefully before investing.
Backtested results are hypothetical, do not represent actual trading, and are not indicative of future results. This article is educational and is not investment advice or a recommendation; Algoshastra is a strategy-building and testing tool, not a registered investment adviser or research analyst. Past or backtested performance does not guarantee future returns.