← Blog

Backtesting options strategies in India

Every backtest looks good. That's what they're for. The real question is what the result had to survive before it reached you — and most of the ones you'll be shown have survived nothing at all.

Backtesting options strategies in India

The data question comes first

Two people run the same strategy and get results a world apart. Nobody's lying. They just fed it different data — and that argument was settled before a single line of strategy logic ran.

Real traded prices, not modelled ones. A backtest can either use the prices at which options actually changed hands, or reconstruct them from a pricing model given a volatility assumption. The second is far easier to build and produces results that cannot be achieved, because it prices every strike as though it were liquid and quotes a spread of zero. Deep out-of-the-money strikes near expiry are where this diverges most, and they are exactly where many strategies place their legs.

Granularity has to match the rule. A strategy that enters at 09:20 and stops out intraday cannot be evaluated on daily bars. One-minute data is the practical floor for Indian index option strategies; anything coarser silently smooths away the moves the stop was written to catch.

The contract has to exist. Weekly expiries list and delist continuously, and a test that quietly substitutes a nearby strike when the intended one has no data is reporting a strategy you did not describe.

Measure returns against margin, not notional

This single choice changes more numbers than any other, and it is frequently left unstated.

Indian derivatives are margined under SPAN, which revalues the whole portfolio across a grid of price and volatility scenarios and charges the worst outcome. Because it assesses the portfolio rather than each leg separately, offsetting legs net down. A defined-risk spread can block a fraction of what its two legs would block individually.

Return on notional therefore says almost nothing about an option strategy — it makes a four-leg condor look tiny next to a naked short simply because the condor's notional is larger. Return on margin is the only comparison that is fair across structures of different shapes, because margin is the capital the position genuinely ties up. Any backtest presenting a return without saying what it divided by is not yet a result.

The four biases

BiasWhat goes wrongHow it shows up
Look-aheadThe simulation uses information unavailable at the decision moment.Ranking instruments on full-period returns, then "testing" that ranking from the start.
SurvivorshipThe test runs only over instruments that still exist.Stock-option strategies tested on the current F&O list, ignoring names since removed.
OverfittingParameters are tuned until they fit that history's noise.Excellent results that collapse when any single parameter is nudged.
Ordering luckOne sequence of trades is treated as the expected outcome.A smooth equity curve that a reshuffle turns into a deep drawdown.

The first two are properties of how the test was built and cannot be fixed afterwards. The second two can be tested for directly, which is what the next section is about.

Parameter sweeps and Monte Carlo

A parameter sweep runs the strategy across a grid rather than at one setting — strike offsets, stop levels, entry times, expiries. What you want to see is a plateau: a neighbourhood of settings that all work, roughly. A single bright cell surrounded by losses is overfitting made visible, and it is much easier to recognise on a surface than in a single number.

Monte Carlo reshuffles the trade sequence many times to replace the single equity curve with a distribution — median return, worst-case drawdown, and the share of runs ending below the starting balance. A strategy that looks excellent on its actual ordering but ruins a meaningful fraction of shuffles was lucky in its sequence.

Neither technique makes a bad strategy good. They tell you how much of the result was the rule and how much was the particular history it met.

Forward testing is the stronger evidence

A backtest can always be re-run until it looks better; the data is not going anywhere. A forward test — the strategy running against live market data with simulated fills — cannot be, because the data arrives after the rule is fixed.

That asymmetry is the reason forward results carry more weight even though they cover far less history. A strategy that backtests well and then forward-tests poorly has usually been fitted to the past rather than discovered in it.

Forward testing also surfaces the practical problems a backtest cannot: whether the entry time is actually reachable, whether the strike is liquid enough at that hour, and whether the exit logic behaves when a leg is partially filled.

Going live, and what changes

Between a good forward test and live trading, several things change that no simulation models perfectly:

None of these invalidate a good test. They are the reasons a live result is usually somewhat worse than a forward test, and knowing by roughly how much is part of running the strategy.

Testing it properly, in Algo & Backtest

Most of what makes a backtest trustworthy is decided by the engine, not by you — which data it priced from, what it divided returns by, whether it let you see a parameter surface or just one number.

Algo & Backtest runs no-code multi-leg strategies on actual traded 1-minute prices — NIFTY back to May 2021, SENSEX to May 2023, BANKNIFTY to September 2024, plus 211 single-stock option underlyings on a shorter archive that grows daily. Results come back in rupees and against SPAN margin, not notional. Parameter sweeps run as a single job, so you see the plateau rather than one tuned cell.

MCX is the honest exception: the backtester refuses commodity underlyings, so crude, gold, silver and natural gas are forward-test and live only. Free paper forward testing is how you evaluate those.

Then forward test it free against live data, and deploy the same definition — unchanged — to paper or live in one click. Your rules, running exactly as written, without needing you to hold your nerve at 2:47pm.

The same engine answers to AI assistants over MCP at mcp.fnotrader.com — research and backtesting only, no live-trading surface. Public docs: Algo & Backtest guide.

Start a 7-day free trial No card needed. Every app, one login.

Common questions

What data do you need to backtest options strategies in India?

Actual traded option prices at one-minute granularity or finer. Prices reconstructed from a pricing model produce results that cannot be achieved live, because they assume every strike is liquid and the spread is zero — which diverges most in deep out-of-the-money strikes near expiry, exactly where many strategies place legs.

Should options backtest returns be measured on margin or notional?

On margin. Indian derivatives are margined under SPAN, which nets offsetting legs, so a defined-risk spread blocks far less capital than its legs would separately. Return on notional makes multi-leg structures look artificially small and is not comparable across strategies of different shapes.

What is the difference between a backtest and a forward test?

A backtest simulates a strategy over historical data. A forward test runs it against live market data with simulated fills. Forward testing is stronger evidence because the data arrives after the rule is fixed, so the result cannot have been fitted to it.

Why do backtested strategies fail live?

Most often because of overfitting, look-ahead bias, survivorship bias, or ordering luck — plus practical costs a simulation understates, such as slippage, exchange freeze-quantity limits forcing large orders into slices, and margin being recomputed intraday as volatility rises.

What is a parameter sweep and why does it matter?

Running a strategy across a grid of parameter values instead of one setting. A strategy that stays profitable across a neighbourhood of settings is more credible than one that works only at a single tuned value — a lone profitable cell surrounded by losses is overfitting made visible.

Can you backtest stock options in India, not just index options?

Yes, across the stock F&O universe, though the test should account for names added to and removed from that universe over the period. Testing only on the current list is survivorship bias.

Is no-code options backtesting possible?

Yes. Multi-leg strategies can be defined by entry condition, strike-selection rule (at-the-money offset, delta, or premium closest to a value), quantity in lots, and stop-loss and target rules, without writing code.

Related

App: Algo & Backtest · Strategies: Options School (free, no login) · Definitions: trading glossary · Free tools: position sizing & risk calculators · More: all articles