OptionDesk

How to Backtest an Option Strategy on OptionDesk

A walk through /backtest in three steps: instrument and timing, the legs, and the period. What each control does and how to read the net-of-costs result.

Updated 2026-11-28 · 7 min read

On this page
  1. What does this screen do?
  2. How do you run one?
  3. Which expiry does a leg trade?
  4. What do the numbers mean?
  5. A worked example
  6. What mistakes do traders make?
  7. Related screens
  8. Next step

/backtest is OptionDesk's options backtester: build a multi-leg structure on NIFTY or another underlying the archive holds, set its rules, and run it against real 1-minute option history to see the net result after costs. This page walks through the three steps on the screen and what each output number is telling you.

Every rupee figure on this page is hypothetical. It comes from backtested runs on historical NSE data, projected, not advice, and not indicative of future results. Every trade is sized at today's lot size.

The options backtester in three steps: instrument and timing, the legs, and the period, with Advanced, Position risk, Scaling and Costs folded between them. The options backtester in three steps, set to NIFTY, 1 Jan to 30 Apr 2025, short strangle.

What does this screen do?

/backtest answers one question: how would this exact structure, with these exact rules, have performed on real NSE option prices, after brokerage, statutory charges and slippage? It replays the strategy across every qualifying session in a date range, fills each leg against the actual traded candle, and reports what happened. It is not a payoff calculator.

It is also not the simulator at /backtest/simulator, which runs one session by hand, nor Paper Trades, which keeps a ledger of legs you record. Which tool to use when compares them. If you have never run one, start with your first backtest, step by step.

How do you run one?

Step 1, Instrument & timing. Pick the underlying: the list shows what the 1-minute archive holds, which includes the major indices and F&O stocks. Set Entry and Exit in IST. Holding is Intraday (closes the same day) or Hold to expiry (one position per expiry cycle, carried to expiry day). Only within limits entries to a days-to-expiry band, where 0 means expiry day only. Days to trade limits the weekdays a position may open.

Step 2, Strategy. Start from a template (Short Straddle, Short Strangle, Iron Condor, Iron Fly or Long Straddle), then edit. Each leg row has BUY or SELL, lots, a strike rule, CE or PE, its own expiry (Wk 0 is the nearest weekly, Mth 0 the nearest monthly) and its own SL% and TP% on that leg's premium. The strike rule is one of eight, explained in strike selection. Add leg builds up to 8. Duplicate copies a leg to the next free strike.

The four folded rows. Each shows its current setting and an Edit link.

  • Advanced. Per-leg trailing stop, exit all legs when one fires, move the other leg's stop to cost, re-entry of a leg, and re-execution of the whole structure. See re-entry and re-execute vs re-entry.
  • Position risk. One stop and one target on the whole structure, as a percentage of the net premium at entry or a rupee amount. The form opens with a 30% stop on, so read this row before you read a result.
  • Scaling in and out. Add lots later in the session, or book lots early at a profit level.
  • Costs. Slippage mode and value, brokerage mode and value. Statutory charges are not editable. See costs and slippage.

Step 3, Backtest period. Set From and To, Lots from 1 to 50, and press Run backtest. The pickers stop at the first and last session the archive holds for that underlying. A Stop button cancels a run and the screen reports how far it got.

Which expiry does a leg trade?

A weekly slot resolves out of the archive, not a calendar. Weekly contracts on BankNifty, FinNifty and MidcpNifty were discontinued in November 2024, so a Wk 0 leg on those indices in a later window trades the nearest monthly, and the result header says "no weekly contracts in this window". NIFTY weeklies continue. Lot sizes also change over time, so every trade is sized at today's lot size and the whole window is on one basis; premiums are per unit.

What do the numbers mean?

A completed run. The header states sessions covered, costs, slippage, lot sizes, resolved legs and fill rule before you read an output number. A completed run: headline numbers after costs, with the header that restates what ran.

The header restates what ran: sessions covered, total costs and slippage, lot sizes, the resolved legs, the fill rule, and the median stop in rupees. Read it first.

Net P&L (after costs) is already net of brokerage, statutory charges and slippage. Win rate is the share of trades that closed positive, with a 95% interval. Max drawdown is the worst peak-to-trough fall of closed trades, withheld under 30 trades. Avg ROI / trade is a per-trade return on the largest margin blocked. Below the headline sit the equity curve, P&L by weekday, by leg and by month, How trades ended, Where trades landed, a Monte Carlo panel and the trade log. Backtest metrics and the result cards define each.

A worked example

NIFTY, 1 Jan to 30 Apr 2025, 81 sessions, 1 lot, entry 09:20 exit 15:15 IST, a 30% position stop, brokerage ₹20 an order, slippage 0.25% of premium a leg, statutory charges at the rate in force on each date. All figures below are projected, not advice, from a historical simulation:

