FA-58793 / Loan amortization schedules / Member archive
Credit line average daily balance: event effective day · case 03
Draws accrue no interest on the day they are taken.
Case contract
x = {'rate_bp', 'basis', 'start_balance', 'cycle_days', 'events': [[day 1..cycle_days, signed amount]], 'min_bp', 'min_floor'}. Events take effect at the start of their day. Each day adds max(balance, 0) to the accumulator; interest = round_half_up(acc*bp/(10000*basis)) once per cycle. owed = end balance + interest. Minimum = 0 if owed <= 0 else min(owed, max(min_floor, interest + round_half_up(max(end balance, 0)*min_bp/10000))). Return {'interest', 'balance': owed, 'minimum', 'adb': acc // cycle_days}.
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 fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: event effective day | {"adb": 1003571, "balance": 1009619, "interest": 4619, "minimum": 14669} | {"adb": 1003750, "balance": 1009620, "interest": 4620, "minimum": 14670} | 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 ↗