Basic Prerequisites: Calculus & KKT Optimization and Linear Algebra.


1. Intuition & Practical Objective

The efficient frontier is the set of portfolios with minimum variance for their expected return - the “no-waste” portfolios. Every other feasible portfolio is dominated: it has higher risk, or lower return, or both, than some frontier point. The practical objective of this page is the Merton (1972) closed form: the entire frontier as a single parabola in mean–variance space, plus the closed-form weights of every frontier portfolio.

The punchline is geometric. In space the frontier is a smooth concave curve whose optimal branch is exactly the efficient (north-east) half; in space it is a parabola. Everything on it can be written explicitly with just four scalars derived from : the Merton constants . That closed form is what you need to code a frontier that traces any target return, and it is the mathematical spine of the whole topic-folder.

Why formula-first matters. The frontier is a quadratic program whose Lagrange solution is linear in . Seeing the closed form is what lets a practitioner understand why it’s fragile (estimation error in and enters through ) and how individual risk preferences slot in (each investor just picks a point on the same curve).


2. Mathematical Ground Truth & Derivations

The program (Markowitz 1952). Minimize variance at a target expected return , with full budget normalization, allowing short sales (Merton’s setup - all weights unconstrained):

Lagrangian: . First-order condition :

The Merton "" trick. Multiply by constraints to solve for the multipliers. Define the four scalars

(All quadratic forms of the positive-definite ; by Cauchy–Schwarz applied to and .) The multiplier system collapses to , giving the frontier portfolio

The frontier equation (parabola). Sandwiching by gives

and trace a parabola (); the efficient branch is the half with (Merton eq. 12–18). The asymptote slopes in space are .

The minimum-variance portfolio (lowest return and lowest variance - the tip of the parabola):

Two-fund/separation in the all-risky case. Write Merton’s decomposition as , i.e. any frontier portfolio is a linear combination of two fixed “mutual funds” -direction and -direction (Merton §III). Equivalently, . With Tobin’s (1958) addition of a riskless asset, the two funds may be taken to be cash and one fully-risky efficient portfolio - the result used for the CAPM (next page).


3. Computational Implementation - tracing the frontier

Stdlib only (Gauss–Jordan inverse + dot products). Computes the frontier weights for three target returns, verifies them against the analytic parabola, and confirms two-fund separation to machine precision.

(The true tangency two-fund combination is carried out with the Sharpe-maximal portfolio on the next page; the section below verifies the all-risky “two-fund” identity using the minimum-variance portfolio and an arbitrary second frontier portfolio.)

The direct weight computation (top) and the analytic parabola (right column) agree to five decimals, and any two frontier funds re-generate every other frontier portfolio to machine precision - two-fund separation, verified numerically.


4. Failure Modes & First-Principles Breakdowns

  1. The parabola assumes free shorting. The closed form allows negative weights ( goes from to as rises, but any frontier portfolio can short assets). A long-only investor cannot reach the full parabola - the feasible set is a restricted, piecewise curve (04 · Constraints).
  2. The min-variance point is the only input-free point. Moving along the frontier is controlled by , but the shape of the curve is ‘s business. Errors in warp the whole frontier, and errors in shift the efficient branch - see 05 · Failure Modes.
  3. is what keeps the parabola convex and the program well-posed. It fails exactly when and are collinear under (e.g. every asset risks identically) - then no unique frontier exists, the numerical symptom being a near-singular 2×2 multiplier system.
  4. Frontier ≠ return forecast. Tracing the frontier requires an input ; the frontier answers “for this return belief, the least risk,” not “what return will happen.” Computer said “frontier,” forecast said otherwise - the optimizer inherits the forecast’s errors.

5. References

  • Merton, Robert C.: An Analytic Derivation of the Efficient Portfolio Frontier, JFQA 7(4):1851–1872 (1972)
  • Markowitz, Harry: Portfolio Selection, Journal of Finance 7(1):77–91 (1952)
  • Tobin, James: Liquidity Preference as Behavior Toward Risk, RES 25(2):65–86 (1958)
  • Elton, Gruber, Brown & Goetzmann, Modern Portfolio Theory and Investment Analysis

6. Connected Graph Bridges