Day 111 — A factor covariance is structure instead of shrinkage

Wednesday, 25 November 2026 · Week 16 of 52 · Portfolios and risk · Study day · 65 min

Shrinkage improves an estimate by pulling it toward a shape; a factor model asserts the shape, which needs far fewer parameters and is wrong in ways you can name.

What you should be able to do tonight

  • Build a covariance matrix from factor exposures and idiosyncratic variances, and count its parameters against the sample matrix.
  • Name the assumption a factor covariance makes that your residual correlation matrix shows is false.

Tasks 65 min

30 min Build it: with K factors, the covariance is the exposure matrix times the factor covariance times its transpose plus a diagonal of residual variances. Implement it for a market-plus-sector model on your 200 names and count the parameters against the sample matrix’s.

25 min Test the assumption you just made: the model asserts residuals are uncorrelated across names. Use last night’s residual correlation matrix to measure how false that is, report the average absolute off-diagonal, and identify the structure the model is missing.

10 min Add the factor estimator to qlib/risk.py’s interface so it is selectable like the others.

Resources

Deliverable

A factor covariance estimator in qlib/risk.py, with the parameter count comparison and the measured residual correlation it ignores.

Checkpoint

How many parameters does a 5-factor covariance on 500 names need, against the sample matrix, and what does it assume to get there?

Prepare for tomorrow

Ten minutes tonight so Day 112, Thursday, 26 November 2026 starts clean. This is what the evening email sends you.

Write one line per covariance estimator saying when you would use it. Five lines.

Check the arithmetic drill times.

Nothing to download.