Module 3 — Statistics for Markets
Volatility — Measuring Uncertainty
Returns, volatility, covariance — and the tail behaviour that breaks naïve models.
Learning objectives
- ▸Compute realized volatility from returns.
- ▸Annualise correctly.
- ▸Understand why volatility clusters (and what GARCH does about it).
FORMULA
Sample standard deviation of returns
σ_daily = sqrt( Σ(r_i - r̄)² / (n - 1) ) σ_annual = σ_daily * sqrt(252)
TEXT
Why sqrt(252)?
If daily returns are independent with variance σ², the variance of a sum of T returns is T·σ². Standard deviation scales with sqrt(T). 252 ≈ trading days per year for US equities (use 365 for crypto, 260 for FX).
TEXT
Volatility clusters
Empirically, big moves follow big moves. October 1987, March 2020, and August 2024 all had multi-day clusters of 3-sigma days. A naïve rolling-σ overreacts; GARCH(1,1) models σ_t² as ω + α·r_{t-1}² + β·σ_{t-1}², which is industry standard for short-horizon vol forecasting.
CODE
Rolling realised vol
rv_20d = log_returns.rolling(20).std() * np.sqrt(252) import matplotlib.pyplot as plt rv_20d.plot()