Free trial
Menu
Learn guide

Avoid Common Errors in Strategy Backtesting

Most backtests that look good fail live, and the reasons repeat. The test used information that was not available at the time, it ignored costs, it was tuned to the data it was tested on, or it covered too few trades to mean anything. This guide lists the common backtesting mistakes, how to spot each one in a report and how to avoid it.

QuantPower Research · Updated 3 Nov 2026 · 7 min read

1. Look-ahead bias

The strategy uses data that was not known at the moment of the trade. Examples: entering at the open on a signal calculated from the close of the same day; using a candle's high as the entry price when the entry rule depends on the close; using adjusted data that reflects later corporate actions.

How to spot it: results that are too good, especially win rates above 70% with large average wins, and a strategy that performs much worse in paper trading.

How to avoid it: evaluate rules only on closed candles, enter at the next candle's open or at a price the market actually offered after the signal, and check how your platform aligns data. Our guide to look-ahead bias has the detail.

2. Ignoring costs and slippage

The backtest assumes fills at the last traded price with no charges. Live, every trade pays brokerage, STT, exchange charges and GST, and fills at the bid or ask rather than the mid price. On Nifty options, a round trip costs ₹60 to ₹100 in charges per lot before slippage, and slippage on a market order in a less liquid strike can be several rupees per unit.

How to spot it: a strategy with many trades and a small average profit per trade. If the average gain is ₹400 per lot and costs are ₹200, half the edge is an illusion.

How to avoid it: include charges from the brokerage calculator and a slippage assumption of at least one tick per leg, more for options. Rerun the test with double the slippage and see whether the strategy survives.

3. Overfitting

The rules and parameters were chosen because they produced the best result on this data. With enough parameters, any price history can be fitted. The fitted strategy learned the noise, which will not repeat.

How to spot it: many parameters, unusual settings such as RSI(11) or a 37-period average, a sharp drop in performance when a parameter is moved slightly, and a Sharpe ratio above 2.

How to avoid it: fewer parameters, standard settings, and a check that neighbouring settings also work. Our guide to avoiding overfitting covers the methods.

4. No out-of-sample test

The strategy was designed and tested on the same period. Even without deliberate tuning, choosing rules by looking at a chart is a form of fitting.

How to spot it: a single backtest period with no split between design and verification.

How to avoid it: design on one period and test on another the strategy has never seen, or use walk-forward testing, which repeats the split across rolling windows.

5. Too few trades

Thirty trades over two years cannot distinguish skill from luck. A coin-flip strategy wins 18 or more of 30 trades (60% or better) about 18% of the time, nearly one time in five.

How to spot it: a trade count below 100, or a result dominated by a handful of large wins.

How to avoid it: test over a longer period or more instruments, and treat strategies with fewer than 100 trades as hypotheses rather than results.

6. Survivorship bias

The test used only instruments that exist today. Stocks that were delisted, merged or dropped from an index are missing, so a strategy that buys weak stocks looks better than it was, because the ones that went to zero are not in the data.

How to spot it: a stock-selection strategy tested on today's Nifty 50 or F&O list, applied to past years.

How to avoid it: use point-in-time index constituents, or restrict the test to index derivatives where the problem does not arise.

7. Wrong or incomplete data

Options data with missing strikes, candles with bad ticks, unadjusted stock prices around splits, or expiry dates that do not match the exchange calendar. Options backtests are especially sensitive: the right expiry, the right strike selection rule and the right lot size at the time all affect the result.

How to spot it: trades at impossible prices, results that change when the data source changes, and lot sizes or expiry days that do not match the period.

How to avoid it: check the data provider's handling of expiries and corporate actions, remove or cap outlier ticks, and verify a sample of trades against the exchange's historical data. Note that Nifty's weekly expiry moved to Tuesday in September 2025 and its lot size changed to 65 in January 2026; a test spanning those dates must reflect them.

8. Unrealistic fills

Limit orders in the backtest fill whenever the price touches the limit, and stop losses fill exactly at the trigger. Live, a limit order at the price touched may not fill if there is queue ahead of it, and stops fill at the next available price, which in a fast market can be far away.

How to spot it: backtests with no losing trade larger than the planned stop.

How to avoid it: require the price to trade through a limit by a tick before counting a fill, and model stop-loss fills with slippage. Our guide to order types explains how real orders behave.

9. Ignoring margin and position limits

The backtest trades a fixed number of lots regardless of margin. Live, the margin required for short options rises on expiry day, after a volatile session and when SPAN parameters change. A strategy that holds ten lots in the test may be unable to hold five on the day that matters.

How to spot it: position sizes that never change, and no margin figure in the report.

How to avoid it: check the peak margin the strategy would have needed with the F&O margin calculator, and size to the margin available on the worst day, not the average.

10. Testing one market regime

A strategy tested only on 2023 and 2024 has not seen a sharp fall or a volatility spike. Short-option strategies look excellent in quiet years and lose years of gains in weeks like March 2020 or June 2024.

How to spot it: a test period shorter than three years, or one without a drawdown in the index of at least 10%.

How to avoid it: include periods with different volatility, and look at performance by year rather than the total.

11. Changing the rules mid-test

Looking at the results, adjusting a rule to remove the worst trades, and rerunning. Each cycle fits the strategy more closely to this data. This is overfitting by hand.

How to avoid it: write the rules down before the test, count every rerun, and keep a final out-of-sample period untouched until the design is finished.

12. Trusting the summary metrics alone

A total return and a win rate hide the shape of the result. One large trade can account for most of the profit; a long flat period can hide in a rising three-year curve.

How to avoid it: read the equity curve, the drawdown chart, the distribution of trade results and the performance by year. Our guide to backtest performance metrics explains what each number means.

The twelve backtesting mistakes grouped into five families, with how to spot each family in a report (illustration)

A checklist before trusting a backtest

  1. Signals use only data available at the time, on closed candles.
  2. Charges and slippage are included, and the strategy survives doubling the slippage.
  3. Parameters are few and standard, and neighbouring settings also work.
  4. The strategy was tested on data it was not designed on.
  5. At least 100 trades, across at least three years and more than one market regime.
  6. The data is complete and correct for expiries, strikes, lot sizes and corporate actions.
  7. Fills are modelled conservatively.
  8. Margin on the worst day fits the capital.
  9. The equity curve and yearly results have been read, not just the totals.
  10. The next step is paper trading, not live trading.

QuantPower's backtesting engine includes charges and lets you set slippage, and its reports show the equity curve, drawdown and trade list so that these checks can be made.

Start your free trial

Connect your broker, build a strategy and test it on paper before a single live order goes out.

Frequently asked questions

Why does my strategy work in backtesting but not in live trading?

Usually one of: look-ahead bias in the test, costs and slippage not included, overfitting to the test period, or fills modelled too kindly. Paper trading for a few weeks shows which.

How much slippage should I assume in a backtest?

At least one tick per leg for liquid index options and futures, and more for stock options and far strikes. Then double it and check the strategy still works.

How long should a backtest be?

At least three years, including a period when the index fell sharply or volatility spiked. For strategies that trade rarely, longer.

What is a realistic backtest return?

For a retail options or futures strategy after costs, a CAGR in the low double digits with a drawdown under 20% is good. Backtests showing 50% a year with small drawdowns almost always contain one of the mistakes above.

Can backtesting guarantee future profits?

No. A clean backtest shows that the rules had an edge in the past. It does not show that the conditions behind the edge will continue.

Backtested results are hypothetical and do not represent actual trading. Trading involves substantial risk; this page is for education and is not investment advice.