Volatility Suite
Six estimators: close-to-close, Parkinson, Garman-Klass, Yang-Zhang, EWMA, and rolling
Different volatility estimators use different price information. Close-to-close only uses closing prices. Parkinson uses high/low. Garman-Klass uses OHLC. Yang-Zhang adds overnight gaps. Each has different efficiency and bias characteristics.
Estimators
python
import horizon as hz
# Close-to-close (standard)
vol = hz.estimate_volatility(prices, method="close")
# Parkinson (uses high/low range - ~5x more efficient than close-to-close)
vol = hz.parkinson_vol(highs, lows)
# Garman-Klass (uses OHLC - ~8x more efficient)
vol = hz.garman_klass_vol(opens, highs, lows, closes)
# Yang-Zhang (handles overnight gaps)
vol = hz.yang_zhang_vol(opens, highs, lows, closes)
# EWMA (exponentially weighted, reacts faster to recent data)
vol = hz.ewma_vol(returns, decay=0.94)
# Rolling window
vol = hz.rolling_vol(returns, window=20)
All estimators return annualized volatility. Default annualization uses 365 days for 24/7 markets (crypto, prediction markets) and 252 for equities.
Choosing an estimator
| Estimator | Data needed | Efficiency | Handles gaps |
|---|---|---|---|
| Close-to-close | Close | 1× | No |
| Parkinson | High, Low | ~5× | No |
| Garman-Klass | OHLC | ~8× | No |
| Yang-Zhang | OHLC | ~8× | Yes |
| EWMA | Returns | Adaptive | No |
| Rolling | Returns | Window-dependent | No |
“Efficiency” means how much data you need for the same precision. Higher is better.
When to use
- Parkinson/GK: when you have OHLC data and want a more precise vol estimate from fewer bars
- Yang-Zhang: equities with overnight gaps
- EWMA: when you want vol to react quickly to recent moves (risk monitoring)
- Rolling: simple baseline, easy to understand