Commercial risk models
Barra, Axioma, Bloomberg: industrial F, Σ_F, D re-estimated daily over style and industry factors. When a paper says “we use the Barra US model,” it means this exact decomposition, bought rather than built.
Lesson 0016 put walls on factor exposures. Now the loadings matrix takes over the risk term itself. Every lesson since 0002 wrote portfolio risk as wᵀΣw as if someone hands you Σ. Nobody does. You must estimate it — and for a real universe, the honest way to estimate it is the reason factor models exist.
Given a universe size and a data history, count the parameters each risk model needs, say when the sample covariance is unusable outright (T < n), and rewrite wᵀΣw in factor form so that risk and exposure walls share the same e = Fᵀw. When a paper says “we use a k-factor risk model,” you should know exactly what was traded away and why it was worth it.
It's the obvious move — Σ is defined as a covariance, and history gives you sample covariances. Count what that costs:
n = 500 assets parameters in Σ: n(n+1)/2 = 125,250 distinct variances and covariances two years of daily data: T = 500 days → 500 × 500 = 250,000 numbers two observations per parameter. and it gets worse: T < n ⇒ the sample Σ has rank ≤ T < n ⇒ SINGULAR some combinations of weights have measured variance exactly ZERO
A singular Σ isn't a rounding nuisance — it's a trap built precisely for an optimizer. The minimizer of wᵀΣw hunts for low-risk directions, and the sample matrix is advertising directions with zero measured risk that are pure estimation noise. The optimizer piles into phantom hedges that hedge nothing. (Hold that thought: “the optimizer seeks out your errors” is the entire subject of Lesson 0018.)
The fix is a structural bet. Assume returns are driven by a few common factors plus independent leftovers:
r = F f + ε F: n × k loadings, f: k factor returns, ε: idiosyncratic Σ = F Σ_F Fᵀ + D Σ_F: k × k factor covariance, D: diagonal idio variances parameters: n·k + k(k+1)/2 + n n = 500, k = 10: 5,000 + 55 + 500 = 5,555 (≈ 23× fewer, never singular)
And the payoff for everything you've built: risk decomposes through the same exposures the walls read. With e = Fᵀw from Lesson 0016,
wᵀΣw = eᵀΣ_F e + Σ_i d_i w_i²
= (factor risk of your exposures) + (idio risk of your positions)
One loadings matrix, double duty: Fᵀw is what you constrain and where your risk lives. As a bonus the solver sees a k×k quadratic plus a diagonal instead of a dense n×n one — the QP gets faster as the universe grows.
The honest fine print: the factor structure is an approximation. If reality has correlations the factors miss, the factor Σ converges quickly to something slightly wrong, while the sample Σ converges slowly to exactly right. That is a bias–variance trade, and at any realistic T the small bias wins — which is what the lab demonstrates.
A true 1-factor world streams daily returns. Every 5 days, two rival models re-estimate risk and each builds its minimum-variance book; the chart scores each book by its true risk (1.0× = the genuinely optimal book). Three experiments: (1) run with n = 30 — inside the shaded zone (T < n) the sample Σ is literally singular and can't even produce a book, while the factor model is already working by day 10; (2) watch the sample book emerge from the zone carrying 3–4× the optimal risk and still trail the factor book at day 300; (3) raise n and watch the singular zone widen and the gap grow — the curse is in the parameter count, which is why bigger universes force factor structure. Press ↻ for a fresh history: the details reroll, the ranking doesn't.
-
Barra, Axioma, Bloomberg: industrial F, Σ_F, D re-estimated daily over style and industry factors. When a paper says “we use the Barra US model,” it means this exact decomposition, bought rather than built.
Ledoit–Wolf shrinkage blends the sample Σ toward a structured target — same bias–variance logic, tunable dial instead of hard structure. Papers pick one or the other; now you can read both as answers to the parameter count.
Never form the dense Σ: write cp.quad_form(F.T @ w, Sigma_F) + cp.sum_squares(cp.multiply(sqrt_d, w)). Same risk, and the solver exploits the factor form.
wᵀΣw becomes?The MOSEK Portfolio Optimization Cookbook's factor-model chapter is the implementable version of this lesson — the decomposition, the parameter arithmetic, and the conic form solvers actually receive. For the estimation-error side, its chapter on estimation error makes the T-vs-n problem quantitative. Boyd et al. use exactly this factor risk structure in their multi-period framework. New cheat sheet: factor risk model card.
Ask your agent anything unclear — good prompts: “show me the phantom zero-risk portfolio explicitly for n = 3, T = 2,” “derive why FΣ_F Fᵀ + D is always invertible when D > 0,” or “where does Ledoit–Wolf shrinkage sit between the two racers in the lab?”