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 days | Better baseline | Strategy mean per decision | Strategy minus baseline | t-stat of difference | Bootstrap p (one-sided) | Years with hit rate > 50% | Diff low VIX | Diff normal VIX | Diff high VIX |
|---|---|---|---|---|---|---|---|---|---|---|
| lightgbm · h5 · sign | 590 | long | 0.268% | +0.006% | 0.06 | 0.5 | 11 of 12 | +0.100% | +0.020% | -0.127% |
| lightgbm · h1 · sign | 2946 | long | 0.042% | -0.010% | -0.45 | 0.679 | 9 of 12 | -0.038% | +0.004% | -0.030% |
| ridge · h3 · sign | 982 | long | 0.128% | -0.028% | -0.47 | 0.67 | 11 of 12 | +0.055% | +0.009% | -0.216% |
| ridge · h5 · sign | 590 | long | 0.212% | -0.050% | -0.55 | 0.73 | 9 of 12 | -0.045% | -0.106% | +0.135% |
| ridge · h1 · sign | 2946 | long | 0.039% | -0.013% | -0.62 | 0.75 | 10 of 12 | +0.020% | +0.003% | -0.096% |
| ridge · h5 · confident | 590 | long | 0.198% | -0.064% | -0.86 | 0.804 | 10 of 12 | -0.026% | -0.041% | -0.176% |
| lightgbm · h1 · confident | 2946 | long | 0.030% | -0.022% | -1.13 | 0.887 | 8 of 12 | -0.034% | +0.007% | -0.108% |
| lightgbm · h5 · confident | 590 | long | 0.126% | -0.136% | -1.57 | 0.949 | 9 of 12 | +0.000% | -0.076% | -0.465% |
| ridge · h3 · confident | 982 | long | 0.076% | -0.080% | -1.6 | 0.939 | 9 of 12 | -0.053% | -0.028% | -0.272% |
| lightgbm · h3 · sign | 982 | long | 0.024% | -0.132% | -2.03 | 0.985 | 7 of 12 | +0.034% | -0.069% | -0.481% |
| lightgbm · h3 · confident | 982 | long | 0.033% | -0.123% | -2.12 | 0.986 | 8 of 12 | -0.043% | -0.051% | -0.427% |
| ridge · h1 · confident | 2946 | long | 0.010% | -0.042% | -2.28 | 0.992 | 8 of 12 | -0.055% | -0.005% | -0.147% |
Rules and parameters
Rules
- 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.
- 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.
- 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.
- 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.
- 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
- Close-to-close returns are slightly optimistic about the entry (a signal at the close, an option entry at 15:15).
- Yahoo daily data is used for the long history; it was not yet cross-checked against the Dhan daily store.
- The option history is only about 460 sessions and has no bid/ask, so even a passing Gate 1 could not have been confirmed at the option level with high statistical power.
- Only price, volatility and VIX features were allowed by the pre-registration. Option-derived features (skew, open interest, flows) were not tested and would be a new pre-registered study.
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.