contradayOpen the app — free

How to Backtest a Trading Strategy (Step by Step)

A practical checklist for backtesting a strategy on Indian stocks and indices without fooling yourself.

Backtesting runs a set of trading rules on historical data to see how they would have performed. Done carefully it filters out ideas that never worked; done carelessly it produces false confidence.

  1. Write the rules down. Entry, exit, stop-loss, target and position size must be unambiguous.
  2. Avoid look-ahead. Read signals on bar close and trade the next bar’s open.
  3. Include costs. Brokerage, STT, exchange charges and slippage can turn a small edge into a loss.
  4. Use enough data. At least a few years and ideally both rising and falling markets.
  5. Judge the risk, not just the return. Look at max drawdown, Sharpe and the longest losing streak.
  6. Beware of over-optimising. If a result only works with one perfect parameter, it is probably curve fitting. Prefer plateaus where nearby settings also work.
  7. Test out of sample, then paper trade. Reserve a period you did not optimise on, then run the strategy live on paper before risking money.

Backtests are research tools. They never guarantee future results.

Try it yourself: Strategy backtesting — free with a Contraday account.

Keep reading

Last updated 2026-11-29. For education only; not investment advice. Derivatives trading involves substantial risk of loss.