TradeTech Analytics

NSE Nifty 50 · ML-driven directional options (research gate on the index) · v0.2.0 · unchanged under the standard cost model 2026-10-23

Compass NO EDGE

ML direction model for Nifty options (brief ML-NIFTY-F&O-01), Gate 1: does ML beat buy and hold?. Twelve pre-registered variants (ridge and LightGBM, 1, 3 and 5 day horizons, two position rules) were walk-forwarded over 12 test years. None beat buy and hold; the best has a t-statistic of 0.06 and a reality-check p of 0.87.

Verdict

Gate 1 failed: no skill over buy and hold

Across 12 pre-registered variants the best machine-learning model gained +0.006% per decision over always-long (t = 0.06, reality-check p = 0.87). The project stops here by its own rule.

  • Test: walk-forward 2013 to 2024, yearly retraining, purge plus 5-day embargo, fixed models, non-overlapping decision days. The sealed period (from 2025-10-17) was never loaded.
  • Better baseline in every variant was simply staying long (Nifty rose strongly over 2013 to 2024).
  • Most variants were slightly worse than the baseline; the three highest-VIX rows lost most in the high-VIX regime.
  • Because the first gate failed, no option-level test, paper run or execution code was started. The options history (2024-12 to 2026-10, about 460 sessions) would have given low statistical power anyway.
  • A pass here would have proven skill, not edge: costs were ignored on purpose at this gate.
  • Version 0.2: Gate 1 ignores trading costs by design, so the standard Dhan charge and slippage model changes nothing here; the gate failed on skill. The cost model (src/mlnifty/backtest/costs.py) is in place for any later option-level work.

Promotion gates

No gates published for this strategy.

Explain the strategy

We asked whether a computer model could guess better than chance whether the Nifty goes up or down over the next one to five days, better than just holding the index. Over twelve years of yearly re-testing, it could not.

Report

All 12 pre-registered variants versus the better baseline (per decision day, before any trading costs)

Variant (model, horizon in days, rule)Decision daysBetter baselineStrategy mean per decisionStrategy minus baselinet-stat of differenceBootstrap p (one-sided)Years with hit rate > 50%Diff low VIXDiff normal VIXDiff high VIX
lightgbm · h5 · sign590long0.268%+0.006%0.060.511 of 12+0.100%+0.020%-0.127%
lightgbm · h1 · sign2946long0.042%-0.010%-0.450.6799 of 12-0.038%+0.004%-0.030%
ridge · h3 · sign982long0.128%-0.028%-0.470.6711 of 12+0.055%+0.009%-0.216%
ridge · h5 · sign590long0.212%-0.050%-0.550.739 of 12-0.045%-0.106%+0.135%
ridge · h1 · sign2946long0.039%-0.013%-0.620.7510 of 12+0.020%+0.003%-0.096%
ridge · h5 · confident590long0.198%-0.064%-0.860.80410 of 12-0.026%-0.041%-0.176%
lightgbm · h1 · confident2946long0.030%-0.022%-1.130.8878 of 12-0.034%+0.007%-0.108%
lightgbm · h5 · confident590long0.126%-0.136%-1.570.9499 of 12+0.000%-0.076%-0.465%
ridge · h3 · confident982long0.076%-0.080%-1.60.9399 of 12-0.053%-0.028%-0.272%
lightgbm · h3 · sign982long0.024%-0.132%-2.030.9857 of 12+0.034%-0.069%-0.481%
lightgbm · h3 · confident982long0.033%-0.123%-2.120.9868 of 12-0.043%-0.051%-0.427%
ridge · h1 · confident2946long0.010%-0.042%-2.280.9928 of 12-0.055%-0.005%-0.147%

Rules and parameters

Rules

  1. Data: Nifty 50 daily 2007-09 to 2024-10 and India VIX daily 2008-03 onward; test years 2013 to 2024. 2025-10-17 onward is sealed and was not loaded.
  2. Features (schema v1, all known at the close of day t): returns over 1 to 60 days, realised volatility 5/20/60 days, VIX level, change, z-score and VIX over realised vol, drawdown from the 252-day high, distance from the 50 and 200-day averages, day of week, range, gap.
  3. Models (fixed, no tuning): ridge logistic (C 0.01) and LightGBM (200 trees, depth 3). Target: close-to-close return over 1, 3 or 5 days.
  4. Positions: sign (long if P(up) above 0.5 else short) or confident (trade only if P is at least 0.55 or at most 0.45). Decision every h-th day so returns do not overlap.
  5. Pass rule (pre-registered): beat the better of always-long and 5-day momentum with block-bootstrap p below 0.05, reality-check p below 0.10 across the 12 variants, positive mean, hit rate above 50% in 8 of 12 years, and the edge not confined to one VIX regime.

Parameters

capital
₹20,00,000 (brief)
costs (for later gates)
₹50 per leg all-in plus 0.5% slippage; stress at 1.5% and the itemised schedule
kill-switch (not built)
20% drawdown on end-of-day equity, manual reset
VIX regimes
low below 13, high above 20 (prior close)
variants tested
12 (2 models x 3 horizons x 2 rules)
pre-registration
docs/PREREG_GATE1.md, written before any result

Instrument

Nifty 50 index, daily; options legs would be weekly debit spreads (not reached: the first gate failed) · capital ₹2,000,000

Known limitations

Logs and raw data

Downloads appear once a data window is loaded.

Files are plain CSV so results can be re-computed independently. Trade dates are IST sessions; returns are net of modelled costs and slippage.