FAILURE MAP
← Case archive

FA-58642 / Loan amortization schedules / Member archive

Rule of 78s early payoff rebate: earned charge · case 02

Earned finance charge omits the acquisition fee.

Member previewVariant 2 · 3 implementations · 7 checks per implementation

Case contract

x = {'term' n, 'paid' k, 'finance_charge', 'acq_fee' (fully earned up front), 'payment', 'min_rebate'}. Rebatable charge = finance_charge - acq_fee; remaining r = n - k; rebate = round_half_up(rebatable * r(r+1) / (n(n+1))), set to 0 when below min_rebate. Payoff = payment*r - rebate; earned = finance_charge - rebate. Return {'rebate', 'payoff', 'earned'}.

Why this case matters

Amortization engines drive borrower statements, payoff quotes and investor remittances; a misplaced rounding step, boundary or ordering rule compounds across hundreds of periods.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
regression: earned charge{"earned": 832, "payoff": 325555, "rebate": 4445}{"earned": 3332, "payoff": 325555, "rebate": 4445}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 ↗