Lessons from Building a BankNifty Options Trading Bot: Slicing the DTE / Gamma Curve

Discussion

Hey everyone,

I’ve been paper-trading a rule-based BankNifty options buying bot and wanted to share some key observations on DTE dynamics, position sizing, and structural data limitations in the Indian market.

The Bot Setup & Live Paper Results

  • Entry: One-shot at 09:30 AM IST based on opening gap, VWAP, relative strength (vs. Nifty), and momentum.
  • Exits: Asymmetric brackets (-40% SL, +40% trailing trigger, +100% target, auto-EOD close at 15:25).
  • The Math: Currently sitting at a 33.3% win rate (4W / 8L), but the bot is up +22.7% (Net P&L: +₹45,427.5 on a ₹200k baseline).
  • The Asymmetry: The average win-to-loss ratio is 3.7x in rupee terms (Average win: +₹21,283 / +49.3% vs. Average loss: -₹5,713 / -15.4%).

The Data Challenge (Post-Nov 2024 Regime)

Backtesting index options in India is a moving target. In November 2024, BankNifty weekly expiries were scrapped, switching entirely to monthly expiries. To keep backtests realistic, I’ve limited my data to TrueData 1-min options historical data from Nov 2024 onwards to match this modern regime. P.S - I had to purchase this 1-min data from Nov 2024 till April 2026 from Truedata.

The Core Observation: The DTE/Gamma Trap

The live paper trades show a massive performance split based on Days to Expiry (DTE):

  • DTE ≤ 7 (Expiry Week): 100% win rate (3/3). Option premiums are cheap; fast index moves easily trigger our +40% trail or highly profitable EOD trends (+73.7%, +71.7%, +40.9%).
  • DTE ≥ 8 (Far-DTE): 11% win rate (1/9). Premiums are expensive and sluggish; trades decay slowly, getting chopped up and exiting near-flat or as minor losses by 15:00.

Why simple filters failed in backtests:

  1. Skipping far-DTE entirely: While it saves recent losses, historical backtests show the far-DTE bucket still has a thin positive edge over 18 months. Skipping it throws away roughly 49% of gross profits.
  2. Midday exits: Experimenting with cutting underwater trades at 12:30 ruins our win ratio by eliminating rare, highly profitable afternoon whipsaw recoveries.

What I’m Exploring Next (Without Overfitting)

Parameter tuning (like shifting stop-losses or entry times) is already optimized; tweaking them further is just curve-fitting the noise. Instead, I'm focusing on structural modifications:

  1. DTE-Aware Sizing: Deploying 30% capital on expiry week (high-gamma) and scaling down to 10% on far-DTE weeks to minimize the drawdown drag.
  2. Meta-Labeling (Secondary ML Model): Training a simple model to predict the probability of success at 9:30 AM based on sector flows, PCR spread, and VIX change. Instead of changing the direction, the probability output will dynamically scale the position size (0x to 1x).

I'd love your thoughts:

  • How do you manage position sizing across the DTE curve when buying index options? Do you scale down as DTE increases?
  • Has anyone successfully used Marcos López de Prado’s Meta-Labeling framework specifically for sizing options trades rather than trying to predict direction?

https://preview.redd.it/b36ouwr50och1.png?width=3014&format=png&auto=webp&s=fc2122535716477ed58f6c9dbf45c04f4ebf623f

https://preview.redd.it/kw0yhft80och1.png?width=374&format=png&auto=webp&s=88fdbd1d1b1e6fcf3a7f70e157cd1a8c0d721996

Posted Jul 11, 2026, 8:59 PM UTC · edited

62
Loading comments…