FA-60958 / Bond day-count conventions / Member archive
Backward coupon schedule generation: each date is clamped from the previous date instead of the maturity day · case 03
After passing a short month every earlier coupon date is stuck on the shorter day number.
Case contract
Inputs issue and maturity [y,m,d], months per period and an end-of-month flag. Unadjusted coupon dates are generated backward from maturity: the k-th date is maturity shifted back k*months calendar months, keeping the maturity day clamped to the month length; if the flag is set and maturity is the last day of its month, every date is the last day of its month. Dates on or before issue are dropped. If more than one date remains and the first is fewer than 15 days after issue, it is removed (long first coupon). Return the dates ascending.
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 roll day anchor 1 | [[2010, 5, 28], [2010, 8, 28], [2010, 11, 28], [2011, 2, 28], [2011, 5, 31]] | [[2010, 5, 31], [2010, 8, 31], [2010, 11, 30], [2011, 2, 28], [2011, 5, 31]] | 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 ↗