Sub topic 6
Mean-Variance Optimization and the Efficient Frontier
This chapter assumes you know risk, return, correlation and diversification from Levels I and II. It also assumes you have seen the efficient frontier and know what a covariance is. The chapter shows how those pieces turn into a working optimizer, what the optimizer returns, and where it misleads.
What mean-variance optimization does
Mean-variance optimization (MVO) chooses asset class weights using three inputs for each asset class:
- an expected return
- a standard deviation (volatility)
- a correlation with every other asset class
Variance is the only measure of risk it uses. For each target level of risk, MVO finds the weights with the highest expected return. Equivalently, for each target return it finds the weights with the lowest risk.
For weights $w_i$, the portfolio's expected return and variance are:
- Expected return: $E(Rp) = \sum wi E(R_i)$
- Variance: $\sigmap^2 = \sumi \sumj wi wj \sigmai \sigmaj \rho{ij}$
Return is a weighted average, so it is linear in the weights. Variance includes the correlation terms, so it is not. Diversification comes from that difference. When correlation is below 1, portfolio risk is less than the weighted average of the individual risks.
The optimization is usually run with constraints:
| Constraint | Typical form | Why it is used |
|---|---|---|
| Fully invested | weights sum to 1 | No hidden cash or leverage |
| No short selling | each weight ≥ 0 | Most institutional IPS documents prohibit shorting |
| Maximum weight | for example, ≤ 40% in one class | Avoids concentration |
| Minimum weight | for example, ≥ 5% in bonds | Liquidity or policy needs |
Without the no-short and cap constraints, the optimizer will often propose extreme long and short positions. Those are valid mathematically but cannot be implemented by most investors.
Building the frontier
The efficient frontier is the set of portfolios that offer the highest expected return for each level of risk. It is drawn in expected return versus standard deviation space.
Several points on the curve have names:
- Global minimum-variance (GMV) portfolio: the leftmost point, which has the lowest risk of any fully invested mix. Portfolios below it on the same curve are inefficient, because a higher-return portfolio exists at the same risk.
- Efficient frontier: the curve from the GMV portfolio upward and to the right.
- Tangency portfolio: when a risk-free asset is available, the portfolio on the frontier with the highest Sharpe ratio. The line from the risk-free rate through it is the capital allocation line.
The next diagram shows the workflow from inputs to a chosen portfolio.
The optimizer does not decide which portfolio you hold. It produces the menu of efficient portfolios. The IPS (the investor's return objective, risk tolerance and constraints) decides which point on the menu fits.
A two-asset worked example
With two assets, the GMV weight has a closed form. Let asset 1 have volatility $\sigma1$, asset 2 have $\sigma2$, and correlation $\rho$. Then the weight in asset 1 is:
$$w1 = \frac{\sigma2^2 - \rho\sigma1\sigma2}{\sigma1^2 + \sigma2^2 - 2\rho\sigma1\sigma2}$$
Take equities with a 15% volatility, bonds with a 6% volatility, and a correlation of 0.2.
def min_var_weight(s1, s2, rho):
"""Weight in asset 1 that minimizes two-asset portfolio variance."""
cov = rho * s1 * s2
return (s2**2 - cov) / (s1**2 + s2**2 - 2 * cov)
w = min_var_weight(0.15, 0.06, 0.2)
print(round(w, 4)) # 0.08The minimum-variance mix is 8% equities and 92% bonds. Its volatility is below 6%, which is the volatility of the lower-risk asset held alone. Adding a small amount of a riskier asset reduces total risk because the correlation is low.
Now trace several points along the curve. Assume expected returns of 8% for equities and 3% for bonds.
def stats(w, r1, r2, s1, s2, rho):
"""Expected return and standard deviation of a two-asset mix."""
ret = w * r1 + (1 - w) * r2
var = (w * s1) ** 2 + ((1 - w) * s2) ** 2 + 2 * w * (1 - w) * rho * s1 * s2
return ret, var ** 0.5
for w in [0.0, 0.08, 0.25, 0.5, 1.0]:
ret, sd = stats(w, 0.08, 0.03, 0.15, 0.06, 0.2)
print(f"w_equity={w:.2f} return={ret:.2%} sd={sd:.2%}")
# w_equity=0.00 return=3.00% sd=6.00%
# w_equity=0.08 return=3.40% sd=5.88%
# w_equity=0.25 return=4.25% sd=6.41%
# w_equity=0.50 return=5.50% sd=8.62%
# w_equity=1.00 return=8.00% sd=15.00%The 0% equity row has the same risk as the all-bond portfolio but a lower return than the 8% row. The all-bond portfolio is therefore inefficient. It lies below the GMV point, so the frontier starts at 8% equities.
Reading the result
Moving along the frontier, each extra unit of risk buys less extra return. The curve is concave, which is the practical meaning of diversification: the first dollars moved from bonds to equities help a lot, and the later ones help less.
The GMV weight depends on correlation. If $\rho$ equals $\sigma2/\sigma1$, the numerator is zero and the GMV portfolio is 100% in the lower-risk asset. If correlation is higher than that ratio, the formula returns a negative weight on the riskier asset, which is a short position. Under a no-short constraint, the GMV portfolio becomes all lower-risk asset.
Adding a risk-free asset
If the investor can lend or borrow at the risk-free rate, the best risky portfolio is the tangency portfolio. It is the same for every investor, whatever their risk tolerance. Investors differ only in how much they put in it. A conservative investor holds the tangency portfolio plus cash. An aggressive investor borrows to hold more than 100% of it.
This separation is a useful theoretical result. In practice, most IPS documents limit leverage, and cash and borrowing rates differ. Many practitioners therefore select a point on the risky-asset frontier directly.
Where MVO goes wrong
MVO is a mechanical procedure, and its output is only as good as its inputs. The common errors:
- Error maximization. The optimizer overweights asset classes whose expected return is overestimated and whose risk or correlation is underestimated. Small input errors produce large weight changes.
- Concentrated corner solutions. Without constraints, the result often puts most of the portfolio in a few classes.
- Unstable weights. Re-running the optimization with slightly different inputs can swap which assets are included.
- Single-period, variance-only view. MVO ignores skewness, fat tails and changes over time. It also treats upside and downside deviations as equally risky, and it does not model liabilities.
- Illiquid asset returns. Appraisal-based returns look smooth and so understate volatility and correlation. MVO then favors those assets too heavily.
Later chapters cover remedies: resampling, Black-Litterman, Monte Carlo simulation and risk budgeting. Basic fixes within MVO itself are to add weight constraints, use shrinkage on estimated inputs, and use long-run equilibrium assumptions rather than recent history.
Practical checklist
- Check that the asset classes are distinct, with low-to-moderate correlations, so the optimizer has real diversification to find.
- Use expected returns that are internally consistent. Equity returns should exceed bond returns in line with risk, and all values should be on the same time basis.
- Apply the IPS constraints in the optimizer, not afterward.
- Compare the chosen portfolio with its neighbors on the frontier. If risk and return change little between them, the exact choice matters little.
- Report the results as ranges and scenarios, not as a single optimal answer.
Exercise
Equities have a 20% volatility, bonds have a 10% volatility, and their correlation is 0.5. What is the global minimum-variance weight in equities, and what does the result tell you?
Show answer
The covariance is 0.5 × 0.20 × 0.10 = 0.01. The numerator is σbonds² − cov = 0.01 − 0.01 = 0, so the equity weight is 0. The denominator is 0.04 + 0.01 − 0.02 = 0.03, and 0/0.03 = 0. Here the correlation (0.5) equals σbonds/σ_equities (10%/20% = 0.5), so adding any equities to an all-bond portfolio does not reduce risk. The GMV portfolio is 100% bonds.
Exercise
A client's IPS prohibits short selling and limits any single asset class to 30%. An unconstrained optimization returns a 60% equity, −10% commodity portfolio. Explain why the result is unusable and how to fix the optimization.
Show answer
The portfolio breaks both rules: a short position of −10% in commodities, and a 60% weight in one class, which exceeds the 30% cap. Add the constraints to the optimization (each weight ≥ 0 and ≤ 30%, weights summing to 100%) and re-run it. The constrained frontier will lie on or below the unconstrained one, and it is the one the investor can actually hold.
Exercise
You re-run an optimization after raising the expected return on emerging market equities by 0.5 percentage points. The emerging market weight rises from 8% to 19%. What does this indicate about the use of MVO, and what two steps would you take?
Show answer
It shows input sensitivity, or error maximization: a small change in one input produced a large change in weights. Two steps are to add maximum-weight constraints, and to use more robust methods such as resampling or Black-Litterman, or to shrink the input estimates toward long-run equilibrium values.