Riskôdefault risk
Three classification models over millions of rows of financial history, at 85% precision and 82% recall.
- 2025
- Modelling and data analysis
- INTELI · partnership with Finnet
- Python · Pandas · NumPy · Jupyter
Finnet intermediates trillions of reais a year in financial operations. At that volume, a small fraction of unpaid payments is already a large number, and predicting which operations carry high risk changes what the company can do about it, because prevention is cheaper than collection.
The data
Millions of rows of financial history, processed with Pandas and NumPy. Most of the work in a project like this is not in the model: it is in understanding what each column means, deciding what to do with what is missing, and building the features that actually carry signal.
The models
We trained three classifiers and compared them:
- Decision Tree: the interpretable baseline. If a more complex model does not beat the Decision Tree by a margin that justifies losing interpretability, it is not worth the trade.
- Random Forest: many trees voting, which reduces the overfit of a single one.
- Gradient Boosting (GBoost): trees in sequence, each correcting the previous one’s error.
The one that shipped was the Random Forest, and it does not just answer whether a payment will default. It classifies each receivable as on time, late, or defaulted. That three-way split is what the accounts receivable manager actually uses, because late and defaulted call for different collection actions, a binary model forces you to treat both the same way.
Result: 85% precision and 82% recall.
The trained model was served through a Streamlit dashboard, so the business side could look at it without opening a notebook.
Why both numbers matter
In default prediction, precision and recall measure different things. High precision means that when the model flags risk, it is usually right, which avoids treating paying customers as suspects. High recall means it lets few real defaults slip through.
Optimising only one is easy: a model that labels everything as risky has 100% recall and precision equal to the default rate of the dataset. Both above 80% at the same time is what makes the result usable.