Tutorials & guides › Backtesting
How to backtest a Nifty short straddle without code
The short straddle is the most tested intraday options strategy in India: sell the at-the-money call and put in the morning and buy them back cheaper later in the day. This guide builds one step by step, explains every choice, and shows what to look for in the results before you trust it with money.
What a short straddle is
A straddle is a call and a put at the same strike. Selling both at the at-the-money (ATM) strike collects two premiums. The position makes money when the index stays near that strike, because both options lose value as time passes (time decay, or theta), and loses money when the index moves far in either direction.
Intraday sellers usually enter after the opening volatility settles, protect each leg with a stop loss, and close everything before the end of the session. The questions a backtest answers are the ones that decide whether the idea works: which entry time, how wide a stop, whether a profit target helps, and what is left after charges and slippage.
Build it in the Backtester
- Choose the underlying. Start a new strategy and pick Nifty 50 with Weekly options. Leave entries per day at 1 for now.
- Add the entry condition. Under Entry, add a rule with the Time keyword: Time is at or above 09:20. Rules are checked on the candle that has just closed, and the order fills at the open of the next minute.
- Add the two legs. Sell 1 lot of the ATM call and sell 1 lot of the ATM put, each with a 30% stop loss. For a sold option, a 30% stop closes that leg when its price rises 30% above where it was sold. The other leg stays open.
- Add a profit exit. Under Exit, use Set P&L % of entry at or above 50. This closes both legs once half the premium collected has been earned.
- Close by the end of the day. Keep the strategy intraday with everything closed by 15:15.
- Set costs and run. Choose a period (a year is a good start), enter your brokerage per order and a realistic slippage, and run the backtest.
The plain-English summary above the Run button should read like your idea. If it doesn't, the rules aren't what you meant: fix them before reading any results.
The choices that matter most
Entry time
Entering at 09:20 collects the most premium but sits through the most volatile part of the day. Later entries (10:00, 11:00) collect less but often see fewer stop-outs. Test a few times rather than guessing, and check the time you pick on a period you didn't choose it on.
Stop loss width
Tight stops (15–20%) are hit often on ordinary noise, and every stop-out locks in a loss on one leg. Wide stops (40–50%) are hit rarely but cost more when they are. Look at the stop-out count and the average loss per stop in the trade list, not just the total.
Expiry day or every day
Premiums decay fastest close to expiry, and many sellers trade only on expiry day or the day before. Add an Is expiry day condition to test that version against trading every day.
Re-entry after a stop
Some traders re-sell the stopped leg once the market settles. Raise entries per day above 1 and set a wait after an exit to test it; re-entry usually raises both the profit and the drawdown, so compare both.
Costs and slippage
A straddle trades four orders a day (two to open, two to close, more if a leg is stopped), so costs add up quickly. Statutory charges (STT, exchange transaction charges, SEBI fees, stamp duty and GST) apply whatever your broker charges; brokerage depends on your broker. Our guide to option trading charges in India explains each one and how the rates have changed.
Slippage is the gap between the price you expect and the price you get. For liquid ATM Nifty options it is small but not zero; half a point to a point a fill is a reasonable start. A strategy that only works with zero slippage doesn't really work.
Reading the results
- Net P&L after costs, not before. The report shows both.
- Maximum drawdown: the deepest fall from a peak. Ask whether you could sit through it.
- Monthly returns: a strategy that made all its money in two months is fragile.
- The worst days: open them on the chart and see what happened. Gap moves and trend days are where straddles lose.
- Win rate and profit factor together. Straddles often win most days and lose big on a few; a high win rate with a profit factor near 1 is a warning.
Every trade can be opened on a chart of that day's candles for the index and each leg, with the entry and exit marked and the reason it closed. Check a handful: it's the quickest way to find a rule that doesn't do what you meant.
Next steps
Once the basic version is understood, test one change at a time: a later entry, a wider stop, expiry days only, or a filter such as a range of the put-call ratio. Keep the period the same so the comparisons are fair, and confirm the best version on a period you didn't tune it on.
Try it on years of Indian market data, free to start.
Open the BacktesterMore guides
For education and research, not investment advice. Trading in derivatives carries risk; past results don't guarantee future ones.