Santander · Banking · Credit risk
Morning Coffee: finding the blind spots in a credit portfolio
A monitoring and forecasting application for credit loan portfolios across four European business units. Its job is less to report what happened than to surface the segments nobody was looking at.
- Role
- Design and development
- Period
- 2024 — in production
- Stack
- Python · Streamlit · Pandas · Plotly · Scikit-learn · SQLite · AWS · Airflow
The problem
Portfolio monitoring in a lender usually answers the questions someone already thought to ask. Default rates by product, acceptance by channel, the standard cuts, on the standard cadence. The losses that hurt tend to sit in combinations nobody had a report for.
Morning Coffee was built to make the cuts cheap, so that looking somewhere new costs a click rather than a data request.
What it does
Calculates credit risk KPIs dynamically — default, acceptance and automation ratios — with grouping keys and parameters set by the user rather than fixed in a report definition. It segments the portfolio on arbitrary filters, automates backtesting simulation and forecasting, and feeds the decision engine.
Built and tuned specifically for four credit business units in Europe, each with its own portfolio shape.
The finding that mattered
The segmentation surfaced concentrated population segments carrying disproportionate losses that the standard reporting cuts had not isolated. Those segments were acted on commercially, and the findings fed into changes in acceptance policy.
The clearest case: manually accepted applications at high ticket sizes turned out to carry a large concentration of risk. Each of those dimensions looked unremarkable on its own, and the standard reporting cuts never crossed them. The combination was the problem.
That is the argument for this kind of tool. A dashboard that confirms what you expected has produced nothing. One that makes an unexpected cut cheap enough to try is how you find the thing that was costing you money.
Architecture
Data is extracted from the bank’s source systems and passed through an ETL I run monthly; the curated output is loaded into the tool for the current period. Computation in Pandas and scikit-learn, Streamlit front end, deployed on AWS.
A monthly cycle is a deliberate fit to how portfolio decisions are actually made rather than a technical limit — but it does mean a human step in the loop every month, which is the first thing I would automate.
Backend has been refactored with AI and extended for better modularity and performance.
On attributing results
Unit portfolio risk fell substantially over the period the tool has been in use. I am deliberately not claiming that as a result of the tool. A move that size in a credit portfolio involves policy changes, portfolio mix, vintage effects and the macro environment, and separating out the contribution of better monitoring is not something I can honestly do.
What I will claim: specific segments were found that were not being looked at, and those findings led to action. Also, time to information was a game changer.
What I would do differently
The multi-country homogenisation. The code across business units is roughly 90% identical, with a long tail of local differences — different portfolio shapes, different definitions, local rules. That last 10% is where the maintenance cost lives, and the current structure makes every change a question of which country it applies to.
I would build it as a shared core with explicit per-country configuration rather than as near-duplicate branches. The mistake was reasonable at the time: the first unit’s version worked, and the second looked close enough to copy. By the fourth it was obvious that “close enough” was the problem.