Day 133 — Milestone: a factor risk model built by hand
Thursday, 17 December 2026 · Week 19 of 52 · Portfolios and risk · Milestone · 50 min
Four covariance estimators, a factor decomposition and a sizing decision, all built rather than called, and the document is graded on whether the simplest benchmark is still in the table.
What you should be able to do tonight
- Show the eigenvalue spectrum against the Marchenko-Pastur bound so it is visible which eigenvalues carry information.
- State what full Kelly implies, what fraction you will run, and the drawdown you are accepting.
Tasks 50 min
30 min Finish reports/milestone-04-risk-model.md: the four covariance estimates with the spectrum plotted against the theoretical bound, factor exposures and a risk decomposition of one portfolio into factor and idiosyncratic parts, the out-of-sample comparison with equal weighting present, and the sizing section with the Kelly fraction and its implied drawdown.
20 min Verify the claims: regenerate every number from committed code, rerun the test suite, and check that the risk decomposition’s parts sum to the total. That last check catches the single most common arithmetic error in this kind of report.
Drill interview thread
Spaced repetition, not cramming. Every drill in the year is collected on the drills page.
Arithmetic, timed, nineteenth sitting. Ten two-digit multiplications, the sevenths, and 1.1 to the 7th and 0.9 to the 7th to three decimals.
Markov chains under a clock: a frog on a 5-lily-pad cycle jumps left or right with equal probability. Expected time to visit every pad? Then the stationary distribution if the jumps are 2 to 1 in one direction.
Expected value game, the kind that opens a trading interview: I roll a fair die and you may pay to see the result and then choose to reroll once, keeping the second. What is the game worth? Now with two rerolls, and say how you would compute it for n.
The running strategy
Milestone 4 closes the portfolio phase. qlib/risk.py and qlib/portfolio.py now hold the covariance estimators, the neutralisation, the volatility target and the sizing rule, and every signal built in phase 6 flows through them unchanged.
Resources
Deliverable
reports/milestone-04-risk-model.md, complete, with equal weighting present in every comparison and the risk decomposition reconciling to the total.
Checkpoint
Which covariance estimator predicted realised risk best, by how much, and did equal weighting beat any of them on Sharpe?
Prepare for tomorrow
Ten minutes tonight so Day 134, Friday, 18 December 2026 starts clean. This is what the evening email sends you.
List every place your current backtest could be using information it would not have had. Aim for at least six.
Do not fix any of them tonight.
That list is the agenda for the next four weeks.