OptionDesk

Your first options backtest, step by step

How to backtest an options strategy: run a NIFTY short strangle, 1 Jan to 30 Apr 2025, on OptionDesk in three steps, then read P&L, drawdown, exits and costs.

Updated 2026-11-28 · 6 min read

On this page
  1. What are we testing?
  2. How do I run it?
  3. What did it report?
  4. Which three cards should I read first?
  5. How much did costs matter?
  6. What does changing one thing do?
  7. What do beginners get wrong?
  8. Next step

A backtest replays one rule on every past session in a date range and tells you what it would have earned after costs. On OptionDesk you set it in three steps on /backtest: instrument and timing, the legs, and the period. This guide runs one on a real window and reads the result.

Projected, not advice. Every rupee figure below is a hypothetical result from archived NSE data, not a recommendation and not indicative of future results. Every trade is sized at today's lot size.

The options backtester in three steps, set to NIFTY, 1 Jan to 30 Apr 2025, short strangle. The options backtester in three steps, set to NIFTY, 1 Jan to 30 Apr 2025, short strangle.

What are we testing?

One structure, one rule, one window. The structure is a NIFTY short strangle: sell a call and a put, each two strikes from the money. The rule is to open at 09:20 IST and close at 15:15 IST the same session, with the whole position closed early if it loses 30% of the premium collected. The window is 1 Jan to 30 Apr 2025, 81 sessions.

That is an illustration of the controls, not a suggestion to trade it.

How do I run it?

  1. Open /backtest and read step 1, Instrument & timing. Leave Underlying on NIFTY. Entry is 09:20 and exit 15:15 (IST). Holding stays on Intraday, so every position closes the same day. Leave Only within and Days to trade as they are, which means every weekday and any days to expiry.
  2. Step 2, Strategy. Click Short Strangle under Start from. Two sold legs appear, one call and one put, at ATM+2 and ATM−2, each on the nearest weekly expiry (Wk 0). A strike step is the gap between listed strikes, so the same "ATM+2" is a different distance on different indices.
  3. Check the folded rows. Advanced says nothing is on. Position risk reads "30% stop of the net premium at entry". Scaling in and out reads one entry, one exit. Costs reads 0.25% a leg, ₹20 an order, statutory charges on. Leave all four.
  4. Step 3, Backtest period. Set From to 2025-01-01 and To to 2025-04-30. Leave Lots at 1. The pickers are bounded by the sessions the archive holds for NIFTY, so you cannot pick a date it lacks.
  5. Press Run backtest. A running result streams in. Press Stop if you need to cancel, and the screen reports exactly how far it got.

A finished run: headline numbers after costs, with the header that restates what ran. A finished run: headline numbers after costs, with the header that restates what ran.

What did it report?

Read the header line before any number. It states how many of the requested sessions were covered, the costs and slippage charged, the lot sizes used, the resolved legs and the fill rule. If the header surprises you, the result will too.

For this run, in a hypothetical backtest, the screen showed:

Reading Value What it tells you
Trades 81 One per session, 100% of sessions covered
Net P&L (after costs) +₹34,994 After ₹9,277 of brokerage and statutory charges and ₹4,321 of slippage
Win rate 51.9% 95% interval 41.1% to 62.4%, so "about half" is the honest reading
Max drawdown −₹24,542 Worst peak-to-trough fall of closed trades
Profit factor 1.36 Gross wins over gross losses
Worst intraday MTM −₹7,475 The deepest open-position loss at any minute
Longest losing run 6 trades The streak you would have had to sit through

The result is positive, and the drawdown is about 70% of the profit. Both facts belong in the same sentence.

Which three cards should I read first?

How trades ended. In this run 45 trades ended on TIME, held to 15:15, and 36 ended on STOP, the 30% position stop. If a rule you set never appears here, it did not run.

P&L by month. January +₹29,395, February +₹13,845, March −₹9,887, April +₹1,641. Four buckets of about twenty trades each is a hint of regimes, not proof of them.

