Skip to content
John Quevedo

Updated Feb 20, 2026

Probabilistic Stock Volatility Forecasting

Built a machine learning pipeline to forecast 5-day stock volatility using historical market data.

  • - Improved forecast accuracy by 23–28% compared to simple baseline methods across SPY, QQQ, and AAPL.
  • - Shipped a Streamlit dashboard for visualizing forecasts, uncertainty bands, and model performance.
Probabilistic stock volatility forecasting dashboard with prediction intervals and trend chart.

Problem

The project forecasts 5-day-ahead realized volatility for SPY, QQQ, and AAPL while quantifying uncertainty for monitoring and decision support.

Approach

  • - Downloaded daily OHLCV data from yfinance and cached it locally.
  • - Engineered realized-volatility features including RV lags, return statistics, calendar cyclic features, and volume z-scores.
  • - Trained rolling-window exact Gaussian Processes with PyTorch and GPyTorch.
  • - Generated 50%, 90%, and 95% prediction intervals and surfaced anomaly/regime alerts in a Streamlit dashboard.

Results

  • - The GP model outperformed persistence and EWMA baselines across all three tickers in the latest walk-forward snapshot.
  • - The dashboard provides both point forecasts and interval bands so forecast confidence is visible.
  • - Artifacts are versioned so deployment does not require retraining on startup.

Technical Evaluation

TickerRMSEBaseline RMSERMSE ReductionMAEBaseline MAEMAE Reduction90% CoverageAvg 90% Width
SPY0.01030.014026.5%0.00620.008325.1%0.98010.0439
QQQ0.01170.016327.8%0.00810.010523.2%0.96820.0450
AAPL0.01980.025823.2%0.01330.017523.8%0.89860.0527

Average reduction across SPY/QQQ/AAPL: RMSE 25.8%· MAE 24.0%.

Tradeoffs

  • - Exact GP training with rolling windows increases runtime and tuning cost.
  • - Committed artifacts simplify deployment but require periodic refresh to stay current with new market data.