Guides › NIFTY options

Backtest NIFTY option strategies on minute data

NIFTY is the most traded index option in the world, and most option sellers in India start with it. Candleback replays NIFTY weekly and monthly options minute by minute from 2019, so you can see how a rule would have behaved through quiet weeks, gap openings, budget days and expiry-day swings.

What you can test

Every leg is set without code. Pick the expiry, the strike, the side and the lots, then add the exits.

  • Strikes by distance from ATM, by premium (for example the strike closest to ₹50) or by an indicator
  • Weekly, next-weekly and monthly expiries, on the expiry days NSE used at the time
  • Stop loss and target per leg in points or percent, trailing stops and move-to-cost
  • Re-entries after a stop loss or target, with a limit on how many
  • An overall profit and loss stop for the whole position, and a fixed exit time

Results you can check

Each run gives the equity curve, drawdown, a month-by-month heatmap, win rate, expectancy and every single trade with its entry and exit prices. Brokerage, STT, exchange charges, stamp duty and GST are worked out per order, so the net profit is what would have reached your account.

Open any trade to see the minute it was entered and why it was closed. If a number looks too good, you can find the exact day that made it.

How the prices are used

Entries and exits use the option's own 1-minute candles, not a price worked out from the index. A stop loss is checked against each minute's high and low, so a spike that would have hit your stop is counted even if the minute closed back below it.

Expiry days follow the changes NSE made over the years, such as NIFTY's move from Thursday to Tuesday, and move earlier when the expiry day is a holiday.

Questions

How far back does the NIFTY option data go?

Minute option candles go back to 2019. The NIFTY index itself goes back to 2012, for strategies that trade the index or its futures.

Are charges included?

Brokerage, STT, exchange fees, SEBI fees, stamp duty and GST are included on every order, so the net profit is what would have reached your account. Fills are at the candle price, with no extra slippage, so leave room for worse fills when you trade it live.

Can I test a strategy that enters at 9:20 and exits at 3:15?

Yes. Entry and exit times are set to the minute, and you can also enter on a condition such as an indicator crossing.

Does a good backtest mean the strategy will make money?

A backtest replays past prices. It shows how a rule would have done, not how it will do, and trading can lose money.

Related guides

  • Backtest BANKNIFTY option strategies: Backtest BANKNIFTY option strategies on 1-minute data from 2019, with expiry changes, stop losses, re-entries and full charges per trade.
  • Backtest a short straddle the way you would trade it: Backtest a short straddle on NIFTY, BANKNIFTY or SENSEX. Test entry times, per-leg stop losses, move-to-cost and re-entries, with charges included.
  • Backtest the 9:20 straddle: Backtest the 9:20 short straddle on minute data: ATM call and put sold at 9:20 with a stop loss per leg. See every trade, the drawdown and the net profit.
  • Backtest an iron condor: Backtest iron condors on NIFTY, BANKNIFTY and SENSEX. Choose wings by distance or premium, add stop losses and adjustments, and see the result after charges.

Start free, no card needed