Now we compute. With the covariance matrix understood, this lesson turns the optimization problem into actual weights. Two portfolios sit at the heart of everything: the minimum-variance portfolio — the calmest possible mix, which needs no return forecast at all — and the maximum-Sharpe (tangency) portfolio — the best risk-adjusted bet, the point the capital market line touches the frontier. We’ll see where their closed-form solutions come from (the Lagrangian, ), and grind through a full two-asset example by hand so the formulas stop being symbols and start being numbers. This is the mechanical core of the course; the later lessons are all about why these clean formulas misbehave on real data.
Before you read — take a guess
Which of these two landmark portfolios requires you to forecast expected returns?
The minimum-variance portfolio
Analogy. Forget about chasing returns for a moment. Imagine you just want the smoothest ride — the portfolio that wobbles least, whatever the assets happen to earn. That’s the minimum-variance portfolio: the leftmost tip of the efficient frontier, the single point where risk bottoms out.
The problem. Minimize portfolio variance subject only to the budget constraint: Notice μ never appears. To solve it, form the Lagrangian (variance plus a multiplier times the constraint): Set the derivative to zero (), solve for , and impose the constraint. The result is the closed-form minimum-variance weights: In words: apply to a vector of ones, then rescale so the weights sum to one.
Worked example (two assets). Use , , , so For two assets there’s a tidy shortcut formula: Plug in: numerator ; denominator . So The min-variance portfolio holds about 10.5% in the volatile asset and 89.5% in the calm one — sensible, since the low-vol asset deserves most of the weight. Its variance: , so volatility — below even the calmer asset’s 10%, thanks to diversification.
- Expected return
- 12.9%
- Risk (volatility)
- 13.0%
The accent dot at the leftmost tip is the minimum-variance portfolio — the lowest risk any mix of these assets can achieve. It needs no return forecast: it falls out of the covariance matrix alone. Everything to its right on the upper arc trades extra risk for extra return.
Why min-var is a practitioner favorite
Because it ignores μ entirely, the minimum-variance portfolio dodges the single noisiest, hardest-to-estimate input in all of finance. Empirically, min-var and low-volatility portfolios have often beaten the cap-weighted market on a risk-adjusted basis — a big reason “low-vol” is a recognized factor. When in doubt about your return forecasts, leaning on Σ alone is a defensible move.
The minimum-variance portfolio.
Pick the right option for each blank, then check.
The minimum-variance portfolio minimizes subject to the weights summing to 1, and it depends on . Its closed form is Σ⁻¹𝟙 divided by , which just rescales the weights to sum to one.
The maximum-Sharpe (tangency) portfolio
Analogy. Now bring reward back in. Of all the portfolios you could build, which gives the most return per unit of risk? Draw a line from the risk-free rate and pivot it upward until it just kisses the frontier — that touch point is the tangency portfolio, and the steepest such line is the capital market line. Its slope is the highest Sharpe ratio attainable.
The problem. Maximize the Sharpe ratio Working through the optimization (define excess returns ), the tangency weights have the clean closed form Compare it to min-var: the only change is that the ones-vector is replaced by the excess-return vector . Min-var asks “what’s calmest?”; tangency asks “what’s calmest per unit of expected reward?” — so it tilts toward high-excess-return, low-risk assets.
Worked example (two assets). Keep , let and , so excess returns .
First compute . The determinant is . So Now :
- Row 1: .
- Row 2: .
Sum . Normalize: The tangency portfolio holds about 52% in the high-return asset and 48% in the low-return one — much more aggressive than min-var’s 10.5/89.5 split, because now the optimizer is paying for the first asset’s higher excess return.
- Market (tangency) portfolio
- 60%
- Risk-free asset
- 40%
- Expected return
- 7.2%
- Risk (volatility)
- 9.6%
- Sharpe ratio (slope)
- 0.44
- Allocation to the market portfolio
- Lending
The straight Capital Market Line runs from the risk-free rate and just touches the efficient frontier at the tangency portfolio — the maximum-Sharpe mix of risky assets. Slide the allocation: below the touch point you lend (hold some risk-free), above it you borrow to lever up. The line's slope is the best Sharpe ratio available.
Match each portfolio or term to its defining feature.
Pick a term, then click its definition.
The Lagrangian and the structure of the solution
Why a Lagrangian? We’re minimizing (or maximizing) subject to a constraint (weights sum to 1, maybe also hit a target return). The Lagrangian trick converts a constrained problem into an unconstrained one by adding a penalty term ; at the optimum, the gradient of the objective is parallel to the gradient of the constraint, which the multiplier measures.
The general efficient portfolio. For a target return with both constraints ( and ), the solution is a linear combination of two fixed portfolios — a beautiful result called two-fund separation: where and are fixed vectors built from , , and . As you slide , the weights move along a straight line in weight-space, sweeping out the entire efficient frontier. Every efficient portfolio is a blend of just two — say, the minimum-variance portfolio and the tangency portfolio. That’s why those two are the fundamental objects.
The unifying thread. Min-var (), tangency (), and the general efficient portfolio all route through . That shared dependence is the whole reason a noisy, ill-conditioned poisons every one of them — and why the fixes in later lessons (shrinking , constraining ) help all of them at once.
Two-fund separation: why is every efficient portfolio just a mix of two?
Because the efficient frontier is the solution set of a quadratic objective under linear constraints, and the math of such problems forces the solution to depend linearly on the target return r*. Linear dependence means: pick any two efficient portfolios (two different target returns), and every other efficient portfolio is a weighted average of those two. Concretely, if you know the minimum-variance portfolio and the tangency portfolio, you can reconstruct the entire frontier by blending them in different proportions — no further optimization needed. This is the portfolio-theory version of “two points determine a line.” It also has a famous practical corollary: once a risk-free asset exists, everyone holds the same tangency portfolio of risky assets and simply dials their risk up or down by mixing it with cash — the foundation of the Capital Asset Pricing Model. The whole apparatus collapses to two funds: one risky (tangency) and one riskless.
Both the minimum-variance and tangency portfolios share a common ingredient. Which is it, and why does it matter?
A common trap: confusing the two portfolios
Pitfall — “the optimal portfolio is the one with the lowest risk.” No. The lowest-risk portfolio is the min-variance one, but it’s usually not the best risk-adjusted bet. Unless you happen to want minimum risk above all else, the tangency portfolio (highest Sharpe) is the one to combine with cash to hit your risk target. Min-var is a corner of the frontier; tangency is the pivot point of the capital market line. They coincide only in the degenerate case where all expected excess returns are equal.
Pitfall — “more assets always lowers min-var risk.” Adding assets can lower min-variance risk in theory, but with estimation error a 500-asset min-var portfolio can be worse out of sample than a 30-asset one, because you’ve injected 125,000 noisy parameters. The clean formula assumes Σ is known; reality charges you for every parameter you estimate.
An investor says: 'I'll just hold the minimum-variance portfolio — it's the optimal one.' What's the most precise correction?
Putting it together
The minimum-variance portfolio (, normalized) is the calmest mix and depends on Σ alone — dodging the noisy μ estimate, which is why it’s robust and empirically strong. The tangency / maximum-Sharpe portfolio (, normalized) is the best risk-adjusted bet — the touch point of the capital market line — and needs both μ and Σ. Both come from a Lagrangian that builds the budget constraint into the objective, and both invoke . By two-fund separation, every efficient portfolio is a linear blend of these two, so they’re the fundamental building blocks. The shared reliance on is exactly why a noisy covariance matrix destabilizes the whole family — the problem we diagnose next.
Big picture
Mean-variance mechanics — the whole picture
- Mean-variance mechanics
- Minimum-variance
- Min wᵀΣw s.t. weights sum to 1
- Closed form: Σ⁻¹𝟙 normalized
- Needs only Σ — robust to bad μ
- Leftmost tip of the frontier
- Tangency (max-Sharpe)
- Max Sharpe = excess return / risk
- Closed form: Σ⁻¹μᵉ normalized
- Needs μ and Σ
- Touch point of the capital market line
- The Lagrangian
- Builds the constraint into the objective
- Multiplier λ measures the trade-off
- Derives both closed forms
- Two-fund separation
- Every efficient portfolio = blend of two
- Weights move linearly with target return
- All route through Σ⁻¹ → shared fragility
- Minimum-variance
Recap: mean-variance mechanics
Two assets have σ₁ = 30%, σ₂ = 10%, and ρ = 0. Using w₁ = (σ₂² − σ₁σ₂ρ)/(σ₁² + σ₂² − 2σ₁σ₂ρ), what is the minimum-variance weight in asset 1?
Check your answer to continue.
Next — estimation error and instability: we’ve built the clean machinery, so now we break it. We’ll see exactly why feeding estimated μ and Σ into these formulas turns the optimizer into an “error maximizer”, why the weights swing violently from sample to sample, and why the razor-sharp “optimal” portfolio so often loses to a dumb equal-weight one out of sample.