AITOS Trade GuidesPlansGet started

Home › Guides

How to Backtest an Intraday Trading Strategy (Without Fooling Yourself)

Updated · 3 min read · AITOS Trade research team

A backtest replays a trading rule over historical data to see how it would have behaved. Done carefully, it is the fastest way to reject a bad idea. Done carelessly, it produces a beautiful equity curve that falls apart the moment real money is involved.

This guide covers the steps and the traps, using Indian index intraday trading as the example.

1. Start with a precise, testable rule

"Buy NIFTY when momentum is strong" cannot be backtested. "Buy the at-the-money NIFTY call at the close of the first 15-minute candle if it closes above the previous day's high; exit at a 25% premium stop or 15:15, whichever comes first" can.

Write down entry, exit, stop, position size, trading hours and which days are excluded before you look at results.

2. Use clean data and know its limits

  • Filter off-session prints. Raw 1-minute feeds often contain prints outside 09:15–15:30 IST and special or mock sessions that never traded normally. Leaving them in creates fake signals.
  • Handle expiry changes. Weekly expiry days have shifted over the years; a rule built around one weekday may not apply across the whole history.
  • Know what is missing. Most retail historical data has no bid/ask spread. If your data lacks spreads, you must model them conservatively — never assume you trade at the last price.

3. Model every cost

Intraday options strategies trade often, so costs decide whether a strategy survives. Include brokerage, STT (raised on F&O from 1 April 2026), exchange transaction charges, SEBI fees, stamp duty, GST and slippage. Our cost guide shows how they add up.

A strategy that only works with zero costs does not work.

4. Avoid look-ahead bias

Look-ahead bias means using information that would not have been available at decision time. Common forms:

  • Using a candle's close to enter during that candle.
  • Using the day's high or low before the day is over.
  • Selecting stocks using today's index constituents for a test that starts years ago.

Every input to a decision must carry a timestamp earlier than the decision.

5. Beware overfitting

If you try 200 parameter combinations, some will look excellent by pure chance. The more you tune, the more your backtest describes the past noise rather than a repeatable edge.

Practical defences:

  • Limit the number of variants you test and count them.
  • Prefer simple rules with few parameters.
  • Correct for multiple testing (for example with a false-discovery-rate control) before believing any "winner".

6. Use walk-forward and out-of-sample testing

Split history into rolling windows: choose parameters on one window (in-sample), then test them untouched on the next (out-of-sample), and repeat across the whole period. Only the out-of-sample results count.

In our own five-year walk-forward research on Indian index intraday data, every one of 120 strategy variants was rejected out of sample once realistic costs were included. That is a normal outcome, not a failure of the method: a rigorous backtest is supposed to reject most ideas.

7. Read the right metrics

Look beyond total profit:

  • Net result after costs, per trade and per day
  • Maximum drawdown and the worst single day
  • Number of trades (small samples are unreliable)
  • Stability across years and market regimes
  • How much of the profit comes from the top few trades

8. Then paper trade it

A backtest that passes still needs forward testing on data it has never seen. See paper trading in India for a realistic routine.

A backtest can show that an idea did not work with confidence. It can never guarantee that an idea will work.

Education only — not investment advice or a recommendation to buy or sell any security. Trading in equity derivatives carries a high risk of loss; SEBI studies show most individual F&O traders lose money. AITOS Trade is not a SEBI-registered investment adviser or research analyst. Past or simulated results do not guarantee future returns.