EWMA Mean-Variance
Mean-variance optimisation with exponentially weighted moments. The classical MVO inputs — the mean vector and the covariance matrix — are estimated using exponentially weighted moving averages with a configurable decay factor, so the optimiser adapts to the most recent volatility regime instead of weighting all observations equally.
Overview
The standard sample estimators of and weight every observation equally inside the lookback window. That assumption is convenient but counterfactual: realised volatility clusters in time (Mandelbrot, 1963; Engle, 1982), and a sudden regime change should propagate into the optimiser's view of risk faster than an equally-weighted estimator allows. The EWMA approach popularised by J.P. Morgan's RiskMetrics (1996) replaces the sample mean and covariance with their exponentially-weighted analogues.
FolioLab's EWMA mean-variance variant uses the same first-order recursion as RiskMetrics: each new return is mixed in with weight while older history decays geometrically with factor . The standard RiskMetrics decay for daily equity data is , corresponding to a half-life of roughly 11 trading days. The resulting estimates are fed into the same tangency / max-Sharpe formulation as the classical MVO, so the only difference is the moment estimator.
The method is a strict generalisation of the equally-weighted moment estimator (which is the limit ) and is considerably simpler than full GARCH (Bollerslev, 1986), which would jointly estimate the conditional variance dynamics with maximum likelihood at substantially higher cost.
Mathematical Formulation
EWMA mean
Equivalently, in batch form, .
EWMA covariance
The recursion is the same as for the mean: each new outer-product of centered returns is mixed in with weight . Choosing gives effective half-lives between 11 and 22 trading days, which is the canonical RiskMetrics setting for daily equity data.
Plug-in MVO
The EWMA-estimated and are substituted directly into the standard MVO programme:
FolioLab implements this via PyPortfolioOpt's EfficientFrontier.max_sharpe with the EWMA-estimated moments. All other MVO machinery (sector caps, turnover budgets, target return) is available unchanged.
Half-life and decay choice
The half-life implied by a decay factor is . So gives trading days (the RiskMetrics daily default), and gives days. The trade-off is standard: a smaller reacts faster to new information but is noisier; a larger is more stable but slower to detect regime changes.
Advantages & Limitations
Advantages
- Adaptive risk: Captures volatility clustering without estimating GARCH.
- Single hyperparameter: The decay is the only knob.
- Standardised: RiskMetrics defaults are widely used and understood by risk teams.
- Plug-and-play: Substitutes into any MVO formulation without changing constraints.
Limitations
- Mean is still noisy: EWMA mean reduces variance only at the cost of bias.
- Non-stationary periods amplify weights: Recent extreme returns dominate the estimate.
- No regime structure: EWMA assumes smooth decay; HMM-Regime MVO is preferred when regimes are discrete.
- Decay choice is universal: The same is applied to all assets.
References
- J.P. Morgan / Reuters (1996). RiskMetrics — Technical Document (4th ed.). New York: Morgan Guaranty Trust Company.
- Engle, R. F. (1982). "Autoregressive Conditional Heteroscedasticity with Estimates of the Variance of United Kingdom Inflation." Econometrica, 50(4), 987-1007.
- Bollerslev, T. (1986). "Generalized Autoregressive Conditional Heteroskedasticity." Journal of Econometrics, 31(3), 307-327.
- Mandelbrot, B. (1963). "The Variation of Certain Speculative Prices." The Journal of Business, 36(4), 394-419.
- Tsay, R. S. (2010). Analysis of Financial Time Series (3rd ed.). Wiley.
- Markowitz, H. (1952). "Portfolio Selection." The Journal of Finance, 7(1), 77-91.
- PyPortfolioOpt documentation —
EfficientFrontier.max_sharpe.