duration-convexity-and-dv01listed
Install: claude install-skill howard-lynn-ye/fin-skills
# Duration, convexity and DV01
**"Duration" names at least four different numbers and "DV01" at least two.** Substituting one
for another gives a risk report that is a few percent wrong — too small to notice, too large to
hedge with.
Every figure below is printed by `scripts/duration.py` (runs in **0.29 s**; QuantLib optional).
✅ Measured means this file produced it on 2026-09-09 with QuantLib 1.43, numpy 2.2.6,
Python 3.11.3.
> **The rule: Macaulay = (1 + y/m) × Modified, and only Modified belongs in a DV01. DV01 is on
> the DIRTY price. Past 100 bp you need convexity. A floater's rate duration is the time to its
> next reset, not its maturity.**
## 1. Macaulay and Modified differ by exactly (1 + y/m)
✅ Measured — the ratio is the compounding factor to the last digit:
| bond | Macaulay | Modified | ratio | 1 + y/m | DV01 overstated by |
|---|---|---|---|---|---|
| 5% 10y semiannual @ 5% | 7.98944567 | 7.79458114 | 1.02500000 | 1.02500000 | **+2.50%** |
| 5% 10y quarterly @ 5% | 7.92962996 | 7.83173329 | 1.01250000 | 1.01250000 | +1.25% |
| 4% 30y semiannual @ 4% | 17.72805221 | 17.38044334 | 1.02000000 | 1.02000000 | +2.00% |
| **12% 10y semiannual @ 12%** | 6.07905825 | 5.73496061 | 1.06000000 | 1.06000000 | 🚨 **+6.00%** |
| 0% 10y semiannual @ 5% | 10.00000000 | 9.75609756 | 1.02500000 | 1.02500000 | +2.50% |
🚨 **The error is one-directional and grows with the level of rates.** A hedge sized off a
Macaulay duration is always too big, by exactly `y/m`. On a zero-co