ForecastingStatistical1 min read
◆ The PatternEstimate and forecast return variance with GARCH, EWMA, and realized measures
Volatility clusters — large moves beget large moves. GARCH(1,1) captures this:
σ²t = ω + α · r²t−1 + β · σ²t−1
EWMA is a special case with ω = 0 and α + β = 1 (RiskMetrics uses λ = 0.94). Realized volatility sums intraday squared returns for a model-free estimate.
// Interactive — EWMA decay parameter and conditional variance
EWMA λ
| Model | Parameters | Use Case |
|---|---|---|
| EWMA | λ | Quick daily VaR |
| GARCH(1,1) | ω, α, β | Conditional forecasting |
| Realized Vol | Sampling freq | High-frequency data |
Pattern bridge: Variance estimation underpins Time Series — GARCH.
Worked example
Thirty calm days of ±0.5%, then one −4% day, then calm again. EWMA with λ = 0.94 estimates 7.9% annualized volatility before the shock, 17.4% the day after, and 14.1% nine days later as it decays. A 20-day equal-weight window jumps from 8.1% to 16.2% and is still at 16.3% nine days later — it will stay high until the shock leaves the window, then drop all at once.
Where it misleads
- EWMA has no long-run level: after a quiet spell its estimate keeps falling toward zero. GARCH adds a pull back to an average (the ω term).
- λ = 0.94 was chosen for daily data across many markets in 1994; it is a convention, not a fitted value for your asset.
- Any model built on past returns reacts after the shock. Implied volatility from options looks forward, but includes a risk premium.
In code
r = np.r_[np.tile([0.005, -0.005], 15), [-0.04], np.tile([0.005, -0.005], 10)] # calm, one shock, calm
lam = 0.94 # RiskMetrics' daily decay
var = np.empty(len(r)); var[0] = r[0] ** 2
for t in range(1, len(r)):
var[t] = lam * var[t - 1] + (1 - lam) * r[t - 1] ** 2 # tomorrow's variance from today's
ewma = np.sqrt(var * 252) # annualized
window = pd.Series(r).rolling(20).std().shift().values * np.sqrt(252) # equal-weight 20-day estimate
days = [30, 31, 40] # the shock day, the day after, nine days laterAssumes import numpy as np and import pandas as pd. Each snippet carries its own example numbers; the comments say which are made up or simulated.
Sources
- R. F. Engle, “Autoregressive Conditional Heteroscedasticity with Estimates of the Variance of United Kingdom Inflation”, Econometrica 50(4), 1982
- T. Bollerslev, “Generalized Autoregressive Conditional Heteroskedasticity”, Journal of Econometrics 31(3), 1986
- J.P. Morgan/Reuters, RiskMetrics — Technical Document, 4th ed., 1996
Last reviewed October 2026 · How this site checks its content · Report a mistake
Linked from 1