Modern portfolio theory: trade expected return against risk, and let diversification do the work. The engine solves the mean‑variance problem live — minimize wᵀΣw subject to Σwᵢ=1 — and draws the efficient frontier from the covariance matrix itself. These are models with named assumptions, not investment advice.
Each asset carries an expected return μᵢ and a variance σᵢ²; every pair carries a covariance Σᵢⱼ = ρᵢⱼσᵢσⱼ. A portfolio is a weight vector w with Σwᵢ=1.
Its return is μᵀw; its risk is the quadratic form wᵀΣw — the covariances, not just the variances, decide it. The global minimum-variance portfolio has the closed form w* = Σ⁻¹𝟙 / (𝟙ᵀΣ⁻¹𝟙), and it is the unique convex minimum over the whole budget hyperplane.
amber Returns are assumed to be fully described by mean and variance (a normal / quadratic-utility world). Real returns have fat tails and skew — the model does not.
Risk and return, optimized together for the first time. Markowitz (1952) turned "pick good stocks" into a quadratic program: minimize a convex form under a linear constraint. That is the birth of modern portfolio theory — and the same optimization spine (a quadratic under constraints, solved via Σ⁻¹) reappears in the-optimization, its neighbouring sphere.
Downstream: Sharpe's CAPM (1964) adds a risk-free asset and collapses the frontier to a single tangency line; Black–Scholes (1973) prices the option that hedges the leftover risk.
Re-derives the minimum-variance portfolio from the currently active covariance matrix and checks its true variance against the closed-form floor 1/A = 1/(𝟙ᵀΣ⁻¹𝟙). Trips red the instant the machine is fed a doctored matrix.
Three assets. Expected returns μ = (10%, 12%, 15%), volatilities σ = (15%, 20%, 25%), and three pairwise correlations you control below. From these the covariance matrix Σ is assembled live.
Covariance matrix Σ (annualized):
Minimum-variance weights w*:
● assets ◆ min-variance ── efficient frontier (upper branch)
The optimizer is only as honest as Σ. Feed it garbage covariances — estimated from too little data — and it will confidently short one asset to buy another, chasing phantom diversification.
Every assumption is a wall: constant volatility and correlation (they spike together in a crash), returns fully captured by mean and variance (fat tails, skew ignored), frictionless trading (no fees, no slippage, infinitely divisible), and a single-period horizon. Break any wall and the "efficient" frontier is a fiction.
The disclosed planted void. Press Tamper and the machine treats Σ as diagonal — off-diagonal covariances zeroed. It re-solves for min-variance weights that ignore diversification; scored against the true Σ their variance exceeds the real floor, and the Witness (7) trips.