Portfolio theory · Part 21 of 30

Mean-variance optimisation and the efficient frontier

Expert 22 min

Compute the risk of a two-asset portfolio with correlation, find the minimum-variance mix and understand the efficient frontier and Sharpe ratio.

What you will learn

  • You can compute expected return and volatility of a two-asset portfolio.
  • You can explain why correlation below 1 creates a diversification benefit.
  • You can identify the minimum-variance portfolio, the efficient frontier and the Sharpe ratio.

Before this: Investing basics: risk, diversification and index funds

Markowitz's idea

In 1952 Harry Markowitz published Portfolio Selection and changed investing: instead of judging each investment alone, judge how it changes the portfolio. He described each portfolio by two numbers — expected return (mean) and risk measured as the variance (or its square root, the standard deviation, called volatility) — and asked which portfolios give the most return for each level of risk. Markowitz received the 1990 Nobel memorial prize for this work, shared with William Sharpe and Merton Miller.

A curved path of stepping stones along a river bank

Two assets: the formulas

For weights w and 1 − w in assets A and B with expected returns μ, volatilities σ and correlation ρ:

  • Expected return: μp = w·μA + (1 − w)·μB — a simple weighted average.
  • Variance: σp² = w²σA² + (1 − w)²σB² + 2w(1 − w)·ρ·σA·σB.

The return is a weighted average, but the risk is not unless ρ = 1. Whenever the correlation is below 1, the portfolio is less risky than the weighted average of the volatilities. That gap is the diversification benefit.

A worked example

Shares: μ = 7 %, σ = 16 %. Bonds: μ = 3 %, σ = 6 %. Correlation ρ = 0.1 (these are illustrative assumptions, not forecasts).

  • 60 % shares / 40 % bonds: μ = 5.4 %; σ = √(0.36·0.0256 + 0.16·0.0036 + 2·0.6·0.4·0.1·0.16·0.06) ≈ 10.1 % — well below the weighted average of 12 %.
  • 20 % shares / 80 % bonds: μ = 3.8 %, σ ≈ 6.0 % — about the same risk as 100 % bonds, but 0.8 points more return. Adding some of the riskier asset made the portfolio better.
  • The minimum-variance mix is w* = (σB² − ρσAσB) ÷ (σA² + σB² − 2ρσAσB) ≈ 9.7 % shares, with σ ≈ 5.8 %.
A curve of portfolios in risk-return space bending left from 100 % bonds to a minimum-variance point and up to 100 % shares
Two-asset frontier: the upper part from the minimum-variance point is efficient

The efficient frontier

Plot every possible mix with volatility on the x-axis and expected return on the y-axis and you get a curve that bulges to the left. The part above the minimum-variance point is the efficient frontier: for each risk level, nothing gives more expected return. Portfolios below it are inefficient — you could get more return for the same risk. With many assets the same logic holds; the optimisation is solved numerically.

Adding a risk-free asset: the Sharpe ratio

If you can also hold a risk-free asset (rate rf), you can combine it with any risky portfolio along a straight line. The steepest such line touches the frontier at the tangency portfolio, which has the highest Sharpe ratio:

Sharpe = (μp − rf) ÷ σp

With rf = 2 %, the 60/40 example has a Sharpe ratio of (5.4 − 2) ÷ 10.1 ≈ 0.34. Every investor, in this model, holds the tangency portfolio and adjusts risk by mixing it with cash or borrowing.

The catch: inputs

Mean-variance optimisation is very sensitive to its inputs. Expected returns are hard to estimate; small changes swing the "optimal" weights wildly, and optimisers tend to load up on assets whose returns were overestimated ("error maximisation"). Practitioners therefore constrain weights, use long-run or market-implied returns (the Black–Litterman approach, 1992) or simply hold broad market-cap-weighted portfolios. Volatility also misses tail risk — more on that in the risk-measures lesson.

Try it: Two-asset portfolio lab

Mix a riskier and a safer asset, change the correlation and see expected return, volatility and the efficient frontier.

Turn on JavaScript to use this lab. Worked example:

With 60 % in an asset returning 7 % (volatility 16 %) and 40 % in one returning 3 % (volatility 6 %), correlation 0.1, the portfolio expects 5.4 % with about 10.1 % volatility. The minimum-variance mix holds about 9.7 % of the riskier asset.

Key points

  • Portfolio return is a weighted average; portfolio risk is lower than the average whenever correlation < 1.
  • σp² = w²σA² + (1 − w)²σB² + 2w(1 − w)ρσAσB.
  • The efficient frontier is the set of portfolios with the highest return for each risk level.
  • With a risk-free asset, the best risky portfolio maximises the Sharpe ratio (μ − rf) ÷ σ.
  • Optimisers are very sensitive to expected-return inputs — use constraints or market weights.

Flashcards

Question: Formula for the variance of a two-asset portfolio?
Answer: w²σA² + (1 − w)²σB² + 2w(1 − w)ρσAσB.
Question: When is there no diversification benefit?
Answer: When the correlation is exactly 1.
Question: What is the efficient frontier?
Answer: The portfolios with the highest expected return for each level of risk.
Question: Define the Sharpe ratio.
Answer: (Expected portfolio return − risk-free rate) ÷ portfolio volatility.

Check yourself

Think about your answer, then open it. In the app the quiz is interactive, earns points and brings back what you missed.

  1. Portfolio: 50 % in an asset with 8 % expected return, 50 % with 4 %. Expected portfolio return?

    Show the answer

    6 % (± 0.01 %)

    0.5 × 8 + 0.5 × 4 = 6 %.

    Source: Markowitz 1952

  2. Two assets, each σ = 20 %, correlation 0, 50/50 mix. Portfolio volatility? (percent, 1 decimal)

    Show the answer

    14.1 % (± 0.1 %)

    σ² = 0.25·0.04 + 0.25·0.04 = 0.02; σ ≈ 14.1 %.

    Source: MIT OCW 15.401

  3. Expected return 6 %, risk-free 2 %, volatility 10 %. Sharpe ratio?

    Show the answer

    0.4 (± 0.005)

    (6 − 2) ÷ 10 = 0.4.

    Source: Sharpe 1964

  4. Why do practitioners constrain mean-variance optimisers?

    • They are too slow
    • The weights react strongly to small errors in expected returns
    • Variance cannot be computed
    • Correlations are always 1
    Show the answer

    The weights react strongly to small errors in expected returns

    Input sensitivity leads to extreme, unstable weights.

    Source: MIT OCW 15.401

  5. Which statements are true?

    • Portfolio return is a weighted average of asset returns
    • Portfolio volatility is always the weighted average of volatilities
    • With correlation below 1, diversification lowers risk
    • The efficient frontier lies above the minimum-variance portfolio
    Show the answer

    Portfolio return is a weighted average of asset returns; With correlation below 1, diversification lowers risk; The efficient frontier lies above the minimum-variance portfolio

    Volatility equals the weighted average only when correlation is 1.

    Source: Markowitz 1952

Sources

Facts checked on 2026-11-30. Skillgrove lessons are free learning material — no certificate and no accreditation.