Basic Prerequisites: 02 · The Efficient Frontier.


1. Intuition & Practical Objective

Once a riskless (or low-risk) asset exists, the investor’s decision splits cleanly: how much to put in cash vs. in one “best” risky portfolio - and that best risky portfolio is the same for everyone, independent of risk aversion (Tobin’s two-fund separation). That portfolio is the tangency portfolio : the point where the line from the riskless rate just touches (is tangent to) the risky frontier. It is by construction the portfolio with the maximum Sharpe ratio

The practical objective: compute , its Sharpe ratio and the Capital Market Line on which every efficient risky-plus-cash portfolio lies - and then the CAPM/Security Market Line, the equilibrium statement that each asset’s expected excess return is proportional to its beta against the tangency (market) portfolio. The entire CAPM is the frontier machinery read at the tangency point.


2. Mathematical Ground Truth & Derivations

Tangency = maximum Sharpe (Merton 1972, §IV). Maximizing SR over the budget line gives the first-order condition with

(Merton eq. 44), valid whenever (the tangency portfolio is then efficient; if the tangency lies on the inefficient branch and no finite tangency exists in the equilibrium sense - Merton §IV).

Sharpe and the CML. Let and . Two identities hold exactly:

So the Capital Market Line is , and every optimal portfolio is a blend of cash and : , with determined by risk aversion. This is Tobin’s separation theorem: all investors hold the same risky fund, only the cash/risky mix differs.

Security Market Line / CAPM (Sharpe 1964; Merton §V, eq. 45–47). Under the equilibrium that the market portfolio is the tangency portfolio, each asset prices according to its covariance with the market:

i.e. CAPM is a security market line: expected excess return is linear in . Crucially, this holds identically for the tangency portfolio given any - it’s a mathematical identity ( collapses to ), not an empirical fit. The empirical content lives entirely in the assumption that observed prices reflect this equilibrium.


3. Computational Implementation - from covariance to tangency to CAPM

Stdlib only. Everything follows from . (All results cross-checked against numpy; they match to machine precision.)

Read the output: the theoretical Sharpe identity reproduces the computed exactly, and the SML identity holds to all shown digits (zero difference) for every asset - the tangency portfolio is self-consistent as a “market” by construction.


4. Failure Modes & First-Principles Breakdowns

  1. Tangency requires . If the riskless rate is at or above the min-variance return, the tangency point vanishes (Merton §IV) - the “market” portfolio isn’t a finite ray, and schools that draw a tangent regardless are drawing an impossible line.
  2. Sharpe maximization inherits every input error, doubled. is the most fragile object in the folder - it needs both (hard) and (amplifying), so the tiniest estimation error in the excess returns dominates the weights. This is the “estimation-error maximizer” alert of 05 · Failure Modes.
  3. CAPM is an identity, not a discovery. The SML holds by algebra for the tangency portfolio; the empirical claim is that real markets price expectations that way (and that the true market portfolio exists and is mean-variance-efficient). Testing CAPM is testing the market portfolio’s measurability, not the algebra.
  4. The riskless asset is fictional. Real borrowing is limited, taxed, and risky; proxy rates and short constraints break the clean cash/risky separation and the linear CML.

5. References

  • Merton, Robert C.: An Analytic Derivation of the Efficient Portfolio Frontier, JFQA 7(4):1851–1872 (1972)
  • Tobin, James: Liquidity Preference as Behavior Toward Risk, RES 25(2):65–86 (1958)
  • Sharpe, William F.: Capital Asset Prices: A Theory of Market Equilibrium under Conditions of Risk, Journal of Finance 19(3):425–442 (1964)
  • Bodie, Kane & Marcus, Investments

6. Connected Graph Bridges