FAILURE MAP
← Case archive

FA-63179 / Insurance premium rating / Member archive

Calendar period earned and unearned premium: Policies written on the period end count as unearned · case 04

The unearned reserve includes premium for policies written after the valuation date.

Member previewVariant 4 · 3 implementations · 11 checks per implementation

Case contract

Input period [start, end) in days and policies [[written day, term days (>0 else 'invalid term'), premium]]. Earned = premium*overlap/term where overlap = max(0, min(end, w+term) - max(start, w)). Unearned at end counts policies written before end and still in force after it. Sum exactly; round each total half-up once.

Why this case matters

Earned premium is the denominator of every loss ratio, so exposure-overlap slips distort rate indications.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
written on period end[126, 166350][126, 45793]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 ↗