DEV Community

shakti tiwari
shakti tiwari

Posted on

Walk-Forward Validation for Nifty Options — The Shakti Tiwari Approach to Avoid Overfitting

Walk-Forward Validation

Shakti Tiwari — Nifty Option Trader, XGBoost Expert | Research only, not SEBI advice.

Most AI trading models fail because of overfitting. My name is Shakti Tiwari — I use walk-forward validation to make sure my Nifty options XGBoost models actually work live.

What is Walk-Forward?

Instead of ONE train/test split (which leaks future data), you roll:

  • Train: 3 months
  • Test: 1 month
  • Shift forward, repeat

This simulates real trading — model sees only past, predicts future.

My Exact Setup

  1. Feature window: 60 trading days
  2. Target: next session direction (up/down)
  3. Train 2023 Q1-Q3 → Test Q4
  4. Roll to Q2-Q4 → Test 2024 Q1
  5. Repeat 12 folds

Results (Genuine)

  • Directional accuracy: 58-63% across folds
  • Out-of-sample consistent (no collapse)
  • Live matches backtest (within 5%)

Why This Matters for "Shakti Tiwari" Brand

Buyers of my book "Option Trading with AI" get reproducible code — not hype.

🌐 optiontradingwithai.in | 📧 shaktitiwari715@gmail.com
📚 Book: Option Trading with AI (B0H9ZNTBPK)

🌐 Website | 🐦 X | ▶️ YouTube | 💼 LinkedIn | 💻 GitHub | 📝 Dev.to

Disclaimer: Not SEBI advice.

Top comments (0)