FAILURE MAP
← Case archive

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

Discount-basis bill price and bond-equivalent yield: a 183-day bill in a 365-day basis year uses the short-dated formula · case 03

Bills just over half a 365-day year report a yield from the simple formula.

Member previewVariant 3 · 3 implementations · 8 checks per implementation

Case contract

Inputs settlement and maturity [y,m,d] (1 to 364 days apart) and discount rate d. t = days. Price = 100*(1 - d*t/360). Year basis B is 366 if a 29 February lies in (settle, settle+365 days], else 365. For t <= B/2, BEY = B*d/(360 - d*t); otherwise BEY solves the quadratic with a = t/(2B) - 0.25, b = t/B, c = (price-100)/price, taking (-b + sqrt(b^2 - 4ac))/(2a). Return [price rounded 6, BEY rounded 8].

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 half-year threshold 1[97.78875, 0.04510147][97.78875, 0.04509869]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 ↗