leverage = Ο_target / Ο_realized
- Ο_target: your desired annualized volatility (e.g., 10%)
- Ο_realized: your estimated current annualized volatility
- leverage: the fraction of capital to deploy (can be > 1 if using leverage)
When realized vol doubles from 10% to 20%, your position halves. When vol drops from 10% to 5%, your position doubles. You're always taking the same amount of risk in dollar terms.
For a multi-asset portfolio:
w_i = (Ο_target / N) / Ο_i
- w_i: weight for asset i
- N: number of assets
- Ο_i: realized vol of asset i
This gives each asset an equal risk contribution β which is the foundation of risk parity.
Rolling Window Standard Deviation:
realized_vol = returns.rolling(window=20).std() * np.sqrt(252)
- Simple and intuitive
- Lookback window matters: 20 days reacts fast but is noisy; 60 days is smoother but lags
- Gives equal weight to all observations in the window
EWMA (Exponentially Weighted Moving Average):
realized_vol = returns.ewm(span=20).std() * np.sqrt(252)
- Recent observations get more weight β reacts faster to vol changes
- No hard cutoff like rolling window
- Used by RiskMetrics (JP Morgan's risk model) with Ξ» = 0.94
Yang-Zhang Estimator (uses OHLC data):
- Incorporates open, high, low, close prices for more efficient vol estimation
- 5-7x more efficient than close-to-close β you get the same accuracy with fewer observations
- Better for shorter lookback windows
GARCH(1,1):
ΟΒ²_t = Ο + Ξ±Β·rΒ²_{t-1} + Ξ²Β·ΟΒ²_{t-1}- Models vol as a process with persistence and mean reversion
- Best for forecasting future vol, not just measuring current vol
- More complex to fit but captures vol clustering
| Window | Responsiveness | Stability | Best For |
|---|---|---|---|
| 10 days | Very fast | Noisy, whipsaws | Intraday/fast strategies |
| 20 days | Fast | Moderate | Daily rebalancing |
| 60 days | Moderate | Smooth | Weekly/monthly rebalancing |
| 120 days | Slow | Very smooth | Strategic allocation |
A common approach: use a fast estimator (EWMA span=20) for position sizing but a slow estimator (rolling 60-day) for sanity-checking. If they diverge wildly, something structural may be happening.
- Realized vol: what actually happened (backward-looking)
- Implied vol (VIX): what the options market expects will happen (forward-looking)
For position sizing, you want the best forecast of future vol. Research shows:
- Implied vol is a better predictor of future realized vol than past realized vol
- But implied vol is systematically upward-biased (volatility risk premium)
- A blend often works best:
vol_forecast = 0.7 Γ implied + 0.3 Γ realized
Risk parity is volatility targeting applied across assets:
- Each asset gets weight inversely proportional to its volatility
- The result: each asset contributes equal risk to the portfolio
- Bridgewater's "All Weather" is the canonical risk parity portfolio
w_i = (1/Ο_i) / Ξ£(1/Ο_j) # Inverse-vol weighting
This ignores correlations (a simplification). Full risk parity uses the covariance matrix:
w_i β (Ξ£β»ΒΉ Β· 1) / (1α΅ Β· Ξ£β»ΒΉ Β· 1) # Minimum variance weights
- Transaction costs: Frequent rebalancing eats into returns. Apply a buffer zone β don't rebalance unless leverage has drifted > 10% from target.
- Leverage constraints: If leverage > 1 is required, you need margin. If leverage > 2, you're probably in dangerous territory.
- Vol-of-vol: In regime transitions, vol itself is volatile. EWMA handles this better than rolling windows.
- Asymmetric response: Consider sizing down faster than you size up. A vol spike is a signal; a vol decline might just be calm before a storm.