Introductory offerFree Nifty 50 access until 30 September. Sign up and practise.

Open app
Backtesting & Replay8 min read

How to Backtest an Intraday Strategy on NSE Data

Replay Trader Editorial Team

Educational content for Indian traders on deliberate practice, chart replay, and setup discovery. Not investment advice.

Searching backtest intraday strategy india usually returns code snippets, Excel templates, and suspicious performance screenshots. Discretionary NSE traders need something narrower: a repeatable way to test whether your rules behave sensibly on past sessions — without inventing win rates or pretending costs do not exist.

This is a manual backtest protocol for intraday ideas on NSE cash or index futures charts. Not a promise of edge. Not a stock pick list.

Manual vs coded backtest (pick honestly)

Approach Best for Weak for
Manual chart replay Discretionary rules, skip logic, setup feel Large sample automation
Spreadsheet bar log Simple numeric triggers Complex path-dependent exits
Coded backtest Rule clarity, large N Discretionary nuance, overfitting

Most Indian retail intraday strategies start discretionary. Manual replay backtests fit that stage. Graduate to code only when rules are literally programmable — same entry, same stop, same session filter, no "it depends."

Step 1 — Write the strategy as decisions, not vibes

Before touching data:

SETUP:     What must be true? (e.g. first 15-min range defined)
TRIGGER:   What exact event enters? (e.g. 5-min close above range high)
FILTER:    When auto-skip? (e.g. gap > X%, illiquid symbol, after 14:45)
STOP:      Structural invalidation (not "when it feels wrong")
TARGET:    Planned exit logic (time stop, level, opposite signal)
SIZE:      Fixed practice size only — no martingale in backtest

If any line needs "market sense," you are not ready to backtest — you are ready to practise classification until rules tighten.

Step 2 — Define NSE session scope

NSE regular session: approximately 9:15–15:30 IST.

Decide explicitly:

  • Entry window: e.g. 9:30–14:00 only
  • Forced flat: e.g. no new entries after 14:45
  • Pre-open use: Do gaps before 9:15 matter to your rule?
  • Expiry handling: Separate tag for index expiry sessions?

Session filters prevent your backtest from secretly relying on last-hour moves you would never trade live.

Step 3 — Choose instruments and timeframe

For practice backtests:

  • Liquid symbols only — index futures or large-cap cash names you could theoretically exit. Illiquid backtests teach liquidity fiction.
  • One timeframe frozen — decision timeframe only.
  • No mid-backtest symbol hopping — completes twenty sessions on one universe before switching.

Step 4 — Build a blind sample

Minimum honest design:

  • 20+ sessions you have not memorised
  • Random or hidden dates where possible
  • Candle-by-candle decisions in trigger zones
  • Holdout block: last 5–10 sessions use rules frozen from earlier review — no edits

Do not report "win rate." Report process metrics: filter skip count, rule violations, average planned vs impulsive entries.

Step 5 — Log costs with humility

Indian intraday costs matter: brokerage, STT, exchange charges, GST, slippage. Exact numbers vary by broker and product.

For manual backtests:

  • Apply a rough friction haircut per round trip you document as assumption — not as precise truth.
  • Tag trades where spread would have blocked the entry on a thin name.
  • Never backtest with zero friction unless the goal is purely structural learning.

Humility here prevents a pretty replay equity curve from becoming a live margin call.

Step 6 — Review for failure modes, not hero charts

After the sample, ask:

Question Bad sign
Did rules change mid-sample? Curve-fitting by hand
Are all "wins" from one regime tag? Strategy is really one day type
Did skips dominate? Setup may be too rare or filters too tight
Did I peek at dates? Memory backtest
Would I take every logged entry live at size? Execution doubt means log is fiction

Strengths you might find: consistent skip discipline, cleaner entries on one regime tag, fewer impulsive opens. Those are process wins — not profit guarantees.

Step 7 — Walk forward one edit

Allow one rule change based on holdout review. Run a fresh holdout block. Stop. Endless tweaking on the same data is optimisation theatre.

What this backtest cannot tell you

  • Tomorrow's headline risk
  • Emotional sizing under drawdown
  • Broker API failures, partial fills, mobile lag
  • Whether your edge survives crowding

Historical intraday backtest on NSE data is decision rehearsal under constraints — not a licence to size up.

Sample log row (illustrative)

Field Example
Date Hidden until after
Symbol Liquid index chart (practice only)
Setup ORB break long
Filter skip Y/N
Entry Y/N
Rule violation Y/N
Friction assumed Rough round-trip note
Failure mode tag false_break / none

One row per candidate decision — not per session story. After twenty rows, pivot tables beat narrative review.

Discretionary vs rule clarity checkpoint

Before expanding sample size, ask: Could another trader replicate my entries from the written rules alone? If no, you are not backtesting yet — you are doing unstructured replay. Tighten rules until replication is possible, even if that shrinks trade count. Small honest samples beat large fictional ones.

Bridge to chart replay

Steps 4–6 are chart replay work wearing a spreadsheet hat. If you want randomised NSE days, hidden dates, and a default candle-by-candle loop so the backtest stays blind, Replay Trader aligns with that design — setup discovery through reps, not performance marketing.

For deeper manual methods, see how to backtest a trading strategy manually.

Educational note

This is educational content for trading practice. It is not investment advice, not a recommendation to buy or sell any security, and not a promise of profits. Practice results do not guarantee live results.