FA-58744 / Loan amortization schedules / Member archive
Mortgage insurance termination: automatic threshold · case 04
Insurance drops automatically at the borrower-request threshold.
Case contract
x = {'principal', 'rate_bp', 'months' n, 'orig_value', 'prepay': {'k': extra}}. Level payment is the exact annuity half-up; interest round_half_up(balance*bp/120000). The scheduled balance ignores prepayments; the actual balance applies each extra after payment k (capped at the balance). The request month is the first k with actual*100 <= 80*orig_value; the automatic month is the first k with scheduled*100 <= 78*orig_value, but never later than the midpoint month n//2 + 1. Return {'request', 'automatic'}.
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: automatic threshold | {"automatic": 1, "request": 1} | {"automatic": 3, "request": 1} | 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 ↗