Project name: Twin Runway

Tagline: Benchmarks meet banking reality: a dual-lens financial resilience engine that stress-tests household liquidity shocks and turns panic into a step-by-step recovery plan.

Tracks / prizes ("Sponsor / Special Prizes", select all that apply): [Tangerine] Resilience Rewired · Best Data Visualization & Storytelling · [MLH Best Use of Gemini API, only if we ship the Gemini narrative]

Public GitHub repo: https://github.com/JoaqAmado/FinanceResilienceEngine/tree/Jason

Demo video: A 2:00 or less, public link will be added prior to the 12:00 PM deadline.

Inspiration

In retail banking and financial advisory, we see the same blind spot every day: traditional credit models look backward at salary and repayment history, assuming high earners are safe. Yet when a layoff, furnace failure, or utility spike hits a Canadian household, backward-looking credit scores are useless, what matters is liquidity runway. Because Employment Insurance (EI) replaces only a capped fraction of a paycheque, we built Twin Runway to answer the exact question every Tangerine client and advisor faces across all 4,500 accounts and 1.06M transactions: If a shock hits tomorrow morning, how many months do you truly have, and what is the least painful lever to pull right now?

What it does

Twin Runway operates as a dual-view advisory engine and giving clients self-serve clarity while equipping Tangerine advisors with instant triage diagnostics for any account_id:

  1. Know the Customer (Holistic Liquidity Profile): Displays baseline cash flow of Typical Income, Typical Spending, Fixed Commitments, Household Bills, Active Loan Obligations, 6-Month Rolling Buffer, and Baseline Runwaymatching the official benchmark definitions to the cent. Right beside the numbers, it surfaces Advisor Triage Flags: existing overdrafts, protected pension inflows, standing-order commitments, stale accounts, or pre-loan negative balance history.
  2. Take a Shock (Benchmark vs. Canadian Reality): Executes the official twist scenarios (55% EI layoff, 1x monthly spending repair shock, or compounded 55% EI + 15% bill inflation) and custom stress tests in real time. The Official Benchmark Runway is displayed side-by-side with toggleable Canadian Reality Checks:
  3. Statutory EI Ceiling: Applies Canada's real 2026 EI maximum ($729/week ≈ $3,159/month) instead of an uncapped 55% income replacement.
  4. The 1-Week EI Waiting Period: Accounts for the statutory first-week liquidity gap. Pension Shielding: Protects pension_in inflows during employment loss shocks.
  5. Seasonal Cash-Flow Stress: Tests actual 6-month cumulative spending trajectories (capturing January and June spending spikes) rather than a flat median month.
  6. Make a Plan (Peacetime Wealth Building + Crisis Triage):
  7. Normal Times (Job-Loss-Proof Emergency Fund): Calculates the exact dollar buffer required to survive a 6-month layoff and maps the customer's monthly surplus directly to Tangerine Savings Goals and an Automatic Savings Program (ASP) timeline.
  8. Crisis Times (The Minimum-Pain Triage Ladder): Instead of telling a laid-off client to cut everything at once, our engine steps through a realistic behavioral sequence: 1). eliminate bank/overdraft fees, 2). trim non-fixed spending by 10%, then 25%, 3). pause non-essential standing orders, 4). restructure/defer loan payments, 5). apply a 50% emergency freeze. It stops at the earliest step that restores a 6-month runway, and if spending cuts alone cannot close the gap, it pre-sizes a Tangerine Line of Credit buffer while the client is still employed.

Our Biggest Findings (Discovery)

  • 1. The High-Earner Fragility Paradox (More Income, Thinner Cushion): Conventional banking wisdom says higher earners are safer. Our portfolio stress test proves the opposite: under the standard 55% EI layoff shock, the 6-month failure rate climbs from just 4.8% for accounts under $2,500/month to 75.6% for accounts earning over $20,000/month. When we apply Canada's real 2026 statutory EI cap ($729/week ≈ $3,159/month), 99.8% of top-tier earners fail within 6 months. Why? Lifestyle spending scales linearly with income, while liquidity buffers shrink relative to burn rate—dropping from 8.9 months of spending at the bottom tier to just 1.6 months at the top.
  • 2. The "Median Month" Illusion (Seasonal Cash-Flow Trap): Standard financial formulas rely on median monthly spending, which hides seasonal cash drains. Because household outflows spike sharply every January and June, 81.9% of accounts that appear "safe" at 6 to 8 months of median-month runway actually run out of cash within 6 months when simulated across their real half-year spending path.
  • 3. Most Vulnerable Households Are One Moderate Adjustment Away from Safety: Across all 4,500 accounts, 1,578 (35.1%) fail the 6-month EI test. However, most do not require drastic austerity: the median reduction required to restore a full 6-month runway is $2,057/month (just 16% of total spending).
  • 4. Pre-Loan Overdrafts as a Leading Default Indicator: Examining the bank's 682 loans (loans.csv), every single borrower who recorded negative daily balances (days_below_zero > 0) prior to loan origination eventually defaulted (27 of 27), whereas 0 of the 606 performing or repaid borrowers ever dipped below zero beforehand. While the sample size warrants treating this as an early-warning risk flag rather than an automated underwriting rule, it demonstrates how cash-flow telemetry protects both the client and the bank's balance sheet.

