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.
- Start nodeStrategy setupNIFTY · Options1-minute candles
- Condition nodeEntry signalTime is 09:20 or later
- Entry nodeSell CEATM · nearest weekly1 lot
- Entry nodeSell PEATM · nearest weekly1 lot
- Condition nodeExit signalTotal P&L ≤ −₹2,000OR time is 15:10
- Exit nodeExit both legsCE and PE together
- Square off nodeSquare off5 min before closecloses anything open
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
Show every day as a table
| Date | Exit | Before charges | After charges | Running total |
|---|---|---|---|---|
| 20 Jul | 15:10 | ₹2,746 | ₹2,623 | ₹2,623 |
| 21 Jul | 15:10 | ₹2,048 | ₹1,939 | ₹4,562 |
| 22 Jul | 12:38 | −₹2,054 | −₹2,198 | ₹2,364 |
| 23 Jul | 15:10 | ₹1,420 | ₹1,284 | ₹3,648 |
| 24 Jul | 15:10 | ₹1,482 | ₹1,349 | ₹4,997 |
| 27 Jul | 15:10 | ₹533 | ₹413 | ₹5,409 |
| 28 Jul | 15:10 | ₹107 | −₹1 | ₹5,408 |
| 29 Jul | 15:10 | ₹566 | ₹429 | ₹5,838 |
| 30 Jul | 15:10 | ₹1,089 | ₹958 | ₹6,795 |
| 31 Jul | 15:10 | ₹1,069 | ₹945 | ₹7,741 |
| 3 Aug | 15:10 | ₹790 | ₹675 | ₹8,416 |
| 4 Aug | 12:00 | −₹2,015 | −₹2,125 | ₹6,291 |
| 5 Aug | 10:31 | −₹2,122 | −₹2,259 | ₹4,033 |
| 6 Aug | 11:29 | −₹2,025 | −₹2,159 | ₹1,873 |
| 7 Aug | 15:10 | ₹2,077 | ₹1,944 | ₹3,817 |
| 10 Aug | 15:10 | ₹2,603 | ₹2,480 | ₹6,297 |
| 11 Aug | 15:10 | ₹4,976 | ₹4,863 | ₹11,160 |
| 12 Aug | 15:10 | ₹2,018 | ₹1,881 | ₹13,042 |
| 13 Aug | 15:10 | ₹1,017 | ₹887 | ₹13,929 |
| 14 Aug | 15:10 | ₹62 | −₹63 | ₹13,866 |
| 17 Aug | 15:10 | −₹286 | −₹401 | ₹13,465 |
| 18 Aug | 15:10 | ₹2,226 | ₹2,120 | ₹15,585 |
| 19 Aug | 15:10 | ₹1,635 | ₹1,501 | ₹17,086 |
| 20 Aug | 12:51 | −₹2,096 | −₹2,223 | ₹14,863 |
| 21 Aug | 15:10 | ₹692 | ₹571 | ₹15,435 |
| 24 Aug | 11:31 | −₹2,252 | −₹2,367 | ₹13,068 |
| 25 Aug | 15:10 | ₹767 | ₹660 | ₹13,728 |
| 26 Aug | 15:10 | ₹1,027 | ₹896 | ₹14,624 |
| 27 Aug | 15:10 | ₹309 | ₹183 | ₹14,807 |
| 28 Aug | 10:15 | −₹2,061 | −₹2,187 | ₹12,619 |
| 31 Aug | 11:56 | −₹2,012 | −₹2,129 | ₹10,490 |
| 1 Sept | 11:29 | −₹2,031 | −₹2,140 | ₹8,350 |
| 2 Sept | 15:10 | ₹484 | ₹346 | ₹8,696 |
| 3 Sept | 15:10 | ₹549 | ₹421 | ₹9,116 |
| 4 Sept | 15:10 | ₹1,281 | ₹1,156 | ₹10,272 |
| 7 Sept | 15:10 | ₹377 | ₹261 | ₹10,533 |
| 8 Sept | 15:10 | ₹1,027 | ₹918 | ₹11,451 |
| 9 Sept | 15:10 | ₹1,524 | ₹1,389 | ₹12,840 |
| 10 Sept | 15:10 | ₹1,706 | ₹1,577 | ₹14,417 |
| 11 Sept | 11:14 | −₹2,012 | −₹2,139 | ₹12,277 |
| 15 Sept | 09:52 | −₹2,022 | −₹2,134 | ₹10,144 |
| 16 Sept | 15:10 | ₹1,017 | ₹873 | ₹11,017 |
| 17 Sept | 15:10 | ₹2,145 | ₹2,010 | ₹13,027 |
| 18 Sept | 15:10 | ₹2,126 | ₹1,998 | ₹15,025 |
| 21 Sept | 15:10 | ₹969 | ₹851 | ₹15,876 |
| 22 Sept | 11:56 | −₹2,090 | −₹2,201 | ₹13,675 |
| 23 Sept | 15:10 | ₹1,677 | ₹1,546 | ₹15,221 |
| 24 Sept | 13:27 | −₹2,018 | −₹2,149 | ₹13,072 |
| 25 Sept | 14:04 | −₹2,366 | −₹2,499 | ₹10,574 |
| 28 Sept | 14:18 | −₹2,054 | −₹2,177 | ₹8,397 |
| 29 Sept | 09:36 | −₹2,025 | −₹2,140 | ₹6,257 |
| 30 Sept | 15:10 | ₹2,499 | ₹2,357 | ₹8,614 |
| 1 Oct | 12:46 | −₹2,005 | −₹2,141 | ₹6,473 |
| 5 Oct | 12:08 | −₹2,080 | −₹2,206 | ₹4,267 |
| 6 Oct | 15:10 | ₹1,069 | ₹956 | ₹5,223 |
| 7 Oct | 15:10 | ₹2,649 | ₹2,507 | ₹7,729 |
| 8 Oct | 11:25 | −₹2,265 | −₹2,402 | ₹5,327 |
| 9 Oct | 09:38 | −₹2,015 | −₹2,151 | ₹3,177 |
| 12 Oct | 10:29 | −₹2,035 | −₹2,159 | ₹1,018 |
| 13 Oct | 09:55 | −₹2,031 | −₹2,148 | −₹1,130 |
| 14 Oct | 15:10 | ₹1,196 | ₹1,055 | −₹75 |
| 15 Oct | 10:00 | −₹2,015 | −₹2,151 | −₹2,226 |
| 16 Oct | 10:19 | −₹2,025 | −₹2,158 | −₹4,385 |
| 19 Oct | 09:26 | −₹2,184 | −₹2,300 | −₹6,685 |
| Brokerage | ₹5,120 | ₹20 × 256 orders |
| STT | ₹1,267 | 0.15% on the sell side |
| GST | ₹1,030 | 18% on brokerage and exchange charges |
| Exchange charge | ₹600 | on premium turnover |
| Stamp duty | ₹25 | on 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?
Can I run this same backtest myself?
How are charges calculated?
Does the stop-loss work the same in live trading?
Related
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.