23.2%. That's the default rate in the dataset behind an AI that reads bank statements and decides loan eligibility in seconds. Olayinka Williams described on Medium an end-to-end SME credit scoring system trained on two linked files: a raw ledger of 1.45 million transactions and a summary file covering 500 small businesses with pre-computed features and default labels. The project extracts 61 behaviour signals, deals with a pronounced class imbalance, and operates as a live API that returns automated credit outcomes in seconds.
The most important number in Williams's write-up is the default rate, 23.2 percent. That figure shapes almost every technical choice she describes because only about one in four firms in the training set were defaulters. When an algorithm sees far more non-defaulters than defaulters, it can learn to favour safe, rejection-biased rules unless designers correct for the imbalance. Williams flagged this as a core modelling challenge, and she built the pipeline around it.
How the system learns from statements
Williams trained models on two linked files that together represent the production data foundation. The raw ledger contains 1.45 million individual transactions from 500 small businesses. The companion summary file supplies pre-computed financial features plus labels: a health score and a binary indicator for whether the business had defaulted. From that combined material the system engineers 61 financial behaviour signals, then uses those signals to rank business health and predict default probability.
Williams singled out a handful of signals that matter most. Transaction-count measures such as total credits, credit count, and the number of transactions correlated strongly with a healthier profile. The exploratory analysis showed sectoral differences as well. Clothes sellers and tailoring shops had the highest incidence of default in the sample, while hair salons and point-of-sale agents recorded some of the lowest default rates. Weekend transaction volumes were higher than weekday volumes, a pattern consistent with consumer-facing revenues, and more than two thirds of transactions originated via mobile channels. Williams notes that mobile-origin data increases the richness of timestamp and description metadata, which helps identify income regularity, recurring liabilities and anomalies that may indicate fraud or unstable cash flow.
The technical flow Williams describes is practical and recognisable from industry write-ups. First, ingest raw statements. Second, extract transactions. Third, compute behavioural features. Fourth, train models on labelled outcomes. Final step, expose the model through a deployed API that answers credit questions in seconds. That end-to-end pattern mirrors public GitHub projects and vendor blogs that show similar feature extraction and loan-eligibility prototypes for individual statements.
The implementation relies on standard building blocks rather than novel modelling inventions. Williams lists optical character recognition to read PDFs or images, natural language processing to categorise merchant descriptions, and a mix of rule-based and machine-learning approaches to extract income and expense patterns. Python-based toolchains handle scaling and orchestration. Vendor blogs argue these building blocks accelerate underwriting, reduce manual errors, and broaden access to credit for borrowers who lack traditional credit histories.
Public GitHub projects demonstrate how the same feature extraction steps can be reproduced for single-customer prototypes.
But Williams spends most of her space on the practical constraints every lender and engineer will face moving from prototype to production. Label quality is one headache. If the default labels in the summary file are noisy or inconsistent, model predictions will inherit that error. Class imbalance is another. With a 23.2 percent default share, models must be tuned to avoid trivial solutions that look good on aggregate metrics but fail at spotting risk. Sectoral skew matters in two ways: first, different industries show different cash flow rhythms and default propensities; second, a training sample dominated by a few sectors will bias the model against underrepresented businesses.
Williams also emphasises the operational need to translate behavioural signals into auditable decision rules. An automated API that returns a loan decision in seconds needs traceability: which signals drove the score, how thresholds were set, and what exceptions require human review. That requirement is as much an engineering and compliance problem as a modelling one.
One recurring theme across the write-up and the wider technical material Williams cites is reliance on dense timestamp metadata and mobile-origin transactions. Those signals make it easier to infer regularity, detect the timing relationships between receipts and payments, and flag recurring liabilities such as loan repayments. They also enrich merchant descriptions, which feed natural language categorisation and sectoral tagging.
Crucially, Williams didn't stop at modelling. She deployed the pipeline as a live API that answers credit questions in seconds, built on the 500-business, 1.45 million-transaction dataset and the 61 engineered signals. The deployment decision reflects the project goal: to serve lenders who need fast, repeatable underwriting decisions for small and medium enterprises.
Related Articles
- Nvidia expands buyback, shifts AI stock calculus
- Quantamental factors show large in-sample returns
- TFN at 14: three routes and 28-day wait
The pipeline now runs live as an API, built from models trained on 500 businesses, 1.45 million transactions and 61 engineered signals, and it returns a credit decision in seconds. Originally reported by Medium.
This article was created with AI assistance.