Quant Memo
Core

The Efficient Frontier

The set of minimum-variance portfolios for each level of return, derived in closed form with Lagrange multipliers, giving the two-fund theorem, the global minimum-variance portfolio, the tangency portfolio, and the capital market line.

Prerequisites: MPT (Harry Markowitz), Expectation, Variance & Moments

The efficient frontier is the geometric heart of MPT (Harry Markowitz): out of the infinitely many portfolios you can build from a set of assets, only a one-dimensional curve is worth considering. Every portfolio on it delivers the minimum possible variance for its expected return, everything below and to the right is dominated. Understanding the frontier means being able to derive it, not just draw it, because the derivation exposes the two-fund theorem and the tangency portfolio that the whole edifice of asset pricing is built on.

The optimization problem

Take NN risky assets with expected excess-return vector μRN\mu \in \mathbb{R}^N and covariance matrix ΣRN×N\Sigma \in \mathbb{R}^{N\times N} (assumed positive definite, so invertible). A fully-invested portfolio is a weight vector ww with w1=1w^\top \mathbf{1} = 1. Its expected return is wμw^\top \mu and its variance is wΣww^\top \Sigma w. The frontier is traced by solving, for each target return μp\mu_p,

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

Deriving the frontier

Form the Lagrangian with multipliers λ,γ\lambda, \gamma:

L=12wΣwλ(wμμp)γ(w11).\mathcal{L} = \tfrac12 w^\top \Sigma w - \lambda(w^\top \mu - \mu_p) - \gamma(w^\top \mathbf{1} - 1).

The first-order condition L/w=Σwλμγ1=0\partial\mathcal{L}/\partial w = \Sigma w - \lambda\mu - \gamma\mathbf{1} = 0 gives the optimal weights as a linear function of the two multipliers:

w=λΣ1μ+γΣ11.w = \lambda\,\Sigma^{-1}\mu + \gamma\,\Sigma^{-1}\mathbf{1}.

This single equation is the whole story: every frontier portfolio is a linear combination of the two fixed vectors Σ1μ\Sigma^{-1}\mu and Σ11\Sigma^{-1}\mathbf{1}. To pin down λ,γ\lambda, \gamma, impose the two constraints. Define the three scalars

A=1Σ11,B=1Σ1μ,C=μΣ1μ,A = \mathbf{1}^\top \Sigma^{-1}\mathbf{1}, \qquad B = \mathbf{1}^\top \Sigma^{-1}\mu, \qquad C = \mu^\top \Sigma^{-1}\mu,

and D=ACB2>0D = AC - B^2 > 0 (positive by Cauchy–Schwarz whenever μ\mu is not proportional to 1\mathbf{1}). Substituting ww into the constraints yields a 2×22\times 2 linear system whose solution is λ=(AμpB)/D\lambda = (A\mu_p - B)/D and γ=(CBμp)/D\gamma = (C - B\mu_p)/D. Plugging back, the minimum variance attainable at return μp\mu_p is

  σp2=Aμp22Bμp+CD.  \boxed{\;\sigma_p^2 = \frac{A\,\mu_p^2 - 2B\,\mu_p + C}{D}.\;}

This is a parabola in (μp,σp2)(\mu_p, \sigma_p^2) space and a hyperbola in (σp,μp)(\sigma_p, \mu_p) space. The upper branch, where higher return comes with higher variance, is the efficient frontier; the lower branch is dominated.

The global minimum-variance portfolio

The apex of the hyperbola, the portfolio of least variance regardless of return, comes from setting dσp2/dμp=0d\sigma_p^2/d\mu_p = 0, giving μp=B/A\mu_p = B/A and

wgmv=Σ111Σ11,σgmv2=1A.w_{\text{gmv}} = \frac{\Sigma^{-1}\mathbf{1}}{\mathbf{1}^\top \Sigma^{-1}\mathbf{1}}, \qquad \sigma^2_{\text{gmv}} = \frac{1}{A}.

Notice it depends only on Σ\Sigma, not on μ\mu, which is why the GMV portfolio is the practitioner's refuge when expected returns are too noisy to trust (see Pitfalls of Mean-Variance Optimization).

Two-fund theorem

Because w=λΣ1μ+γΣ11w = \lambda\Sigma^{-1}\mu + \gamma\Sigma^{-1}\mathbf{1} is affine in μp\mu_p, any two distinct frontier portfolios span the entire frontier: a convex combination of them is again a frontier portfolio. Hence all investors, whatever their risk appetite, can be served by just two mutual funds. This is the two-fund separation theorem, the origin of index-plus-bond investing.

Adding a risk-free asset: the tangency portfolio and CML

