CM2 · explained

Mean-variance portfolio theory: the efficient frontier and why diversification works

Two risky assets held together can be less risky than either of them alone. That single fact is where portfolio theory starts and where the rest of the asset-valuation syllabus comes from. This page builds the frontier from two assets and finds the minimum-variance portfolio.

CM2 · Financial Engineering & Loss Reserving · 11 min read

After this page you can

Calculate the mean and variance of a portfolio, find the minimum-variance combination of two assets, and explain the effect of correlation on the frontier

The one surprising fact

A portfolio's expected return is the weighted average of the expected returns of what is in it. Its risk is not the weighted average of the risks. It is almost always less, and sometimes less than the risk of every single holding.

That asymmetry is the whole of portfolio theory. Return adds up; risk partly cancels. Everything else — the efficient frontier, the Capital Asset Pricing Model, the reason an index fund exists — is a consequence of it.

The two formulae

For a portfolio holding a fraction w of asset X and 1 − w of asset Y:

E[Rp] = w E[RX] + (1 − w) E[RY]

In words: the expected return is the weighted average. Nothing clever happens here.

Var[Rp] = w2σX2 + (1 − w)2σY2 + 2w(1 − w)ρσXσY

In words: each asset contributes its own variance scaled by the square of its weight, and then there is a cross term that depends on how the two move together.

Everything interesting is in the cross term. The two squared terms are always positive and shrink fast as the weights spread out, because they are squared. The cross term carries the sign of the correlation, so a correlation below 1 drags the total below what the weighted average of the standard deviations would give. That drag is diversification.

For more than two assets the same formula grows a cross term for every pair:

Var[Rp] = ∑i ∑j wi wj σij

which is where the data problem comes from. A hundred assets need 100 variances and 100 × 99 / 2 = 4,950 covariances, every one of them estimated. That number is the reason factor models and the Capital Asset Pricing Model exist.

What correlation does to the frontier

Plot every achievable combination with expected return up the page and standard deviation across it, and the two-asset portfolios trace a curve between the two assets. Its shape depends entirely on ρ:

  • ρ = +1. The curve collapses to a straight line. The standard deviation is the weighted average of the two standard deviations and there is no diversification at all. This is the only case with no benefit, and it is the benchmark everything else is measured against.
  • −1 < ρ < 1. The curve bows out to the left of that line. The further ρ is below 1, the more it bows, and the bigger the gain from holding both.
  • ρ = −1. The curve becomes two straight lines meeting the vertical axis: there is a combination with zero variance. Two perfectly opposed risky assets can be combined into something riskless.

The point worth carrying away is that the gain from diversification comes from low correlation, not from low risk in the individual holdings. Adding a volatile asset that moves differently can reduce a portfolio's risk; adding a quiet asset that moves with everything else may not.

The minimum-variance portfolio

Differentiating the variance with respect to w and setting the result to zero gives the combination with the least risk available:

wmin = (σY2 − ρσXσY) / (σX2 + σY2 − 2ρσXσY)

In words: the weight in X is the variance of Y less the covariance, over the sum of the two variances less twice the covariance.

It is worth noticing what the numerator says. The weight in X is positive only when σY2 exceeds the covariance, which is why the lower-risk asset usually gets the larger weight but not always, and why a weight can come out above 1 or below 0 — a short position — when one asset is both much safer and highly correlated with the other.

The minimum-variance portfolio has a property that makes a superb arithmetic check, and it is worth seeing why. At the minimum, a small shift of weight towards either asset must leave the variance unchanged to first order. Writing that condition out shows that

Cov(Rmin, RX) = Cov(Rmin, RY) = Var(Rmin)

Every asset has the same covariance with the minimum-variance portfolio, and that common value is the portfolio's own variance. Compute the two covariances and compare them with the variance: three numbers that must be identical, arrived at by different sums. The worked example below uses it.

Efficient, and the portfolios that are not

A portfolio is efficient if no other portfolio offers more expected return at the same or lower risk. Only the part of the curve above the minimum-variance point qualifies: the efficient frontier. Everything below it is dominated, because you could keep the same risk and earn more.

That has a consequence worth stating plainly. An individual asset is usually not efficient. On the example below, holding only the low-risk asset gives 7.0% at a 10.00% standard deviation, while a mix gives 7.53% at 9.79% — more return for less risk. Anyone holding only the safe asset is giving away both.

The formal theory then assumes investors care only about mean and variance, and so pick a point on that frontier according to how risk-averse they are. That assumption is exactly where the utility theory of the first topic connects: a mean-variance decision is the decision a quadratic-utility investor makes, or any investor whose returns are normally distributed.

What the theory assumes, and what breaks

  • Only mean and variance matter. Skewness and fat tails are invisible to it, which is a serious limitation for anything option-like: selling far-out-of-the-money options looks excellent to a mean-variance optimiser.
  • One period, with no intermediate decisions. There is no rebalancing and no horizon longer than the one modelled.
  • The inputs are known. They are not. Expected returns in particular are estimated with enormous error, and an optimiser treats them as exact — which is why it so often recommends extreme weights, concentrating on whichever asset's expected return happened to be overestimated.
  • Unlimited short selling and no transaction costs or taxes.
  • Returns are described by a joint distribution with a stable covariance matrix. Correlations in particular rise in a crisis, which is precisely when the diversification was relied on.

The last two points together are the honest summary: the framework is right about how risk combines and unreliable about the numbers you feed it. That is why it is used to understand structure rather than to pick holdings to three decimal places.

Questions students ask

How many assets does it take to be diversified?

Fewer than people expect for most of the benefit and more than people expect for all of it. The specific risk of an equally weighted portfolio of N similar assets falls like 1/N, so going from one asset to ten removes about 90% of it and going from ten to a hundred removes most of what is left. What never goes away is the part driven by whatever the assets have in common, and that floor is the systematic risk the Capital Asset Pricing Model goes on to price.

