Worked example

How to backtest a NIFTY options strategy — a real short straddle, start to finish

This page follows one options strategy from a plain idea to a backtest result. Nothing here is made up: the numbers are TradeLayout's own backtest output for 20 Jul 2026 to 19 Oct 2026, with every charge added.

The result is a loss after charges. We show it anyway, because that is the point of a backtest — to find out before real money does.

Read the docs
The strategy as built on the canvas
  1. Start node
    Strategy setup
    NIFTY · Options
    1-minute candles
  2. Condition node
    Entry signal
    Time is 09:20 or later
  3. Entry node
    Sell CE
    ATM · nearest weekly
    1 lot
  4. Entry node
    Sell PE
    ATM · nearest weekly
    1 lot
  5. Condition node
    Exit signal
    Total P&L ≤ −₹2,000
    OR time is 15:10
  6. Exit node
    Exit both legs
    CE and PE together
  7. Square off node
    Square off
    5 min before close
    closes anything open
Seven nodes. This is the exact strategy that was backtested, not a sketch.

1. The idea, in plain words

“At 09:20, sell the at-the-money NIFTY call and put of the nearest weekly expiry. If NIFTY stays in a range, both premiums shrink and I keep the difference. If the combined loss reaches ₹2,000, exit both. Otherwise exit at 15:10.”

This is a short straddle — one of the most common intraday options ideas in India. It earns when the market is quiet and loses when it moves sharply in either direction.

2. Build it on the canvas

Each part of the idea becomes one node:

  • Strategy setup — NIFTY options, 1-minute candles
  • Entry signal — time is 09:20 or later
  • Entry — sell 1 lot ATM CE, nearest weekly expiry
  • Entry — sell 1 lot ATM PE, same expiry
  • Exit signal — total P&L at or below −₹2,000, OR time is 15:10
  • Exit — close both legs together
  • Square-off — closes anything still open 5 minutes before the market closes

The ATM strike is picked from the contracts listed at 09:20 each day, and “nearest weekly” follows the real expiry calendar — so the same strategy works every week without editing. See the options strategy builder for every strike and expiry choice.

3. Run the backtest

  • Period: 20 Jul 2026 – 19 Oct 2026 (64 trading days)
  • Data: tick-level NIFTY options prices — the stop is checked on every price change
  • Size: 1 lot (65 quantity) per leg, 128 trades in total
  • Fills: at the market price at that moment; slippage not added
  • Charges: brokerage ₹20 per order, STT, exchange charge, SEBI fee, stamp duty and GST at current NSE rates

4. The result

Before charges

+₹1,359

Charges

₹8,044

256 orders

After charges

−₹6,685

Profit / loss days

36 / 28

after charges

Best day

+₹4,863

Worst day

−₹2,499

Biggest fall from a peak

₹23,772

running total, after charges

Days ended by

25 / 39

the ₹2,000 stop / 15:10 exit

Running total, 1 lot, 20 Jul – 19 Oct 2026

  • After charges
  • Before charges
