Two Python-based quantitative finance projects showcasing volatility forecasting, risk management, and regime-based trading strategies using Bitcoin daily returns (2013–2024).
Walk-forward GARCH(1,1)/EGARCH(1,1) volatility forecasting with parametric Value-at-Risk backtesting on 4,069 daily BTC observations.
Key results:
| Model | Out-of-Sample RMSE | MAE |
|---|---|---|
| EGARCH(1,1) | 54.9 | 17.7 |
| GARCH(1,1) | 55.7 | 18.0 |
| Constant Vol | 62.0 | 37.6 |
99% VaR backtest: 1.63% breach rate (expected 1%), with all 50 breaches concentrated in stress regime (3.26% stress vs 0% calm). Kupiec test rejects at p=0.001.
- Tech:
arch,scipy,numpy,pandas,matplotlib - Directory:
garch_var/
Markov-switching model identifies calm vs stress regimes, then constructs a position sizing signal that reduces exposure during high-volatility periods.
Key results:
| Metric | Regime Strategy | Buy & Hold |
|---|---|---|
| Ann. Return | 137.0% | 109.8% |
| Ann. Volatility | 58.1% | 137.4% |
| Sharpe Ratio | 2.36 | 0.80 |
| Max Drawdown | -55.1% | -91.0% |
| Calmar Ratio | 2.49 | 1.21 |
Stress regime accounts for only 13.4% of days. Sensitivity analysis (25 parameter combinations) shows Sharpe robust across grid (range: 1.77–2.98).
- Tech:
statsmodels,numpy,pandas,matplotlib - Directory:
regime_signal/
Bitcoin daily prices (Jan 2013 – Feb 2024, 4,069 observations), sourced from Investing.com via PhD research dataset.
pip install -r requirements.txt# Project 1: ~15 min (walk-forward estimation)
python garch_var/rolling_garch.py
# Project 2: ~2 min
python regime_signal/regime_signal.pyHao Sun — PhD candidate in Economics, University of Bath