Can the minimum-variance portfolio really be less risky than both assets?

Yes, whenever ρ is low enough, and it is the single most useful thing the theory says. The example below reaches a 9.79% standard deviation from assets whose own standard deviations are 20% and 10%. There is no sleight of hand: the two assets' movements partly cancel, and cancellation is not available to someone holding one of them.

Why does the optimiser recommend such strange weights in practice?

Because it believes its inputs. Expected returns are estimated with standard errors comparable to the differences between them, so a small estimation error becomes a large shift in the recommended holding. The practical responses are to constrain the weights, to shrink the estimated means towards a common value, or to optimise on variance alone — which needs no expected returns and is why minimum-variance portfolios are used in practice far more than the theory alone would suggest.

What changes when a risk-free asset is available?

The frontier becomes a straight line from the risk-free rate through one particular risky portfolio, and every investor holds a combination of those two things only. That line is the capital market line and that portfolio is the market portfolio, and the step from this page to the Capital Asset Pricing Model is exactly that observation.

A worked example

Two risky assets:

AssetExpected returnStandard deviation
X12%20%
Y7%10%

The correlation between their returns is 0.3. Both assets and all three figures are invented for this example.

Work in percentage points, so variances are in squared percentage points throughout.

  1. The covariance

    σXY = ρσXσY = 0.3 × 20 × 10 = 60
  2. The minimum-variance weights

    wmin = (100 − 60) / (400 + 100 − 120) = 40 / 380 = 0.1052632

    So 10.53% in X and 89.47% in Y. The safer asset takes most of the money, as it usually does, but not all of it.

  3. The mean and variance of that portfolio

    E[R] = 0.1052632 × 12 + 0.8947368 × 7 = 7.5263158%
    w2σX2 = 0.10526322 × 400 = 4.4321330
    (1−w)2σY2 = 0.89473682 × 100 = 80.0554017
    2w(1−w)σXY = 2 × 0.1052632 × 0.8947368 × 60 = 11.3019391
    Var = 95.7894737, so σ = √95.7894737 = 9.7872097%
  4. The first check: the covariance property

    At the minimum, the portfolio's covariance with each asset must equal its own variance. Neither calculation below reuses the variance found above.

    Cov(P, X) = wσX2 + (1−w)σXY = 0.1052632 × 400 + 0.8947368 × 60
        = 42.1052632 + 53.6842105 = 95.7894737
    Cov(P, Y) = wσXY + (1−w)σY2 = 0.1052632 × 60 + 0.8947368 × 100
        = 6.3157895 + 89.4736842 = 95.7894737

    Three numbers, identical to seven decimal places, from three different sums. If the weight had been wrong, these two covariances would differ from each other and from the variance, and the gap would point to which way the weight should move.

  5. The second check: search for the minimum directly

    Evaluate the variance at a million weights between 0 and 1 and keep the smallest. The search returns a minimum variance of 95.7894737 at a weight of 0.105263. The formula and the brute-force search agree, which is worth doing once in your life so that the formula stops being something to remember.

  6. The frontier

    Weight in XExpected returnStandard deviation
    0.0007.0000%10.0000%
    0.1057.5263%9.7872%
    0.2508.2500%10.1858%
    0.5009.5000%12.4499%
    0.75010.7500%15.9295%
    1.00012.0000%20.0000%

    Read the first two rows together, because they contain the whole lesson. Holding only Y gives 7.00% at a 10.00% standard deviation. Shifting a tenth of the money into the riskier asset gives 7.53% at 9.79% — half a point more return and a fifth of a point less risk. Holding only Y is therefore inefficient, and the asset that fixed it was the volatile one.

    Notice also that the standard deviation at a weight of 0.25 has already climbed back above 10%, while the return is still rising. The curve turns at the minimum-variance point and only the part above it is efficient.

  7. How much of this is the correlation?

    Put ρ = 1 and the diversification vanishes. A half-and-half portfolio would then have a standard deviation of

    √(0.25 × 400 + 0.25 × 100 + 2 × 0.25 × 200) = √225 = 15.0000%

    which is exactly the weighted average of 20% and 10%. At ρ = 0.3 the same portfolio has a standard deviation of 12.4499% instead. The 2.55 percentage points between those two figures is the diversification benefit, and it came from nothing but the correlation being 0.3 rather than 1.

    At the other extreme, ρ = −1 makes a riskless combination possible, at a weight of σY/(σX + σY) = 10/30 = 1/3 in X:

    Var = (1/9) × 400 + (4/9) × 100 + 2 × (1/3) × (2/3) × (−200)
        = 44.4444 + 44.4444 − 88.8889 = 0.0000000000

    Zero variance, and an expected return of 7 + 5/3 = 8.6666667% — a riskless 8.67% built out of two assets with 20% and 10% standard deviations. No such pair of assets exists, which is the point: the arithmetic shows the mechanism in its purest form, and real correlations sit between the extremes.

  8. And the data the method needs

    Two assets needed one covariance. Ten would need 45, a hundred would need 100 × 99 / 2 = 4,950, and each one has to be estimated from a finite history. That single count is why the next topic in the syllabus replaces the covariance matrix with one beta per asset.

Where this fits in CM2

This page explains one idea from CM2 Financial Engineering & Loss Reserving. The full CM2 syllabus, with what each part is examined on, sits on the course page, and past-paper style mock exams with full solutions are where you find out whether the idea has stuck under time pressure.

Other CM2 topics explained

Stuck on a term rather than the idea? The actuarial glossary defines the notation used above. If something here is wrong or unclear, tell us — these pages get corrected.