bond-conventions-and-accruedlisted
Install: claude install-skill howard-lynn-ye/fin-skills
# Bond conventions and accrued
**Accrued interest is not a number. It is a number plus three things: a day-count convention, a
coupon schedule, and a settlement date.** Drop any one and you still get a plausible answer.
Every figure below is printed by `scripts/conventions.py` (runs in **0.15 s**; QuantLib optional,
imported inside `quantlib_cross_checks`). ✅ Measured means this file produced it on 2026-09-09
with QuantLib 1.43, Python 3.11.3. The worked bond is a **5% semiannual, coupon period
2026-01-15 → 2026-07-15 (181 days), settled 2026-04-30 (105 days in), 1,000,000 face**.
> **The rule: carry (day count, coupon schedule, settlement date) together.** ACT/ACT ICMA
> evaluated from two bare dates is a guess, "30/360" alone does not name a convention, and the
> screen quotes clean while the wire settles dirty.
## 1. 🚨 ACT/ACT ICMA without its schedule returns 0.25 and no error
ACT/ACT ICMA (= ISMA = "Bond") is `days / (coupon-period days × coupons per year)`. **The
denominator is the coupon period, not the year**, so two dates are not enough to evaluate it.
✅ Source-verified in QuantLib's own `ql/time/daycounters/actualactual.cpp` (read 2026-09-09):
`implementation()` dispatches `case ISMA: case Bond: if (!schedule.empty())` → `ISMA_Impl`,
**`else` → `Old_ISMA_Impl`** — whose comment says the reference period is taken "equal to
(d1,d2)" when unspecified, and which then estimates
`months = lround(12 * (refPeriodEnd - refPeriodStart) / 365)`.
✅ Measured on the worke