How We Built It

  1. Data Engineering
  2. Started with the PKDD'99 Financial Dataset provided for the challenge.
  3. Processed 9 original CSV files containing 4,500 anonymized accounts, 682 loans and approximately 1.06 million transactions.
  4. Converted monetary values to CAD and shifted transaction dates into the 2020–2025 period.
  5. Organized the data through a structured pipeline: Raw → Staging → Marts.

  6. Financial Analysis

  7. Reconstructed monthly income, spending and balance patterns from transaction-level data.

  8. Calculated the official judge runway using the benchmark definitions.

  9. Developed a complementary stress-adjusted runway using 25th-percentile monthly income to represent lean-income periods.

  10. Evaluated financial vulnerability under job-loss and household expense shock scenarios.

  11. Financial Resilience Engine

  12. Built a Python engine that accepts an account ID and selected financial shock.

  13. Generates customer-level financial metrics, estimated runway and JSON-ready results.

  14. Produces an emergency-fund target and a backup financial plan based on the modeled scenario.

  15. Testing and Validation

  16. Developed 46 automated tests.

  17. Checked judge formula parity across all 4,500 accounts, with a maximum difference of 0.00 in the tested judge metrics.

  18. Optimized the pipeline to rebuild the warehouse in approximately 5 seconds, with warm engine execution around 3 milliseconds.

Challenges we ran into

  • Matching the judges formula exactly by rounding runway to one decimal changed one of our counts from 454 to 435). [We pinned every number we show with automated tests so it can’t drift].
  • Leakage: Balances recorded after a loan has already gone bad make risk look easy to predict. [We used only information from before the loan when testing early-warning signals].
  • Small samples: There are only 76 defaults, [so we label our early-warning signals as red flags, not rules].
  • Edge cases: Pensioners, negative buffers, zero income and stale accounts could break the formula or mislead. [We flag them on the customer card instead of hiding them].
  • Same-day transactions out of order: The transactions file isn’t time-ordered within a day. [We rely on monthly balances and sort before using them.]

Accomplishments that we're proud of

  • Built a working financial resilience engine: Twin Runway moves beyond displaying historical balances by simulating financial shocks and generating customer-level action plans.
  • Found a hidden vulnerability in typical income: Our stress-adjusted runway achieved an AUC of 0.752, compared with 0.639 for the official judge runway and 0.559 for savings buffer alone.
  • Analyzed real transaction-level financial data: We processed approximately 1.06 million transactions across 4,500 anonymized accounts.
  • Validated our implementation: We achieved exact parity on the tested official judge metrics across all 4,500 accounts and developed 46 automated tests.
  • Connected analysis to practical action: Instead of only identifying potential vulnerability, we designed the engine to translate financial stress into an emergency-fund goal and a backup plan.

What we learned

  • Average income does not tell the whole story. Customers with similar typical income can have very different levels of financial resilience when income fluctuates.
  • Cash-flow patterns matter. Transaction-level data can reveal financial pressure that may be hidden by monthly averages.
  • A benchmark and a real-world stress test serve different purposes. Matching the official judge calculation was important, but testing lean-income scenarios revealed additional vulnerabilities.
  • Data quality matters as much as the model. Transaction ordering, negative balances, zero-income accounts and potential data leakage all require careful treatment.
  • Responsible interpretation is essential. With only 76 recorded defaults, our findings should be treated as evidence of potential risk patterns, not as guaranteed predictions of default.

What's next for tangerine

We see Twin Runway as a foundation for more proactive, personalized financial resilience support.

Our next steps are:

  • Build a customer- and advisor-facing experience: Turn the current Python engine into an accessible interface where customers and advisors can explore financial scenarios.
  • Improve Canadian EI modeling: Incorporate applicable benefit caps, eligibility conditions and waiting periods rather than relying only on a simplified 55% replacement assumption.
  • Expand cash-flow stress testing: Include more detailed seasonal spending patterns and household-specific expense changes.
  • Strengthen personalized recommendations: Develop more flexible emergency-fund targets, savings timelines and backup plans.
  • Validate with broader Canadian data: Test the approach on more representative banking datasets and a larger number of default outcomes.

Our long-term goal is to help Tangerine move from simply understanding a customer's financial history to helping them prepare for what could happen next.

Sources

Built With

Share this project:

Updates

Private user

Private user posted an update —

On behalf of the team, I would like to apologise to the organizers for not being able to showcase our presentation due to busy personal schedules. I would also like to thank GDG for hosting an amazing event; we had fun connecting with talented individuals and gaining experience in how to tackle data analytics problems using real-world scenarios. We also had fun running around for electricity cords, lol. Thank you very much. We had a great time at the hackathon.

Submission history