Back to portfolio Open the live app
Credit · decision analytics · write-up

SME Open Banking Credit Risk Simulator

Underwriting small businesses from their bank-account data rather than their filed accounts, and answering the question a credit committee actually asks: if revenue fell across the whole book, how many run out of cash within a year?

500
simulated SMEs
~435k
transactions
6.4
median DSCR
85%
deteriorating fail rate
Honest scopeSynthetic data, reproducible from a single seed. Not real businesses, but modelled as bank-account movements, which is the whole point.

The problem

Small businesses are hard to lend to: their filed accounts are thin, late, and backward-looking. But their bank account tells the truth about cash coming in and going out, and Open Banking exposes exactly that, with the borrower's consent. This project scores businesses on cash-flow behaviour and then answers the committee's real question: if revenue fell 20% across the whole book, how many run out of cash within a year?

The differentiating insightOpen Banking gives you bank-account movements, not till-level sales. A shop doesn't show 200 card taps a day, it shows one card-acquirer settlement the next morning, net of fees. A consultancy shows a few invoice receipts arriving 30–60 days after the work. Everything here is modelled as dated money movements on an account, because that's the only data a lender using Open Banking ever actually sees.

What it does

The pipeline runs generate → model → measure → stress test → visualise → deploy:

Headline results

Share of the 500 firms that run out of cash within 12 months as a revenue shock deepens:

Revenue shock0%10%20%30%40%50%
Fail within 12m26.6%29.4%34.0%38.2%42.0%47.2%
Portfolio survival curve rising with revenue shock, and failure rate by sector at a 20% shock led by Hospitality and Manufacturing
The live dashboard: survival curve against shock, and failure rate by sector at a 20% shock.

The clearest result is risk separation. At a 20% shock, healthy firms fail at 28% against a deteriorating cohort at 85%, the model tells the two apart cleanly. That separation is the whole point, because it gives a lender a defensible basis for the three decisions a credit committee actually makes: who to support, who to price for the extra risk, and who to step back from, driven by live cash-flow behaviour rather than stale filed accounts. The most fragile sectors are Hospitality (44%) and Manufacturing (41%), the thin-margin, high-fixed-cost sectors, exactly as operating leverage predicts.

Failure by risk cohort at 20% shock: healthy around 28 percent, deteriorating around 85 percent
Failure by risk cohort at a 20% shock: the separation the model exists to find.

Crucially, the results are cross-validated: the SQL views and the Python engine compute the same metrics independently and agree, median DSCR 6.4, overdraft breach 18% for healthy firms versus 83% for the deteriorating cohort.

Design decisions

Tech stack

Python (pandas, NumPy) · PostgreSQL / Supabase · Streamlit · Plotly · Git. The SQL layer builds the schema, loads the generated data, and defines the metric views; the Python engine computes rolling metrics and runs the stress engine; Streamlit serves the interactive dashboard.