FAILURE MAP
← Case archive

FA-58399 / Loan amortization schedules / Member archive

Schedule rows from a fixed payment: balloon amount · case 04

The reported balloon includes another month of interest.

Member previewVariant 4 · 3 implementations · 7 checks per implementation

Case contract

x = {'principal', 'rate_bp', 'payment', 'max_months'}. For months 1..max_months while the balance is positive: interest = round_half_up(balance*bp/120000); if payment <= interest return {'error': 'negative_amortization', 'month': k}; principal paid = min(payment - interest, balance); append [k, interest, principal, balance after]. Return {'rows', 'balloon': remaining principal}.

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: balloon amount{"balloon": 10964, "rows": [[1, 247, 253, 12092], [2, 242, 258, 11834], [3, 237, 263, 11571], [4, 231, 269, 11302], [5, 226, 274, 11028], [6, 221, 279, 10749]]}{"balloon": 10749, "rows": [[1, 247, 253, 12092], [2, 242, 258, 11834], [3, 237, 263, 11571], [4, 231, 269, 11302], [5, 226, 274, 11028], [6, 221, 279, 10749]]}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 ↗