FAILURE MAP
← Case archive

FA-58688 / Loan amortization schedules / Member archive

Annual escrow analysis: credit after refund · case 03

Borrowers receive a refund and a monthly credit for the same surplus.

Member previewVariant 3 · 3 implementations · 7 checks per implementation

Case contract

x = {'disbursements': annual amounts, 'low_point': projected lowest balance, 'cushion_months', 'refund_threshold'}. total = sum; base = round_half_up(total/12); cushion = round_half_up(total*cushion_months/12); diff = low_point - cushion; shortage = max(0, -diff) is collected over 12 months rounded up; surplus = max(0, diff) is refunded when >= refund_threshold, otherwise floor(surplus/12) is credited monthly. Return {'base', 'cushion', 'shortage', 'refund', 'monthly'}.

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: credit after refund{"base": 30833, "cushion": 30833, "monthly": 26736, "refund": 49167, "shortage": 0}{"base": 30833, "cushion": 30833, "monthly": 30833, "refund": 49167, "shortage": 0}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 ↗