GARCH models for volatility forecasting -- implementation tips
I've been implementing GARCH(1,1) and EGARCH models for the volatility forecasting competition. Some findings:
from arch import arch_model
Standard GARCH(1,1)
am = arch_model(returns, vol='GARCH', p=1, q=1)
res = am.fit(disp='off')
EGARCH captures asymmetric effects
am_e = arch_model(returns, vol='EGARCH', p=1, q=1)
res_e = am_e.fit(disp='off')
EGARCH consistently outperforms symmetric GARCH on this dataset. The leverage effect is strong.
37 Replies
Thanks for sharing! This is exactly the kind of insight that helps the community grow. Bookmarking this thread.
Interesting thread! I've been exploring reinforcement learning for portfolio allocation. The challenge is defining the right reward function.
Interesting thread! I've been exploring reinforcement learning for portfolio allocation. The challenge is defining the right reward function.
Great analysis! I've been using a similar approach with rolling z-scores and it's been working well for mean reversion signals.
The data quality in this competition is actually quite good compared to real-world datasets. In practice, you'd spend 60%+ of your time cleaning data.
For those wondering: yes, you can use external Python packages in submissions, but they must be in the approved list. No custom C extensions.
I ran a quick backtest on this idea and got a Sharpe of about 1.2 before costs. Not bad for a simple strategy.
Be careful with the Kelly criterion for position sizing. Full Kelly is way too aggressive. I use quarter-Kelly in practice.
For those wondering: yes, you can use external Python packages in submissions, but they must be in the approved list. No custom C extensions.
Market regimes are the elephant in the room. A strategy that works in a trending market will fail in mean-reverting conditions.
One thing to watch out for: survivorship bias in the training data. Make sure you include delisted securities.
I'd recommend reading "Quantitative Portfolio Management" by Michael Isichenko. It's the best practical guide I've found.