FAILURE MAP
← Case archive

FA-60972 / Bond day-count conventions / Member archive

Backward coupon schedule generation: maturity on day 30 or later counts as month end · case 02

A 30 May maturity rolls to month ends while a 28 February maturity does not.

Member previewVariant 2 · 3 implementations · 8 checks per implementation

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 fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression month-end maturity detection 1[[2003, 2, 28], [2003, 5, 28], [2003, 8, 28], [2003, 11, 28], [2004, 2, 28], [2004, 5, 28], [2004, 8, 28], [2004, 11, 28], [2005, 2, 28]][[2003, 2, 28], [2003, 5, 31], [2003, 8, 31], [2003, 11, 30], [2004, 2, 29], [2004, 5, 31], [2004, 8, 31], [2004, 11, 30], [2005, 2, 28]]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 ↗