FAILURE MAP
← Case archive

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

Act/Act AFB whole-year decomposition: the leap-day search looks at the whole period instead of the stub · case 04

Stubs in periods of more than a year use 366 because of leap days in the whole years.

Member previewVariant 4 · 3 implementations · 8 checks per implementation

Case contract

Inputs start < end [y,m,d]. Count whole years n stepping back from the end date (an end of 29 February maps to 28 February in non-leap years) while the stepped date is not before start. The stub runs from start to the end stepped back n years; its denominator is 366 if a 29 February lies in (start, stub end], else 365. Return n + stub days/denominator rounded to 9 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 fixture

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

Boundary fixtureActualExpectedOutcome
regression stub leap window 13.7595628423.761643836Failed

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 ↗