Introduce a risk-free rate rfr_f (lend or borrow freely). Now an investor splits between the risk-free asset and one portfolio of risky assets. Maximizing the Sharpe ratio SR(w)=(wμrf)/wΣw\text{SR}(w) = (w^\top\mu - r_f)/\sqrt{w^\top\Sigma w} over the budget constraint gives the tangency portfolio

wtan=Σ1(μrf1)1Σ1(μrf1).w_{\text{tan}} = \frac{\Sigma^{-1}(\mu - r_f\mathbf{1})}{\mathbf{1}^\top \Sigma^{-1}(\mu - r_f\mathbf{1})}.

(Note the family resemblance to multi-asset The Kelly Criterion sizing, Σ1μ\Sigma^{-1}\mu, same object, differently normalized.) Combining the risk-free asset with wtanw_{\text{tan}} traces a straight line in (σ,μ)(\sigma, \mu) space, the capital market line:

E[Rp]=rf+E[Rtan]rfσtanσp.\mathbb{E}[R_p] = r_f + \frac{\mathbb{E}[R_{\text{tan}}] - r_f}{\sigma_{\text{tan}}}\,\sigma_p.

Its slope is the maximum attainable Sharpe ratio, and it is tangent to the risky-asset hyperbola at wtanw_{\text{tan}}. Every efficient portfolio is now a mix of one risky fund and cash, the sharper form of two-fund separation, and the launchpad for the The Capital Asset Pricing Model (CAPM).

Worked example

Two assets: μ=(0.08, 0.12)\mu = (0.08,\ 0.12)^\top, volatilities 0.150.15 and 0.250.25, correlation ρ=0.30\rho = 0.30, so

Σ=(0.02250.0112500.0112500.0625).\Sigma = \begin{pmatrix} 0.0225 & 0.011250 \\ 0.011250 & 0.0625 \end{pmatrix}.

The GMV weight in asset 1 is w1=(σ22ρσ1σ2)/(σ12+σ222ρσ1σ2)w_1 = (\sigma_2^2 - \rho\sigma_1\sigma_2)/(\sigma_1^2 + \sigma_2^2 - 2\rho\sigma_1\sigma_2). Numerically w1=(0.06250.01125)/(0.0225+0.06250.0225)=0.05125/0.0625=0.82w_1 = (0.0625 - 0.01125)/(0.0225 + 0.0625 - 0.0225) = 0.05125/0.0625 = 0.82, so w2=0.18w_2 = 0.18. That portfolio has variance wΣw0.0189w^\top\Sigma w \approx 0.0189, i.e. volatility 13.7%\approx 13.7\%, below the 15% vol of asset 1 and far below asset 2's 25%. Diversification has produced a portfolio less risky than either constituent: the frontier bulges to the left of the individual assets precisely because ρ<1\rho < 1. With rf=0.03r_f = 0.03, the tangency portfolio tilts toward the higher-Sharpe asset and defines the CML the investor levers up or down.

Failure modes

  • Garbage inputs. The frontier is a deterministic function of (μ,Σ)(\mu, \Sigma); estimation error in μ\mu makes the efficient frontier itself a random object, and the "optimal" portfolio can be wildly wrong. This is Pitfalls of Mean-Variance Optimization in full.
  • Ill-conditioned Σ\Sigma. When assets number near the sample length, Σ1\Sigma^{-1} amplifies noise; see Covariance Matrix Estimation and Ledoit-Wolf Covariance Shrinkage.
  • No constraints. Unconstrained frontiers routinely demand enormous long-short positions; adding no-short or turnover constraints bends the frontier inward but stabilizes it.
  • Non-Gaussian returns. Variance is only the right risk measure under elliptical returns or quadratic utility; fat tails argue for Expected Shortfall (CVaR) instead.

In interviews

Be ready to set up the Lagrangian and show that the optimal weights are w=λΣ1μ+γΣ11w = \lambda\Sigma^{-1}\mu + \gamma\Sigma^{-1}\mathbf{1}, the step that instantly gives two-fund separation. State the GMV portfolio Σ11/(1Σ11)\Sigma^{-1}\mathbf{1}/(\mathbf{1}^\top\Sigma^{-1}\mathbf{1}) and note it ignores μ\mu. Explain why the frontier is a hyperbola and where the tangency portfolio sits. A classic follow-up: "why does adding a risk-free asset turn the curve into a line?", because you are now mixing a point (cash, zero variance) with a single fund, and mixing is linear in (σ,μ)(\sigma,\mu). See Sharpe Ratio and The Capital Asset Pricing Model (CAPM) for where this leads.

Related concepts

Practice in interviews

Further reading

  • Markowitz (1952), Portfolio Selection, Journal of Finance
  • Merton (1972), An Analytic Derivation of the Efficient Portfolio Frontier
  • Grinold & Kahn, Active Portfolio Management (Ch. 2)
ShareTwitterLinkedIn