−₹10,000₹0₹10,000₹20,000₹30,000JulAugSeptOctBefore ₹1,359After −₹6,685
Show every day as a table
DateExitBefore chargesAfter chargesRunning total
20 Jul15:10₹2,746₹2,623₹2,623
21 Jul15:10₹2,048₹1,939₹4,562
22 Jul12:38−₹2,054−₹2,198₹2,364
23 Jul15:10₹1,420₹1,284₹3,648
24 Jul15:10₹1,482₹1,349₹4,997
27 Jul15:10₹533₹413₹5,409
28 Jul15:10₹107−₹1₹5,408
29 Jul15:10₹566₹429₹5,838
30 Jul15:10₹1,089₹958₹6,795
31 Jul15:10₹1,069₹945₹7,741
3 Aug15:10₹790₹675₹8,416
4 Aug12:00−₹2,015−₹2,125₹6,291
5 Aug10:31−₹2,122−₹2,259₹4,033
6 Aug11:29−₹2,025−₹2,159₹1,873
7 Aug15:10₹2,077₹1,944₹3,817
10 Aug15:10₹2,603₹2,480₹6,297
11 Aug15:10₹4,976₹4,863₹11,160
12 Aug15:10₹2,018₹1,881₹13,042
13 Aug15:10₹1,017₹887₹13,929
14 Aug15:10₹62−₹63₹13,866
17 Aug15:10−₹286−₹401₹13,465
18 Aug15:10₹2,226₹2,120₹15,585
19 Aug15:10₹1,635₹1,501₹17,086
20 Aug12:51−₹2,096−₹2,223₹14,863
21 Aug15:10₹692₹571₹15,435
24 Aug11:31−₹2,252−₹2,367₹13,068
25 Aug15:10₹767₹660₹13,728
26 Aug15:10₹1,027₹896₹14,624
27 Aug15:10₹309₹183₹14,807
28 Aug10:15−₹2,061−₹2,187₹12,619
31 Aug11:56−₹2,012−₹2,129₹10,490
1 Sept11:29−₹2,031−₹2,140₹8,350
2 Sept15:10₹484₹346₹8,696
3 Sept15:10₹549₹421₹9,116
4 Sept15:10₹1,281₹1,156₹10,272
7 Sept15:10₹377₹261₹10,533
8 Sept15:10₹1,027₹918₹11,451
9 Sept15:10₹1,524₹1,389₹12,840
10 Sept15:10₹1,706₹1,577₹14,417
11 Sept11:14−₹2,012−₹2,139₹12,277
15 Sept09:52−₹2,022−₹2,134₹10,144
16 Sept15:10₹1,017₹873₹11,017
17 Sept15:10₹2,145₹2,010₹13,027
18 Sept15:10₹2,126₹1,998₹15,025
21 Sept15:10₹969₹851₹15,876
22 Sept11:56−₹2,090−₹2,201₹13,675
23 Sept15:10₹1,677₹1,546₹15,221
24 Sept13:27−₹2,018−₹2,149₹13,072
25 Sept14:04−₹2,366−₹2,499₹10,574
28 Sept14:18−₹2,054−₹2,177₹8,397
29 Sept09:36−₹2,025−₹2,140₹6,257
30 Sept15:10₹2,499₹2,357₹8,614
1 Oct12:46−₹2,005−₹2,141₹6,473
5 Oct12:08−₹2,080−₹2,206₹4,267
6 Oct15:10₹1,069₹956₹5,223
7 Oct15:10₹2,649₹2,507₹7,729
8 Oct11:25−₹2,265−₹2,402₹5,327
9 Oct09:38−₹2,015−₹2,151₹3,177
12 Oct10:29−₹2,035−₹2,159₹1,018
13 Oct09:55−₹2,031−₹2,148−₹1,130
14 Oct15:10₹1,196₹1,055−₹75
15 Oct10:00−₹2,015−₹2,151−₹2,226
16 Oct10:19−₹2,025−₹2,158−₹4,385
19 Oct09:26−₹2,184−₹2,300−₹6,685
Where the ₹8,044 of charges went
Brokerage₹5,120₹20 × 256 orders
STT₹1,2670.15% on the sell side
GST₹1,03018% on brokerage and exchange charges
Exchange charge₹600on premium turnover
Stamp duty₹25on the buy side
SEBI fee₹2

5. What the result tells you

The edge was smaller than the costs. Before charges the strategy made +₹1,359. Brokerage alone was ₹5,120 — 256 orders at ₹20 each. With one lot, a flat per-order fee is a big share of a small profit. More profit days than loss days (36 vs 28) did not help, because the loss days were bigger.

A stop is not an exact price. The ₹2,000 stop was hit on 25 days, but the exits landed between −₹2,005 and −₹2,366: the stop is checked on each price change, and on fast days the price jumps past the level before the exit fills. Live trading behaves the same way, often with extra slippage.

Three months is one market mood. A quiet or a trending quarter can flip this result. Before trusting any strategy, backtest it over a longer period and different market phases — TradeLayout has NIFTY options data from January 2024.

What to try next, each a small change on the canvas: a wider stop, entering later, skipping expiry day with a days-to-expiry check, or more lots so the flat brokerage is a smaller share.

6. Then paper trade it on live prices

A backtest tells you how the idea did in the past. Paper trading runs the very same strategy on today's live prices with no real money, so you can watch entries, stops and exits as they happen. Only after that would you connect a broker and go live — see paper and live trading.

Current limitations

What this does not do today, so you can decide before you sign up:

  • Past results do not predict future results. This is one strategy over one three-month period.
  • Slippage is not included; live fills, especially on stop days, can be worse.
  • Charges use ₹20 per order brokerage and current NSE rates; your broker may charge differently.
  • This is an educational example, not a recommendation to trade this strategy.

Questions

Why did it lose money with more profit days than loss days?

Because the average loss day was bigger than the average profit day, and charges of ₹8,044 were larger than the +₹1,359 made before charges.

Can I run this same backtest myself?

Yes. Build the seven nodes shown above on the canvas (or describe the idea to the AI assistant), choose the dates, and run the backtest. You can then change the stop or the entry time and compare.

How are charges calculated?

Every trade is priced with brokerage, STT, exchange charge, SEBI fee, stamp duty and GST for its date. The backtest report lets you switch charges and slippage on and off.

Does the stop-loss work the same in live trading?

The same strategy runs in backtest, paper and live trading, and the stop is checked on every price change in all three. Live exits can fill a little worse than the backtest because of slippage.

Try it on your own idea

Sign up free, build the strategy on the canvas, and backtest it before you connect a broker. Trading involves risk of loss; a backtest is not a promise of future results — see the risk disclaimer.

See pricing