/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, 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: 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.
Related screens
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.