FAILURE MAP
← Case archive

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

Discount-basis bill price and bond-equivalent yield: the short-dated yield ignores the price discount · case 04

Bond-equivalent yields for short bills are understated.

Member previewVariant 4 · 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 short bill yield denominator 1[99.142083, 0.04410417][99.142083, 0.04448582]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 ↗