FAILURE MAP
← Case archive

FA-58392 / Loan amortization schedules / Member archive

Schedule rows from a fixed payment: interest base · case 02

Interest stays flat every month even as principal is repaid.

Member previewVariant 2 · 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: interest base{"balloon": 1833, "rows": [[1, 62, 438, 11907], [2, 62, 438, 11469], [3, 62, 438, 11031], [4, 62, 438, 10593], [5, 62, 438, 10155], [6, 62, 438, 9717], [7, 62, 438, 9279], [8, 62, 438, 8841], [9, 62, 438, 8403], [10, 62, 438, 7965], [11, 62, 438, 7527], [12, 62, 438, 7089], [13, 62, 438, 6651], [14, 62, 438, 6213], [15, 62, 438, 5775], [16, 62, 438, 5337], [17, 62, 438, 4899], [18, 62, 438, 4461], [19, 62, 438, 4023], [20, 62, 438, 3585], [21, 62, 438, 3147], [22, 62, 438, 2709], [23, 62, 438, 2271], [24, 62, 438, 1833]]}{"balloon": 1199, "rows": [[1, 62, 438, 11907], [2, 60, 440, 11467], [3, 57, 443, 11024], [4, 55, 445, 10579], [5, 53, 447, 10132], [6, 51, 449, 9683], [7, 48, 452, 9231], [8, 46, 454, 8777], [9, 44, 456, 8321], [10, 42, 458, 7863], [11, 39, 461, 7402], [12, 37, 463, 6939], [13, 35, 465, 6474], [14, 32, 468, 6006], [15, 30, 470, 5536], [16, 28, 472, 5064], [17, 25, 475, 4589], [18, 23, 477, 4112], [19, 21, 479, 3633], [20, 18, 482, 3151], [21, 16, 484, 2667], [22, 13, 487, 2180], [23, 11, 489, 1691], [24, 8, 492, 1199]]}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 ↗