9 min read
Black-Scholes and Black-76 for Indian options
Which model fits NIFTY, BANK NIFTY and SENSEX options and which fits MCX options on gold futures, what each input means, worked prices and where they break.
Options strategiesVeloce is an algo trading harness for Indian F&O. Your strategy plugs in; Veloce supplies the one-minute history, the contracts, fills at the next bar’s open, itemised charges and slippage, exits and risk limits, and a report of every trade. The P&L you see is the P&L your rules would have kept.
Net P&L
+₹20,971
+2.10% on ₹10,00,000 capital, after fees
September 2026
13 up, 4 down+4.8k
| Underlying | Exchange | Expiry | Lot | Strike step | History |
|---|---|---|---|---|---|
| NIFTY 50 | NSE index options | Weekly, TuesdayThursday until 28 August 2025 | 65 | 50 points | From June 2021 |
| BANK NIFTY | NSE index options | Monthly, last TuesdayModelled from September 2025 | 30 | 100 points | From September 2025 |
| SENSEX | BSE index options | Weekly, ThursdayModelled from September 2025 | 20 | 100 points | From September 2025 |
| GOLD and GOLD MINI | MCX futures | Each listed contract’s dateRead from Dhan’s scrip master | 1 kg (100 units) or 100 g (10 units) | Tick ₹1 per 10 g | Contracts still trading |
GOLDM future, one-minute candles
DecisionFill price
Illustrative prices.
The same strategy code is meant to run against paper and live brokers too, with only the data and the order executor swapped. Paper and live trading are coming soon.
Read the details in how the backtesting engine works.
1
The engine takes every bar that starts at the same moment: the underlying and each contract the strategy has picked so far.
BacktestEngine
2
Options past expiry settle. Orders waiting on a contract fill at its bar’s open, with slippage and charges, and the portfolio updates.
SimulatedBroker.on_bar
3
Only then does the strategy see the closed bars. It returns target positions in signed lots, never orders.
Strategy.on_bar
4
Exit-by time, daily target and stop, skipped days, exit rules and risk limits each adjust the targets in turn.
TargetStage
5
The difference between each target and what is already ordered becomes an order, which waits for the next bar.
OrderExecutor.submit
One lot of 65 bought at ₹120.05 and sold at ₹149.95, both one tick worse than the open. The two ticks of slippage cost another ₹6.50 against the opens. Illustrative prices; the charges follow the rates in Veloce’s NSE options schedule.
| Per fill, in rupees | Buy | Sell |
|---|---|---|
| Next candle’s open | ₹120.00 | ₹150.00 |
| One tick of slippage | +₹0.05 | −₹0.05 |
| Fill price | ₹120.05 | ₹149.95 |
| BrokeragePer order | ₹20.00 | ₹20.00 |
| Exchange charge0.03503% | ₹2.73 | ₹3.41 |
| SEBI fee0.0001% | ₹0.01 | ₹0.01 |
| STT0.15% | — | ₹14.62 |
| Stamp duty0.003% | ₹0.23 | — |
| GST18% of the first three | ₹4.09 | ₹4.22 |
| Charges on the fill | ₹27.07 | ₹42.26 |
| Strategy | At expiry | Candle | Entry rule |
|---|---|---|---|
| Index options | |||
| Iron condorSells premium | 1 minute | Once per expiry, at the entry time, sells a put and a call a set number of strikes either side of the at-the-money strike and buys wings further out. | |
| Hedged straddleSells premium | 1 minute | Each morning sells the at-the-money call and put and buys a call and a put a set number of strikes away, then closes everything at the square-off time. | |
| MACD credit spreadSells premium | 5 minutes | On a MACD and 200-period trend signal, sells a put spread when bullish or a call spread when bearish, and flips the spread when the signal reverses. | |
| Moving average crossoverBuys options | 3 minutes | Buys a call when the fast simple moving average crosses above the slow one and a put when it crosses below, holding one contract at a time. | |
| EMA crossoverBuys options | 5 minutes | The same as the moving average crossover, on exponential moving averages. | |
| MACD with a 200 trend filterBuys options | 3 minutes | Buys calls when the MACD histogram turns positive above a 200-period average, and puts when it turns negative below it. | |
| Supertrend flipBuys options | 5 minutes | Buys a call when the Supertrend turns up and a put when it turns down. | |
| RSI reversalBuys options | 5 minutes | Buys a call when RSI climbs back above the oversold level and a put when it falls back below the overbought level. | |
| Opening range breakoutBuys options | 5 minutes | Marks the high and low of the first minutes of the session, then buys a call on a close above the range or a put on a close below it. | |
| Options on your own rulesBuys options | 5 minutes | Buys calls when your bullish conditions all hold and puts when your bearish conditions all hold, from indicators you define. | |
| MCX futures | |||
| Gold futures on your own rulesLong and short | 5 minutes | Goes long a gold or gold mini future when your bullish conditions hold and short when your bearish ones do, reversing in one order when the signal flips. | |
Solid line: the position as entered. Dotted line: the opposite signal, for strategies that take both sides. Shapes are drawn from each strategy's legs with illustrative premiums.
A spec names four legs by how many strikes they sit from the at-the-money strike, and groups the exits by expiry. It is checked against the schema before a run starts, and a bad field is reported by its path, like legs.0.strike.steps.
Today a spec runs in a backtest. Strategies are written so the same code will run against a live broker.
{
"name": "iron-condor",
"description": "sell weekly iron condors",
"candle_minutes": 1,
"entry": {
"first_entry": "10:00",
"min_days_to_expiry": 5,
"reenter": "each_expiry"
},
"legs": [
{
"kind": "option",
"option_type": "put",
"side": "buy",
"strike": {
"kind": "atm_offset",
"steps": 8
}
},
{
"kind": "option",
"option_type": "call",
"side": "buy",
"strike": {
"kind": "atm_offset",
"steps": 8
}
},
{
"kind": "option",
"option_type": "put",
"side": "sell",
"strike": {
"kind": "atm_offset",
"steps": 4
}
},
{
"kind": "option",
"option_type": "call",
"side": "sell",
"strike": {
"kind": "atm_offset",
"steps": 4
}
}
],
"exits": {
"group_by": "expiry",
"rules": [
{
"kind": "take_profit",
"amount": {
"kind": "share_of_credit",
"fraction": "0.5"
}
},
{
"kind": "stop_loss",
"amount": {
"kind": "share_of_credit",
"fraction": "2"
}
},
{
"kind": "before_expiry",
"days": 1
}
]
}
}Exit rule, closes positions
In rupees, or as a share of the premium paid or the credit received.
stop_loss · share_of_credit 2Exit rule, closes positions
Close once the position has made a set amount, in the same units.
take_profit · share_of_credit 0.5Exit rule, closes positions
Exit after giving back a set amount from the best profit, armed from entry or after a profit.
trailing_stop · distance, afterExit rule, closes positions
Close a position a set number of days before its contract expires.
before_expiry · days 1Exit rule, closes positions
Close everything and stop for the day at a profit or a loss, in rupees or a share of equity.
day_rupees · share_of_equityRisk rule, sizes new orders
Cut each new option position so its worst loss at expiry stays within a share of equity.
max_loss_at_expiryRisk rule, sizes new orders
Keep option buys within cash, and futures within margin at a rate you set.
cash · futures_marginIn this illustrative sweep the top setting on August and September loses money in October, and the third-ranked one is the only one of the three that holds up. That gap is what the check period is for. Read how sweeps work.
| Area | Status | Detail |
|---|---|---|
| Paper and live trading | Coming soon | Paper trading on live data, live trading through Zerodha, an option chain with greeks and IV, alerts, and a strategy marketplace. Strategies are written so the same code will run against a live broker; today Veloce runs backtests. |
| Tick data | Not supported | The finest data is the one-minute candle, so Veloce is not a tool for tick-level or high-frequency strategies. |
| Other markets | Not supported | No equities, currencies, crypto or US markets. Gold options wait for a verified MCX expiry calendar. |
| History | Limited | Market data comes from Dhan. Expired MCX futures have no intraday history there, and BANK NIFTY and SENSEX start in September 2025. |
9 min read
Which model fits NIFTY, BANK NIFTY and SENSEX options and which fits MCX options on gold futures, what each input means, worked prices and where they break.
Options strategies10 min read
Build NIFTY bull call and bear put spreads, compare strike widths, price a full trade with slippage and charges, and backtest both on one signal in Veloce.
Options strategies9 min read
How theta and gamma behave on NIFTY and SENSEX expiry day, hour by hour, what a 100-point move does to a short straddle, and what to check in a 0 DTE backtest.
Options strategiesCreate an account with a verified email and phone number, pick a strategy and a market, and see every fill, fee and day of P&L.