Day 120 — Targeting a volatility at the portfolio level
Friday, 4 December 2026 · Week 18 of 52 · Portfolios and risk · Study day · 65 min
The book’s realised risk moves by a factor you measured last night, which means the position size you chose in week 13 has been implicitly changing every month without you deciding anything.
What you should be able to do tonight
- Implement portfolio-level volatility targeting using the covariance estimator rather than a realised trailing number, and say why that is different.
- Report the effect on realised volatility stability, and the turnover the targeting itself generates.
Tasks 65 min
30 min Add target_volatility() to qlib/portfolio.py, scaling the weight vector so the predicted portfolio volatility from qlib/risk.py matches a target. Using the forecast rather than the trailing realisation is the difference between a forward-looking and a backward-looking control, and it changes the lag by roughly the estimator’s halflife.
25 min Measure both sides: report the standard deviation of rolling realised volatility with and without targeting, and the additional turnover the scaling creates. Then cap the leverage and show what the cap does in the highest-volatility periods.
10 min Write down the one failure mode: volatility targeting delevers into a drawdown, so it locks in losses in a fast reversal. Note when that has happened historically in your own sample.
The running strategy
The book is sized to a volatility target computed from the risk model’s forecast rather than from trailing realised volatility, with an explicit leverage cap and the added turnover reported.
Resources
Deliverable
A volatility targeting function in qlib/portfolio.py, with realised volatility stability and added turnover both measured.
Checkpoint
Volatility targeting on a forecast rather than a trailing window changes what, exactly, and when does that difference matter most?
Prepare for tomorrow
Ten minutes tonight so Day 121, Saturday, 5 December 2026 starts clean. This is what the evening email sends you.
Compute the 1-day 99 percent historical VaR of your book from the empirical return distribution.
Then compute it from a normal fitted to the same returns.
Two numbers. The gap is tomorrow’s subject.