Tools › Investing › Portfolio and Risk › Efficient Frontier › Method
Efficient Frontier: Method
Open the Efficient Frontier tool
Efficient Frontier: Method
What it does
Given a few holdings, the page finds the mixes that carry the least risk for each level of expected return. That set of mixes is the efficient frontier of Harry Markowitz (1952). Two points on it are singled out: the minimum-variance portfolio, the least volatile mix of all, and the maximum-Sharpe portfolio, the mix with the most expected return above the risk-free rate per unit of volatility. Equal-weight and risk-parity portfolios are listed beside them, and a sensitivity table shows how much the answer depends on the return estimates.
The method
Inputs. For each holding i: the expected return μi and the volatility σi (standard deviation of the yearly return), both in percent per year; for each pair, the correlation ρij between −1 and 1. The covariance is σij = ρij σi σj, and Σ is the matrix of covariances. With pasted returns the page estimates these from the history: μi is the mean return of a period times the number of periods in a year N, σi is the sample standard deviation times √N, and the correlations are the sample correlations.
A portfolio is a set of weights wi that sum to 1. Its expected return is E = Σ wi μi. Its variance is σp² = Σi Σj wi wj σij, and its volatility σp is the square root. Writing ci = Σj σij wj for the covariance of holding i with the whole portfolio, σp² = Σ wi ci, and wi ci / σp² is the share of the risk that holding i contributes. The Sharpe ratio is S = (E − rf) / σp, with rf the risk-free rate.
The frontier. For each expected return E the frontier portfolio minimises σp² subject to Σ wi μi = E and Σ wi = 1. Equivalently, it minimises ½ σp² − λ E for a number λ ≥ 0 that sets how much risk is traded for return: λ = 0 gives the minimum-variance portfolio and larger λ moves up the frontier.
Without limits on the weights (shorting allowed, no maximum weight) the answer is a formula (Merton, 1972). With Σ−1 the inverse of the covariance matrix and 1 a vector of ones, define
A = 1′Σ−1μ, B = μ′Σ−1μ, C = 1′Σ−11, D = B C − A².
Then the frontier is σ² = (C E² − 2 A E + B) / D. The minimum-variance portfolio has weights Σ−11 / C, return A / C and variance 1 / C. The maximum-Sharpe (tangency) portfolio has weights Σ−1(μ − rf 1) / (A − C rf), return (B − A rf) / (A − C rf) and Sharpe ratio √(B − 2 A rf + C rf²). It exists only when rf is below the minimum-variance return A / C.
With limits (long-only: wi ≥ 0; a maximum weight: wi ≤ wmax) there is no formula, and the page solves the same minimisation as a quadratic programme by an active-set method. Starting from equal weights, it computes the best weights of the holdings that are currently free, treating the others as fixed at their limits; it steps toward that solution and fixes any weight that reaches a limit on the way; when no further step is possible it releases a fixed weight if doing so lowers the objective; it stops when no release helps. The maximum-Sharpe portfolio is the frontier point at which λ (E − rf) = σp², the condition that the Sharpe ratio stops rising, found by bisection on λ. A target return or target volatility is found the same way.
Capital market line. Mixing the maximum-Sharpe portfolio with the risk-free asset gives the straight line E = rf + S σ, which touches the frontier at that portfolio.
Comparison portfolios. Equal weight: wi = 1/n. Risk parity (equal risk contribution): the weights for which wi ci is the same for every holding, found by updating one holding at a time until the weights settle. Neither uses the expected returns.
Sensitivity. The maximum-Sharpe calculation is repeated with one expected return raised, then lowered, by one percentage point, and the new weights are tabulated with the largest change in any one weight.
What it assumes
One period, with risk measured by the variance of return alone; the entered expected returns, volatilities and correlations are taken as known and constant; holdings can be bought in any fraction with no costs or taxes; with shorting allowed, short sales are unlimited and their proceeds are fully available. Estimates from pasted returns assume that the future resembles the sample: the arithmetic mean of a period is scaled by the number of periods, and returns of different periods are treated as uncorrelated when the volatility is scaled by √N.
When it misleads
The weights are very sensitive to the expected returns, and expected returns are the input known least well. The standard error of a mean return estimated from T years of history is about σ / √T: for a holding with 16 percent volatility and ten years of data that is 5 percentage points, several times the differences between holdings that drive the optimiser. The optimiser treats each estimate as exact and puts the most weight on the holdings whose returns happen to be overestimated and whose risks are underestimated, an effect Michaud (1989) called error maximisation. The sensitivity table on the results page shows its size for the entered case. Other limits: variance treats gains and losses alike and says little about rare large losses; correlations tend to rise in market declines, so the diversification measured in calm periods can be smaller when it is needed; and a frontier computed from past returns describes the past sample, not a forecast.
Worked example
The default case: four illustrative asset classes with expected returns 7.0, 7.5, 3.5 and 6.0 percent, volatilities 16, 18, 5 and 14 percent, correlations 0.75 (1–2), 0.10 (1–3), 0.60 (1–4), 0.10 (2–3), 0.55 (2–4) and 0.20 (3–4), and a risk-free rate of 2.5 percent. The numbers are illustrative, not forecasts.
Covariances, in percent squared: σ11 = 16² = 256, σ12 = 0.75 × 16 × 18 = 216, σ13 = 0.10 × 16 × 5 = 8, and so on. Inverting the 4 × 4 matrix and summing gives A = 0.15695, B = 0.64377, C = 0.041911, D = 0.0023495.
Minimum variance: E = A / C = 0.15695 / 0.041911 = 3.74 percent; σ = √(1 / C) = √23.86 = 4.88 percent, below the 5 percent of the bonds alone. Weights 4.8, 0.9, 92.7 and 1.6 percent.
Maximum Sharpe: A − C rf = 0.15695 − 0.041911 × 2.5 = 0.05217; E = (0.64377 − 0.15695 × 2.5) / 0.05217 = 4.82 percent; S = √(0.64377 − 2 × 0.15695 × 2.5 + 0.041911 × 2.5²) = √0.12096 = 0.348; σ = (4.82 − 2.5) / 0.348 = 6.67 percent. Weights 15.2, 13.5, 61.4 and 9.9 percent. All weights are positive, so the long-only answer is the same.
Check by the weights: E = 0.1517 × 7.0 + 0.1354 × 7.5 + 0.6142 × 3.5 + 0.0986 × 6.0 = 4.82 percent.
Sensitivity: lowering the expected return of the bonds from 3.5 to 2.5 percent, the risk-free rate, takes their long-only weight from 61.4 percent to zero; raising the first holding's return by one point takes its weight from 15.2 to 33.2 percent.
This page is a calculator for education and analysis, not investment advice.