Method
Every number in the engine is computed from the bank's own monthly summaries. Nothing is a black box: each one fits in a sentence.
1. Definitions (exactly the judges')
| I | Typical monthly money in | Median of money_in |
| F | Typical fixed costs | Median of household_bills + insurance + loan_payments |
| S | Typical monthly spending | Median of money_out |
| B | Buffer | Mean of avg_daily_balance over the account's last 6 months |
| H | Household bills | Median of household_bills (rent & utility shocks scale this) |
| P | Loan payment | monthly_payment if the loan is still running at end of 2025 (status C or D), else 0 |
buffer_left = B − one_off_costs gap = spending_after_shock − income_after_shock if buffer_left <= 0: runway = 0 elif gap <= 0: runway = "no shortfall (120+)" else: runway = min(buffer_left / gap, 120), rounded to 1 decimal
2. Verified, not hoped
A Python reference engine (pandas, the judges' definitions verbatim) and the in-browser TypeScript engine are compared on 36,000 cases: all 4,500 accounts × the brief's three example twists, a no-shock baseline and four random mixes of shocks. Zero mismatches to one decimal, including Python's round-half-to-even and the edge cases (14 accounts with no income, 77 with no spending, 23 with a negative buffer).
3. Where we differ, and why (Realistic mode)
- EI is capped. EI pays 55% of insurable earnings up to $729/week in 2026 (≈ $3,159/month). The brief applies 55% to all income with no cap, which overstates what high earners would receive.
- Pensions don't stop. A job loss shouldn't cut pension income, so Realistic mode applies EI only to non-pension income (median of money_in − pension_in) and keeps the median pension.
- Judge mode is the default and matches the brief exactly. Both numbers are always on screen.
4. Plans
- Goal plan. Emergency-fund target = the larger of (a) 6 × the monthly gap after a job loss with EI, so the buffer survives a full 6-month EI claim, and (b) 3 × fixed costs. The customer saves a chosen share of their monthly surplus (I − S). If they have no surplus, we size the cut to flexible spending that creates one.
- Backup plan. Ordered moves on the day the shock hits: file for EI, trim flexible spending (card spending, cash withdrawals, unlabelled transfers out) by 10%, ask to defer the loan payment, then survival mode (25% cut). Cuts apply only while the shock lasts. Each step shows the runway it adds.
5. Findings method
- Income tenths and fifths are rank-based cuts of I across all 4,500 accounts. "Months saved" = B ÷ S.
- Early-warning signals use only months before each loan started, to avoid leakage. (Overdrafts after a loan are a symptom of default, not a predictor.) Income volatility = std ÷ mean of monthly money in; AUC 0.71 for predicting default.
- Pensioners: accounts where pension is more than half of all money in.