mirror of
https://github.com/Mihirkansara/nexus-quant-terminal.git
synced 2026-11-02 09:36:11 +00:00
- core/vol_forecast.py: forecasts average variance over the next 1D/1W/1M
with HAR-RV (weekend dummy for 24/7 crypto), GJR-GARCH(1,1) QMLE with a
vectorised filter, HistGradientBoosting on HAR/return/calendar features,
and EWMA as benchmark. Garman-Klass + overnight-gap proxy scaled to
close-to-close on pre-backtest data only.
- Rolling out-of-sample backtest (refit every 21 days, no look-ahead),
QLIKE / RMSE / bias per model (Patton 2011), inverse-QLIKE ensemble.
- 2-state Gaussian HMM (Baum-Welch) regime probabilities and durations.
- For BTC/ETH: ensemble forecast vs Deribit ATM implied -> rich/cheap view.
- GET /api/vol/forecast/{pair} (cached 30 min; 503 when history is short
or sources are down); scikit-learn added (models degrade gracefully
without it).
- Vol Forecast tab: KPIs, forecast term structure vs implied, HMM regime
history, OOS backtest vs realised (+DVOL), model leaderboard per horizon.
- 7 new tests on simulations with known answers (proxy bias, GARCH and HMM
parameter recovery, weekend effect, look-ahead check, endpoint).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FpiqUMAyo4RL5DdQHMWbwE
195 KiB
1440x560px
195 KiB
1440x560px