Quant GT
Browse all lessons
Section 22 · Lesson 22.1

Mean–Variance Optimization

The Markowitz frontier and the math behind diversification.

Markowitz mean-variance optimization picks portfolio weights ww to balance expected return against variance. For target return μp\mu_p:

minwwΣws.t.wμ=μp,w1=1\min_w\, w^\top \Sigma\, w \quad \text{s.t.} \quad w^\top \mu = \mu_p, \quad w^\top \mathbf{1} = 1

Sweep μp\mu_p to trace the efficient frontier — the set of portfolios with maximum return per unit of variance.

The math is convex and has clean closed forms via Lagrangians. The trick is the inputs: μ\mu and Σ\Sigma are estimated from data and tiny errors in expected returns can produce hugely concentrated, unstable optimal portfolios. This is the "Markowitz curse" — and is why robust techniques (shrinkage, Black-Litterman, robust optimization) are widely used in practice.

Despite its limitations, mean-variance is the foundation of modern portfolio theory and underlies CAPM, factor investing, and risk parity.