Free lesson · Optimization
Derive the fully invested minimum-variance portfolio
Open interactive lessonPractice calculationsExplore labs
Start with the idea
When expected returns are too uncertain to distinguish, minimum variance offers a risk-only allocation benchmark.
Symbols, units & horizon
- w*: asset weight vector at rebalance
- Σ: positive-definite monthly return covariance, return-fraction squared
- 1: vector of ones
- T: transpose
- inverse: mathematical notation, implemented with a solve
- weights sum to one and shorts are unconstrained
When and why to use this
Compare sophisticated return-based allocations against this monthly risk-only baseline.
When expected returns are too uncertain to distinguish, minimum variance offers a risk-only allocation benchmark.
Use returns measured over a common horizon and a symmetric positive-definite covariance matrix. The fully invested constraint makes the answer different from an unconstrained zero-risk allocation of no holdings. Short positions remain possible unless prohibited.
Solve a linear system instead of explicitly inverting the covariance matrix. A nearly singular matrix can create huge offsetting weights. Compare against equal weights, inspect gross exposure, and repeat with a shrinkage estimate.
Derive the fully invested minimum-variance portfolio
- Minimize wᵀΣw subject to 1ᵀw=1 and form L=wᵀΣw−λ(1ᵀw−1).
- Differentiating gives 2Σw=λ1, so w is proportional to Σ⁻¹1.
- Choose the proportionality constant to make weights sum to one, giving the displayed expression.
Independent variances .04 and .09 give inverse-risk entries 25 and 11.1111. Normalizing yields weights 9/13 and 4/13, with variance .0276923.
Apply it in a strategy
- Freeze inputs at the stated decision time and record their units.
- Compare sophisticated return-based allocations against this monthly risk-only baseline.
- Recompute the example, then change the material assumption and explain the difference.
Research deliverable
Derive the fully invested minimum-variance portfolio: produce the worked calculation, a timestamped input record and a written decision addressing this limitation: Low estimated variance does not protect against structural breaks, liquidity costs or omitted constraints.
These are synthetic mechanics examples, not historical performance or paper replications. Module evidence and research boundaries record the 12 September 2026 review.
Python implementation
Self-contained teaching example. Python 3.10+; dependencies and input conventions are shown in the code and notation. Run in your own Python environment.
# Python 3.10+; standard library and NumPy only.
# Synthetic teaching inputs; conventions and units are defined in the notation above.
import numpy as np
def minimum_variance(covariance):
s=np.asarray(covariance,float)
if s.ndim!=2 or s.shape[0]!=s.shape[1] or not np.allclose(s,s.T): raise ValueError('Symmetric square matrix required')
np.linalg.cholesky(s)
z=np.linalg.solve(s,np.ones(len(s)))
return z/z.sum()
w=minimum_variance([[.04,0],[0,.09]])
assert np.allclose(w,[9/13,4/13])
print(w)Continue learning
Optimization: Feasibility, Costs & Robust Decisions — all lessons- Exposure constraints before optimization
- Curvature and a bounded quadratic decision
- Derive the fully invested minimum-variance portfolio
- Project a desired allocation onto the long-only simplex
- Trading costs and a no-trade decision
- An uncertainty bound becomes a position penalty
- Read a binding constraint through its shadow price
- Numerical residuals and independent solution checks
Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations