FA-61094 / Bond day-count conventions / Member archive
Street-convention yield to price with fractional first period: accrued interest uses the remaining fraction · case 04
Clean prices move the wrong way through the coupon period.
Case contract
Inputs settle, prev and next coupon dates [y,m,d], n remaining coupons (including next), annual coupon rate, annual yield y and frequency. w = days(settle, next)/days(prev, next); c = 100*rate/freq; v = 1/(1+y/freq). Dirty = sum_{k=0}^{n-1} c*v^(k+w) + 100*v^(n-1+w); accrued = c*(1-w); return [dirty, dirty-accrued] each rounded to 6 decimals.
Why this case matters
Bond accrual and pricing systems depend on exact day-count arithmetic; a single-day error changes settlement cash.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression clean price accrued 1 | [104.730952, 104.470082] | [104.730952, 104.616821] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