Where trades landed. The distribution shows the tail. Best single trade was +₹10,985 and the worst −₹5,312.

How much did costs matter?

Run the same window twice more. With brokerage and statutory charges switched off but slippage on, the screen reported +₹44,271. With both off, +₹51,672. In this window friction took ₹16,678 of the ₹51,672 frictionless figure, about 32%. That gap is the reason Costs is on by default.

What does changing one thing do?

Change one control and run again. In the same hypothetical window:

Change Net P&L Max drawdown
As above, strangle ATM±2 +₹34,994 −₹24,542
Strikes widened to ATM±3 +₹35,124 −₹16,406
Short straddle at the money +₹16,885 −₹35,975
ATM±2 with no stop +₹46,693 −₹27,407

Removing the stop raised the profit and also the worst intraday loss, from −₹7,475 to −₹25,365. Neither row is "better". They are different trade-offs, which is why stop-loss and target has its own guide.

What do beginners get wrong?

  • Reading net P&L alone. Read drawdown, worst intraday MTM and the losing run beside it.
  • Turning costs off to see the strategy "clean". That is a market with no spread and no tax.
  • Testing one window and stopping. Eighty-one sessions is one slice. Widen the dates, then see common backtesting mistakes.
  • Changing five things at once. You cannot tell which one moved the result.
  • Forgetting that a profitable run is still hypothetical. Tax, margin shortfall, rejected orders and your own decisions are not modelled.

Next step

Open /backtest and repeat the run with your own dates. Change one control, run again, and read the exit mix first. Then read what every metric means.

Common questions

How do I run my first options backtest on OptionDesk?
Open /backtest, pick the index, set an entry and exit time, click a template such as Short Strangle, set the From and To dates and press Run backtest. The engine replays the structure on every session in the window against real 1-minute option candles, with brokerage, statutory charges and slippage on by default.
How long does a backtest take?
It depends on the window and on how busy the archive is. A four-month intraday run is typically seconds to a few minutes, and the screen streams a running result with a Stop button so you can cancel. Walk-forward searches take far longer because each one is many backtests.
What does the default form test?
A short straddle on NIFTY, entry 09:20, exit 15:15 IST, intraday, with a 30% stop on the whole position, ₹20 an order brokerage and 0.25% slippage per leg. Those are hypothetical starting values for you to change, not a recommended setup, and not indicative of future results.
Which date range should my first backtest use?
Use a window long enough for at least 30 trades, because below that the screen withholds max drawdown and profit factor. A few months of daily entries clears that bar. A longer window shows more than one market mood, and the date pickers are limited to the sessions the archive holds for that index.
Why is my backtest result different from a friend's on another platform?
Fill rule, slippage, charges, lot size and which expiry is traded all change the number. OptionDesk fills at the open of the minute, charges slippage against you on every leg and side, applies statutory charges at the rate in force on each date, and sizes every trade at today's lot size.
Does a profitable first backtest mean the strategy works?
No. It means one rule made money on one window in the archive. The result is hypothetical, ignores things such as tax and margin calls, and should be checked on other windows and against the reliability checklist before it is believed.

Disclosures

  • Not investment advice. OptionDesk provides tools, analytics, backtesting and education for NSE F&O only. It is not a SEBI-registered Investment Adviser or Research Analyst, and does not provide investment advice, buy/sell calls, tips or trade execution. You place every order yourself, through your own broker.
  • Projected, not promised. Every projected figure — payoffs, max profit/loss, probability of profit, target-date P&L and similar estimates — is “projected, not advice.” Backtested and simulated results are hypothetical, do not represent actual trading, and are not indicative of future results.
  • Delayed market data. Market data shown on OptionDesk is delayed by approximately one minute — it is not a live feed. It is provided for analysis and education only, and must not be relied on for time-sensitive execution.
  • F&O risk. Trading in futures & options carries a high risk of loss and is not suitable for every investor. Consider your objectives and risk tolerance, and seek independent advice where appropriate.

More in Start here