Strategy Trades Net P&L Win rate Max drawdown Profit factor Costs Slippage
Short straddle (ATM) 81 +₹16,885 55.6% -₹35,975 1.13 ₹10,088 ₹6,507
Short strangle (ATM±2) 81 +₹34,994 51.9% -₹24,542 1.36 ₹9,277 ₹4,321
Short strangle (ATM±3) 81 +₹35,124 51.9% -₹16,406 1.44 ₹8,990 ₹3,515
Iron condor (short ±1, long ±3) 81 -₹1,10,492 7.4% -₹1,10,492 0.03 ₹18,634 ₹9,026

The wider strangle gave up nothing in profit here and carried a much shallower drawdown. The straddle made less than half of either strangle and sat in a drawdown more than twice its profit. These are one window, so read the ranking as an example of how to compare, not as a ranking of strategies.

Switching brokerage and statutory charges off on the ATM±2 strangle moves the result from +₹34,994 to +₹44,271. Switching slippage off as well gives +₹51,672. Friction took ₹16,678 of that, about 32%, which is why Costs defaults to on.

The iron condor is the exception, and it is worth reading rather than skipping. A defined-risk four-leg structure's own maximum loss is small relative to how much its mark-to-market swings intraday, so a 30% position stop, the same rule applied to every row here, fired on 71 of the 81 sessions before the position could revert. That is what How trades ended shows for this row: exits overwhelmingly by stop, not by time. The fix is not "don't trade iron condors". It is matching the Position risk rule to the structure, which is a setting on this screen, not a reason to distrust the tool.

What mistakes do traders make?

Leaving the default 30% position stop on without noticing. It is a rule, and it fired on 36 of the 81 trades in the strangle run above. Read Position risk and How trades ended.

Reading net P&L without max drawdown. The straddle's profit was less than half of its drawdown.

Turning costs off "just to see". A number with Costs off is a different, unrealistic run.

Testing one window. Eighty-one sessions is one slice. Widen From and To, and read common backtesting mistakes.

Weekly legs on a monthly-only index. After November 2024 a BankNifty weekly leg is a monthly leg. Read the expiry note in the header.

Indicator backtest, simulator, portfolio backtest, My strategies.

Next step

Open /backtest, keep Costs on, and change one control at a time, reading How trades ended after each run.

Common questions

What does the OptionDesk backtester actually do?
It runs a multi-leg option strategy, up to 8 legs, against real 1-minute historical option candles on the index or F&O stock you pick. Every entry and exit fills against the actual minute, and brokerage, statutory charges and slippage are subtracted. It reports net P&L, win rate, drawdown and a full trade log for the window you choose.
Does the backtester include brokerage and slippage by default?
Yes. Costs defaults to 0.25% slippage per leg, ₹20 an order brokerage and statutory charges at the rate in force on each trade date. In one hypothetical backtest of a NIFTY short strangle over 81 sessions, switching brokerage and statutory charges off changed the result from +₹34,994 to +₹44,271. Backtested figures are hypothetical, do not represent actual trading, and are not indicative of future results. Every trade is sized at today's lot size.
How many legs can I build in a strategy on /backtest?
Up to 8 leg rows, each with its own buy or sell side, lots, strike rule, option type, expiry, stop-loss percent and target percent. The strike rule is steps from the money, percent of spot, a premium target or a delta target. You can start from a template such as short straddle, short strangle, iron condor, iron fly or long straddle and edit the legs.
Can I backtest BankNifty weekly expiry strategies on this screen?
Not for windows after November 2024, because BankNifty weekly contracts were discontinued then. A weekly leg on BankNifty in a later window resolves to the nearest monthly expiry and the result header says so. For earlier windows the archive holds weekly contracts, and each leg can pick its own expiry.
How far back does the option data on /backtest go?
The From and To pickers are bounded by the sessions the archive holds for the underlying you select, at 1-minute resolution, so read the limits on the screen. When this guide was updated on 27 Nov 2026 the NIFTY picker ran from 2 Aug 2018 to 25 Aug 2026. The candles are real traded prices, not interpolated.
Can a position stop make a defined-risk structure like an iron condor lose almost every trade?
It can. A stop sized as a percentage of a small net premium can be hit by ordinary minute-to-minute swings. In one hypothetical OptionDesk backtest, a NIFTY iron condor with shorts one strike out and longs three out, over 81 sessions, 1 lot, with brokerage, statutory charges and slippage modelled, hit a 30% position stop on 71 of 81 trades. It produced a 7.4% win rate and a −₹1,10,492 result. Backtested results are hypothetical, do not represent actual trading, and are not indicative of future results.

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 Test