Day 102 — Constraints are shrinkage wearing a different hat
Monday, 16 November 2026 · Week 15 of 52 · Portfolios and risk · Study day · 65 min
A long-only constraint improves out-of-sample performance for a reason that has nothing to do with anyone’s view on shorting, and knowing the reason tells you when it will stop helping.
What you should be able to do tonight
- Explain why a no-short constraint is equivalent to shrinking the covariance matrix in a specific direction.
- Report the out-of-sample effect of three constraint regimes on your own data and say which you would use.
Tasks 65 min
30 min Read the section of the Boyd and Vandenberghe convex optimization book on duality as far as complementary slackness, then look at the dual variables your CVXPY solution returns for the binding constraints. The shadow price on a position cap tells you how much the objective wanted to violate it.
25 min Demonstrate the equivalence numerically: solve the unconstrained problem with a covariance matrix shrunk toward the identity at several intensities, and find the shrinkage level whose weights most closely match the long-only solution. The correspondence will not be exact and the direction is the point.
10 min Write the practical conclusion in your notebook: constraints help when the estimation error is large relative to the true dispersion of means, which is a statement you can check rather than a preference.
Resources
Deliverable
notebooks/day-102-constraints.ipynb with dual variables reported for binding constraints and the shrinkage level that mimics long-only.
Checkpoint
Why does a long-only constraint improve out-of-sample performance, and when would you expect it to stop helping?
Prepare for tomorrow
Ten minutes tonight so Day 103, Tuesday, 17 November 2026 starts clean. This is what the evening email sends you.
Build three benchmark portfolios on your 25 assets: equal weight, inverse volatility, and minimum variance.
Compute the out-of-sample Sharpe of each over the same window you used for the optimised portfolios.
Write down the four numbers. One of the benchmarks will win.