Alternative data: bank statements, mobile money, device data, and their limits
A feature that sounds predictive has to earn its place on applications it has not seen, on the people the bureau cannot score, and under a consent the customer can withdraw. Most features fail at least one of the three
In the lab you fit models on loans from applications up to 30 April and test them on loans from applications after that. For borrowers with no bureau file (thin files) the bureau has no score, so a bureau-only model can give everyone the same number. A second model sees only four wallet features built from the 90 days before each application: monthly inflow, active-week share, balance floor and a salary-like credit. How well does it rank the later thin-file borrowers by who went bad? Measure with AUC: 0.5 is a coin flip and 1.0 is perfect.
Alternative data is a lender’s name for anything it uses to judge a borrower that is not a bureau’s file of past credit: statements from other banks, a wallet’s own ledger, pay records, airtime and data-use history, the device an application came from. A lender reaches for it for two reasons. The first is coverage. The thin files of module 1 are people the bureau holds nothing on, and a lender that can say something about them can serve people a bureau-only rule leaves out. The second is signal: what a person did last month may say more than a record of what they did two years ago.
None of it is free. Each source has to be collected with a consent the customer understood, matched to the right person, kept current, explained to the customer when it counts against them, and tested. A source can be rich and still useless for credit. This chapter gives you a way to find out which, on the lab’s loan book at scale 1, and then looks at what the law asks of a lender that takes data from a partner. The scorecard method itself is Credit scoring in this module; the gradient-boosted models chapter takes the same question to models with hundreds of features, and the AI chapter of module 1 gave you the vocabulary (feature, AUC, drift).
The sources, and what each is for
| Source | What it shows | How it reaches the lender | What goes wrong |
|---|---|---|---|
| Bank statements | Salary credits, spending, overdraft use, bounced debits, across the customer’s other accounts | The customer uploads a statement, or authorises an API pull under open banking (Payments: open banking) | Edited PDFs; a statement from the one account the customer chose to show; consent that lapses |
| The lender’s own wallet or mobile-money ledger | Inflows, outflows, balance, how often and how steadily the money moves | Already held. Owoleaf has it in entries and transactions |
Short history for new wallets; a wallet used as a pass-through says little about income |
| Salary and payroll data | Pay amount, date, employer, how many months running | A payroll processor (in this chapter’s scenario, Ferrowave) or the employer, with the employee’s consent | The data was collected to pay a salary, not to lend; employers change; informal and casual work is invisible |
| Telco data | Airtime top-up pattern, data use, how long the SIM has been active, call and text counts | The operator (in this scenario, Lumora Mobile), with the subscriber’s consent | One person, several SIMs; a SIM swap changes the history; usage reflects the plan more than the person |
| Device and app data | Which phone, how old the install, where the IP address points, how many cards | The lender’s own app and its card processor | Built to catch fraud, not predict repayment; a phone model can stand in for income |
| Contacts, photos, call logs, messages on the phone | What the phone holds about other people | An app asking for permission | Nigeria’s digital lending rules say a lender may not use it (see Consent and the law below) |
Two published studies show why lenders try. Björkegren and Grissen report that call-record behaviour from a South American telecom predicts default on credit extended by that telecom: borrowers in the highest quintile of risk by their measure were 2.8 times as likely to default as those in the lowest, and the method also works for people with no financial history. The latest version of the abstract says it outperforms models that use credit bureau information, and an earlier version said only that it did no worse; the search behind this chapter did not see the exact bureau comparisonas of 2026-11. Berg, Burg, Gombović and Puri report, on about 250,000 observations, that simple digital-footprint variables, such as device type, operating system and email provider, match or outperform a bureau score in predicting default, add to it rather than replacing it, and have power for customers with no scorable history close to that for scorable onesas of 2026-11. Read both for how the authors tested. Neither is Nigerian data, neither is Owoleaf’s, and both tested on real repayment outcomes at a lender or a retailer. The lab below finds a smaller and noisier effect on synthetic data, a result about a method and not about any real feed. That difference is the point: you have to test on your own book.
Features from a wallet ledger
A feature is one number computed about an applicant that a model can use. The rule that matters most for a feature from time-stamped data is the as-of rule: compute it only from what the lender knew before the application day. Compute it from the whole ledger and it includes money that arrived after the decision, some of it because the loan was granted. The feature then predicts perfectly in testing and fails in use.
Four wallet features follow, built from the 90 days before the application day (or the wallet’s whole life if it is younger). An inflow here is money coming in from outside the wallet: a bank transfer, a card top-up, or a transfer received from another wallet. A refunded payout is not an inflow.
- Monthly inflow. The inflows in the window, scaled to 30 days: the sum in kobo times 30, divided by the window’s length in days, in integer arithmetic.
- Active-week share. The share of the window’s weeks that had at least one inflow. It is a measure of regularity: a steady earner scores near 1, someone paid twice in a quarter scores near 0.15.
- Balance floor. The lowest balance the wallet had at any point in the window, including the balance as the window opened. It asks whether the customer ever runs dry.
- Salary-like credit. A bank-transfer credit within 5% of an earlier credit from the same bank code, 25 to 35 days later. It is a crude pay detector, built because the lab has no pay records.
You can check one by hand. Application 279 was made on 3 June 2026 by a wallet 116 days old, so its window is the 90 days before. Its counted inflows in the window are ₦49,988.00, ₦9,762.00, ₦3,518.00, ₦10,850.76, ₦8,439.48, ₦767.32 and ₦5,360.00, which add to ₦88,685.56. Monthly inflow is 8,868,556 × 30 ÷ 90 = 2,956,185 kobo, ₦29,561.85. Six of the window’s 13 weeks have an inflow, so the active-week share is 6 ÷ 13 = 0.4615. The wallet held ₦13,029.00 when the window opened and never went lower, so its floor is ₦13,029.00. The lab prints the same arithmetic from the ledger.
Wallets are young. In the book, 3,346 of 8,386 applications come from wallets under 30 days old, so for them “90 days” means three or four weeks, and every one of these features is noisier.
Device features come from card_attempts over the same window: whether the customer made any card attempt, how many distinct devices they used, and the share of attempts from a device first seen that day. These columns were built for the Payments course’s fraud chapters (see ML fraud scoring). They answer “is this the same person?” and not “will this person repay?” Using them for credit is a hypothesis, and the lab tests it.
How to tell whether a feature earns its place
Four rules turn a hunch into a test.
Test on later applications. Fit the model on loans from applications up to 30 April and score loans from applications in May and June. (The credit scoring chapter splits at 31 March and tests on April to June, because a scorecard built on one quarter is its subject. Here the cut is a month later so that the training set holds 136 bad loans rather than 53, a steadier fit. The two chapters’ AUCs differ for that reason and are not comparable.) A random split would put April’s customers on both sides and flatter every feature, because the same customer’s repeat applications would sit in training and in test. The label is the module’s: bad means the loan is default or written_off at the cut-off, 90 or more days past due. It is incomplete for young loans, which have not had time to go bad; Credit scoring, in this module, handles maturity properly. Every model here faces the same labels, so the comparison is fair even though the levels are not final.
Compare against what you already have. A new feature is worth what it adds to the bureau-based model, not what it scores alone. The baseline is a model on the bureau score and a thin-file flag. The test is the gain: the new model’s AUC minus the baseline’s, on the same applications. AUC is the chance that a random bad borrower scores worse than a random good one; module 1 counted it by pairs.
Put an interval on the gain. A test set of 2,469 loans with 232 bad is small. Resample it with replacement 500 times, recompute the gain each time, and read the 2.5th and 97.5th percentiles: that is a 95% bootstrap interval. If zero is inside, you cannot tell the gain from nothing.
Look at thin files separately. The whole book hides them: they are a quarter of applications and the people the data is for.
The model is a logistic regression: it multiplies each feature by a weight, adds them to the intercept, and treats the result as the log-odds of bad. The lab fits it in standard-library Python by Newton’s method with a small penalty (a ridge) that stops weights growing to fit noise. Each feature is first standardised to mean 0 and spread 1, so weights are comparable. Credit scoring builds the same model with more care.
One warning applies to every number you will see. The outcomes exist only for applicants Owoleaf approved. The old rule declined anyone with under ₦5,000 a month of inflow (except for BNPL) and capped every amount by inflow, so approved loans have a narrowed range of the very feature you test. Estimating how declined applicants would have behaved is reject inference, which module 3 covers.
Four ways a good-looking feature fails
It is coincidence. A pattern detector fires on noise, and it fires most on busy accounts, which have more chances. The test is a placebo: deal each customer’s credit dates out again at random, keeping amounts and banks, so any rhythm disappears, then run the detector again. If it fires about as often, it was not detecting pay. The lab does this to the salary-like detector.
It overlaps with what you have. A feature can score well alone and add nothing to a model that already holds a correlated one. Thin files, for example, have lower inflows than files with a bureau hit, so a bureau-based model that knows “thin” already knows something about inflow.
Its weight has the wrong sign. A model fitted on a few hundred bad loans will find noise that is as large as signal. The check is to read the weights and compare each sign with the story you told. Regularity should lower risk. If a fitted weight says more regular inflow means riskier, either the story is wrong or the weight is noise, and a lender who ships it must be able to tell the customer why. The gradient-boosted models chapter shows how a monotonic constraint forces a sign.
It is cheap to fake. A customer who learns the score rewards inflow can ask a friend to send ₦300,000 two days before applying. A feature that a last-minute action can move is a feature to harden: longer windows, medians instead of sums, credits only from counterparties seen for months. The lab measures what the top-up does, and what it would cost to fake the balance floor instead.
Add a fifth, which has no code: coverage. Who has the data? Merchants in this book never fund their wallets by card, so SME applicants have no device data at all. A feature that exists for some customers and not others is two decisions, and the customers with no data should not be punished for it.
Consent, purpose and what the law says
Data from a partner is personal data, and a lender that takes it is a controller of it. A few rules of the Nigeria Data Protection Act 2023 (NDPA) matter here. Every one below rests on commentary, because the searches this chapter relied on returned summaries and not the Act’s operative text, and one result was the 2023 Bill, whose numbering may differ from the enacted Act. Read the sections in the Act before you design a consent screen.
Section 24 of the NDPA sets out the principles for processing personal data, among them lawfulness, fairness and transparency, data minimisation and purpose limitation (data collected for specified, explicit and legitimate purposes); one commentary places purpose limitation at section 24(1)(b)as of 2026-11. Purpose limitation is the rule behind the Ferrowave question below, and minimisation is the rule behind a feed that sends twelve fields when the model uses three.
Commentary says section 26 requires consent to be freely given, specific, informed and unambiguous, puts the burden of proving it on the data controller, says silence or inactivity does not count, and lets a data subject withdraw it at any time. Consent is one lawful basis among several; commentary lists others such as performance of a contract and a legal obligationas of 2026-11. In practice: if the lender relies on consent, it must be able to show who agreed, to what, in what words, and when, and the feed must stop when the customer withdraws.
Commentary reads section 29 as requiring a controller that engages a processor to take reasonable measures, including a written agreement, to ensure the processor complies with the Act, and a processor to report any sub-processor it engagesas of 2026-11. A processor handles data on a controller’s instructions. A controller decides why and how the data is used.
Commentary says section 28 requires a data privacy impact assessment (DPIA), done before processing starts, where processing is likely to be high risk to people’s rights and freedomsas of 2026-11. Whether the Commission’s 2025 implementation directive (the GAID) lists scoring or profiling as a case where a DPIA is mandatory, and whether it must be filed, was not confirmed in the searches behind this chapter. A new score built on partner data is profiling by any reading, so plan on a DPIA and confirm the duty with counsel.
Commentary (a law firm’s summary, with other summaries agreeing) reports that the FCCPC’s Digital, Electronic, Online or Non-Traditional Consumer Lending Regulations 2025 bar lending apps from accessing consumers’ contacts, photos and call logs; one summary says the registration form has applicants confirm their apps will not have such access. Sources disagree on commencement: the FCCPC’s own release gives 21 July 2025, other summaries give other dates, and its companion Guidelines are stated to take effect on 18 November 2025as of 2026-11. The regulations’ own text could not be read in the searches behind this chapter, so check the data-access provision in it and the commencement date on the FCCPC’s release. If the summaries are right, the phone-contents row of the table above is closed to a digital lender, and a vendor that offers “social graph” scores from contacts is offering something the lender may not use.
For consent basics and the bureau side, see credit data in Nigeria. The next chapters in this module read the digital lending rules and automated decisions in full: Consumer protection and digital lending rules in Nigeria, and the one on explaining a decline.
Ferrowave and Lumora Mobile: what Nkemdirim asks
Ferrowave and Lumora Mobile are possible partners, not an answer. Each raises a different problem.
Ferrowave pays salaries on behalf of its 210 business customers. In this chapter’s scenario its payout records name the employer, the payee’s account, the amount and the date, and it holds them as the employer’s processor: it moves pay because the employer told it to. A lender is a new purpose. The data was not collected for it, and the purpose-limitation principle applies. Nkemdirim’s reading, which counsel must confirm, is that Owoleaf needs the employee’s own consent to receive the records, Ferrowave needs the employer’s agreement to disclose data it processes for the employer, and a written arrangement has to say who is controller and who is processor of the feed. Even then the data is partial: it covers only employees of Ferrowave’s customers, and it shows pay, not the debts the employee owes elsewhere.
Lumora Mobile holds airtime and data-use records for 31 million subscribers. They cover far more people, including many thin files, and say little about income. Which telecoms-sector rules bind Lumora’s sharing is not covered here. The data-protection questions are the same: a lawful basis, a consent that names the purpose, minimisation, and a way out. The data also has its own failure modes. One person has several SIMs; SIMs are swapped; usage follows the plan. A feature such as “airtime top-ups per month” is partly a measure of the plan.
The questions Nkemdirim writes down are the chapter’s checklist:
- What exactly is sent, field by field, and which of them does the model use?
- On what lawful basis, and if consent, in what words, recorded how, withdrawn how?
- Who is controller and who is processor, and where is the written agreement?
- How current is it, and what happens to a customer’s score when the feed fails?
- What does it add, measured as in this chapter on Owoleaf’s own applicants, with an interval?
- How can it be gamed, and what does gaming cost the customer?
- Who has no data, and what do they get instead?
You work in labs/finance on the scale-1 book in data1/: 8,386 applications and 3,645 loans. The descriptive chapters use the small data/ folder, and a model needs the larger one. Every price, score and outcome is illustrative and generated. Seed 42 gives the same figures every time. The scripts only read data1/; they write their own files beside themselves.
1. Build and check the scale-1 folder. If data1/ already exists, run only the last line.
cd labs/finance
python3 generate.py --scale 1 --out data1 && python3 loans.py --out data1 \
&& python3 cards.py --out data1 && python3 collect.py --out data1
python3 check.py --db data1/finance.sqliteThe checker takes about half a minute. Its output on a current run, which includes the ledger lines above these and ends with OK:
loan book: 3645 loans, 9,771,721,819 kobo of principal outstanding; checks 7-11 run
card book: 100,972 card attempts, 1065 disputes for 1,189,430,900 kobo; checks 12-15 run
collections: 15,831 actions, 1274 promises, 368 placements; checks 16-18 run
accounts by type (debit-positive kobo): {'asset': 164090899916, 'equity': -40000000000, 'expense': 1057322208, 'income': -2179730284, 'liability': -122968491840}
settlement_bank in ledger 162,978,067,116 kobo; on the statement 162,981,602,577 kobo
OK: all invariants holdThe book has 3,645 loans. The same checker proves the wallet ledger balances, which matters here: every feature below is built from it.
2. Build the features as of the application day. Save walletfeat.py, which turns one wallet’s entries into features and never reads the application day itself, and features.py, which runs it for every application and writes alt_features.csv. The CSV opens in a spreadsheet if you prefer to look at it that way.
"""Wallet features as of a day, from one wallet's entries. Standard library only."""
from datetime import date
WINDOW = 90 # days of history before the application day
INFLOW_KINDS = ("funding_transfer", "funding_card", "p2p_transfer")
def load_wallets(db):
"""Every wallet entry of every customer who applied, in time order:
customer id -> [(day, direction, kobo, kind, bank)]."""
wallets = {}
for cid, posted, direction, kobo, kind, bank in db.execute("""
SELECT a.customer_id, e.posted_at, e.direction, e.amount_kobo, t.kind, t.counterparty_bank
FROM entries e
JOIN accounts a ON a.id = e.account_id AND a.customer_id IS NOT NULL
JOIN transactions t ON t.id = e.transaction_id
WHERE a.customer_id IN (SELECT customer_id FROM applications)
ORDER BY a.customer_id, e.posted_at, e.id"""):
wallets.setdefault(cid, []).append((date.fromisoformat(posted[:10]), direction, kobo, kind, bank))
return wallets
def salary_like(credits, today):
"""How many bank-transfer credits look like pay: within 5% of an earlier credit from the same
bank code, 25 to 35 days later, counting credits in the 120 days before today."""
n = 0
for i, (d, kobo, bank) in enumerate(credits):
if (today - d).days > 120:
continue
for d0, k0, b0 in credits[:i]:
if b0 == bank and 25 <= (d - d0).days <= 35 and abs(kobo - k0) * 20 <= k0:
n += 1
break
return n
def wallet_features(events, today, age):
"""Features from the wallet's entries before `today` (a date). `age` is the wallet's age in days.
Money is integer kobo. Nothing dated `today` or later is read."""
window = max(1, min(WINDOW, age))
start = today.toordinal() - window
balance, floor, inflow, weeks, credits = 0, None, 0, set(), []
for d, direction, kobo, kind, bank in events:
if d >= today:
break
if floor is None and d.toordinal() >= start:
floor = balance # the balance as the window opened
balance += kobo if direction == "credit" else -kobo
if d.toordinal() >= start:
floor = min(floor, balance)
if direction == "credit" and kind in INFLOW_KINDS:
inflow += kobo
weeks.add((today.toordinal() - d.toordinal() - 1) // 7)
if direction == "credit" and kind == "funding_transfer":
credits.append((d, kobo, bank))
if floor is None:
floor = balance # no movement in the window
return dict(
window_days=window,
inflow_monthly_kobo=inflow * 30 // window,
active_week_share=round(len(weeks) / max(1, (window + 6) // 7), 4),
balance_floor_kobo=floor,
salary_like_credits=salary_like(credits, today))"""One row of features per application, from what Owoleaf knew the day before it.
Reads data1/finance.sqlite, writes alt_features.csv."""
import csv
import sqlite3
from datetime import date
from walletfeat import load_wallets, wallet_features
db = sqlite3.connect("data1/finance.sqlite")
apps = db.execute("""
SELECT a.id, a.customer_id, a.product, a.applied_at, a.decision, c.signup_at, c.kind, c.kyc_tier,
b.hit, b.score, b.delinquent_12m, b.enquiries_90d, b.history_years, l.status
FROM applications a
JOIN customers c ON c.id = a.customer_id
JOIN bureau_reports b ON b.id = a.bureau_report_id
LEFT JOIN loans l ON l.application_id = a.id
ORDER BY a.id""").fetchall()
wallets = load_wallets(db)
cards = {} # customer id -> [(day, device, device_age_days)]
for cid, created, device, age in db.execute("""
SELECT t.customer_id, t.created_at, ca.device_id, ca.device_age_days
FROM card_attempts ca JOIN transactions t ON t.id = ca.transaction_id
WHERE t.customer_id IN (SELECT customer_id FROM applications)
ORDER BY t.created_at"""):
cards.setdefault(cid, []).append((date.fromisoformat(created[:10]), device, age))
rows = []
for (app_id, cid, product, applied, decision, signup, kind, tier,
hit, score, delinq, enq, hist, status) in apps:
today = date.fromisoformat(applied)
age = (today - date.fromisoformat(signup[:10])).days
f = wallet_features(wallets.get(cid, []), today, age)
start = today.toordinal() - f["window_days"]
att = [x for x in cards.get(cid, []) if start <= x[0].toordinal() < today.toordinal()]
rows.append(dict(
application_id=app_id, customer_id=cid, product=product, applied_at=applied, kind=kind, kyc_tier=tier,
hit=hit, score=score if score is not None else "", delinquent_12m=delinq, enquiries_90d=enq,
history_years=hist, wallet_age_days=age, **f,
card_attempts=len(att), devices=len({x[1] for x in att}),
new_device_share=round(sum(1 for x in att if x[2] == 0) / len(att), 4) if att else "",
bad=(1 if status in ("default", "written_off") else 0) if status else ""))
with open("alt_features.csv", "w", newline="") as out:
w = csv.DictWriter(out, fieldnames=list(rows[0]))
w.writeheader()
w.writerows(rows)
loans = [r for r in rows if r["bad"] != ""]
print(f"{len(rows)} applications, {len(loans)} with a loan outcome, {sum(r['bad'] for r in loans)} bad")
print(f"wallet history under 30 days: {sum(1 for r in rows if r['wallet_age_days'] < 30)} applications")
print(f"any card attempt in the window: {sum(1 for r in rows if r['card_attempts'])} applications")
print(f"salary-like credit found: {sum(1 for r in rows if r['salary_like_credits'])} applications")
print("wrote alt_features.csv")python3 features.py8386 applications, 3645 with a loan outcome, 368 bad
wallet history under 30 days: 3346 applications
any card attempt in the window: 5106 applications
salary-like credit found: 226 applications
wrote alt_features.csv368 of the 3,645 loans are bad (default or written off at the cut-off), about one in ten. Nearly four applications in ten come from a wallet under 30 days old. A salary-like credit turns up on 226 applications, about 2.7% of the book.
3. Check one application by hand. Save one.py. It prints the entries in the window for application 279, the arithmetic, and what wallet_features returns.
import sqlite3
from datetime import date
from walletfeat import INFLOW_KINDS, WINDOW, load_wallets, wallet_features
APP = 279
db = sqlite3.connect("data1/finance.sqlite")
cid, applied, signup = db.execute("""SELECT a.customer_id, a.applied_at, c.signup_at FROM applications a
JOIN customers c ON c.id = a.customer_id WHERE a.id = ?""", (APP,)).fetchone()
today = date.fromisoformat(applied)
age = (today - date.fromisoformat(signup[:10])).days
events = load_wallets(db)[cid]
naira = lambda kobo: f"₦{kobo // 100:,}.{kobo % 100:02d}"
print(f"application {APP}: customer {cid}, applied {applied}, wallet {age} days old, window {min(WINDOW, age)} days")
start = today.toordinal() - min(WINDOW, age)
inflow, balance, weeks = 0, 0, set()
opening = sum(k if dr == "credit" else -k for d, dr, k, _, _ in events if d.toordinal() < start)
print(f"balance when the window opened: {opening} kobo = {naira(opening)}")
print("date what kobo balance after")
for d, direction, kobo, kind, bank in events:
if d >= today:
break
balance += kobo if direction == "credit" else -kobo
if d.toordinal() >= start:
counts = direction == "credit" and kind in INFLOW_KINDS
inflow += kobo if counts else 0
if counts:
weeks.add((today.toordinal() - d.toordinal() - 1) // 7)
print(f"{d} {'in ' if direction == 'credit' else 'out'} {kind:<16}{kobo:>10} {balance:>10}{' counted' if counts else ''}")
print(f"counted inflow {inflow} kobo = {naira(inflow)} over {min(WINDOW, age)} days")
print(f"monthly: {inflow} * 30 // {min(WINDOW, age)} = {inflow * 30 // min(WINDOW, age)} kobo = {naira(inflow * 30 // min(WINDOW, age))}")
print(f"weeks with a counted inflow: {len(weeks)} of {(min(WINDOW, age) + 6) // 7} = {len(weeks) / ((min(WINDOW, age) + 6) // 7):.4f}")
print("wallet_features says:", wallet_features(events, today, age))python3 one.pyapplication 279: customer 612, applied 2026-06-03, wallet 116 days old, window 90 days
balance when the window opened: 1302900 kobo = ₦13,029.00
date what kobo balance after
2026-03-13 in funding_transfer 4998800 6301700 counted
2026-03-16 in p2p_transfer 976200 7277900 counted
2026-03-21 in p2p_transfer 351800 7629700 counted
2026-04-10 out p2p_transfer 757700 6872000
2026-05-01 out payout_nip 4795991 2076009
2026-05-02 in funding_card 1085076 3161085 counted
2026-05-12 in funding_card 843948 4005033 counted
2026-05-13 out payout_nip 1111149 2893884
2026-05-16 in funding_card 76732 2970616 counted
2026-05-18 out payout_nip 863796 2106820
2026-05-27 out p2p_transfer 94400 2012420
2026-06-01 in p2p_transfer 536000 2548420 counted
counted inflow 8868556 kobo = ₦88,685.56 over 90 days
monthly: 8868556 * 30 // 90 = 2956185 kobo = ₦29,561.85
weeks with a counted inflow: 6 of 13 = 0.4615
wallet_features says: {'window_days': 90, 'inflow_monthly_kobo': 2956185, 'active_week_share': 0.4615, 'balance_floor_kobo': 1302900, 'salary_like_credits': 0}The balance when the window opened is ₦13,029.00, which is 6,301,700 less the first credit of 4,998,800, and it is the lowest the wallet ever was, so it is the floor. Seven lines are marked counted: the bank transfer on 13 March, peer-to-peer receipts on 16 and 21 March and 1 June, and card top-ups on 2, 12 and 16 May. The five lines without the mark are transfers and payouts out. The seven sum to 8,868,556 kobo. Scaled to 30 days, 8,868,556 × 30 ÷ 90 = 2,956,185 kobo. Six distinct weeks of 13 gives 0.4615. The last line agrees with each figure.
4. See who has the data. First save the helpers as altlib.py. It loads alt_features.csv from step 2 and also holds the AUC and logistic-regression code that steps 6 to 8 reuse. Then save coverage.py.
"""Small helpers for the chapter: load the features, AUC, logistic regression. Standard library only."""
import csv
import math
INT = ("application_id", "customer_id", "kyc_tier", "hit", "delinquent_12m", "enquiries_90d", "history_years",
"wallet_age_days", "window_days", "inflow_monthly_kobo", "balance_floor_kobo", "salary_like_credits",
"card_attempts", "devices")
def load(path="alt_features.csv"):
rows = list(csv.DictReader(open(path)))
for r in rows:
for k in INT:
r[k] = int(r[k])
r["active_week_share"] = float(r["active_week_share"])
r["score"] = int(r["score"]) if r["score"] != "" else None
r["new_device_share"] = float(r["new_device_share"]) if r["new_device_share"] != "" else None
r["bad"] = int(r["bad"]) if r["bad"] != "" else None
return rows
def auc(scores, labels):
"""Chance that a random bad borrower scores higher than a random good one (ties count half)."""
order = sorted(range(len(scores)), key=lambda i: scores[i])
ranks, i = [0.0] * len(scores), 0
while i < len(order):
j = i
while j + 1 < len(order) and scores[order[j + 1]] == scores[order[i]]:
j += 1
for k in range(i, j + 1):
ranks[order[k]] = (i + j) / 2 + 1
i = j + 1
bad = sum(labels)
good = len(labels) - bad
return (sum(r for r, y in zip(ranks, labels) if y) - bad * (bad + 1) / 2) / (bad * good)
def _solve(a, b):
n = len(b)
m = [row[:] + [b[i]] for i, row in enumerate(a)]
for c in range(n):
p = max(range(c, n), key=lambda r: abs(m[r][c]))
m[c], m[p] = m[p], m[c]
for r in range(c + 1, n):
f = m[r][c] / m[c][c]
for k in range(c, n + 1):
m[r][k] -= f * m[c][k]
x = [0.0] * n
for r in range(n - 1, -1, -1):
x[r] = (m[r][n] - sum(m[r][k] * x[k] for k in range(r + 1, n))) / m[r][r]
return x
def fit_logistic(X, y, ridge=1.0, iters=25):
"""Newton's method, with a small ridge penalty on the weights (not the intercept)."""
p = len(X[0]) + 1
w = [0.0] * p
for _ in range(iters):
g, h = [0.0] * p, [[0.0] * p for _ in range(p)]
for xi, yi in zip(X, y):
v = [1.0] + xi
z = max(-30, min(30, sum(a * b for a, b in zip(w, v))))
pr = 1 / (1 + math.exp(-z))
for i in range(p):
g[i] += (pr - yi) * v[i]
for j in range(p):
h[i][j] += pr * (1 - pr) * v[i] * v[j]
for i in range(1, p):
g[i] += ridge * w[i]
h[i][i] += ridge
step = _solve(h, g)
w = [a - b for a, b in zip(w, step)]
if max(abs(s) for s in step) < 1e-8:
break
return w
def fit(train, features, ridge=1.0):
"""Fit on the training rows. `features` is a list of functions row -> list of numbers.
Returns a function that gives the log-odds of bad for any row: higher means riskier."""
make = lambda rows: [sum((f(r) for f in features), []) for r in rows]
X = make(train)
cols = list(zip(*X))
mu = [sum(c) / len(c) for c in cols]
sd = [math.sqrt(sum((v - m) ** 2 for v in c) / len(c)) or 1.0 for c, m in zip(cols, mu)]
z = lambda rows: [[(v - m) / s for v, m, s in zip(xi, mu, sd)] for xi in make(rows)]
w = fit_logistic(z(train), [r["bad"] for r in train], ridge)
def log_odds(rows):
return [w[0] + sum(a * b for a, b in zip(w[1:], xi)) for xi in z(rows)]
log_odds.weights = w # intercept first, then one weight per standardised feature
return log_oddsimport statistics
from altlib import load
rows = load()
def line(label, rs):
n = len(rs)
pct = lambda k: f"{100 * k / n:5.1f}%"
med = int(statistics.median(r["inflow_monthly_kobo"] for r in rs)) // 100
print(f"{label:<22}{n:>6} thin {pct(sum(1 - r['hit'] for r in rs))} "
f"under 30 days of wallet {pct(sum(r['wallet_age_days'] < 30 for r in rs))} "
f"card data {pct(sum(r['card_attempts'] > 0 for r in rs))} median inflow ₦{med:,}")
line("all applications", rows)
for k in ("individual", "merchant"):
line(k, [r for r in rows if r["kind"] == k])
for t in (1, 2, 3):
line(f"KYC tier {t}", [r for r in rows if r["kyc_tier"] == t])
line("thin file", [r for r in rows if not r["hit"]])
line("bureau hit", [r for r in rows if r["hit"]])python3 coverage.pyall applications 8386 thin 25.2% under 30 days of wallet 39.9% card data 60.9% median inflow ₦51,813
individual 7612 thin 25.6% under 30 days of wallet 39.7% card data 67.1% median inflow ₦45,091
merchant 774 thin 21.3% under 30 days of wallet 41.9% card data 0.0% median inflow ₦766,565
KYC tier 1 4224 thin 32.4% under 30 days of wallet 39.6% card data 64.9% median inflow ₦34,060
KYC tier 2 2879 thin 17.8% under 30 days of wallet 41.0% card data 64.4% median inflow ₦70,638
KYC tier 3 1283 thin 17.8% under 30 days of wallet 38.4% card data 39.8% median inflow ₦373,261
thin file 2111 thin 100.0% under 30 days of wallet 40.8% card data 60.4% median inflow ₦44,087
bureau hit 6275 thin 0.0% under 30 days of wallet 39.6% card data 61.1% median inflow ₦55,463The 2,111 thin files are 25.2% of the book. Merchants have no card data at all: 0.0%, because in this generated book they never fund by card. Tier 1 wallets, the smallest and newest customers, are 32.4% thin against 17.8% in tiers 2 and 3. Median monthly inflow runs from ₦34,060 in tier 1 to ₦373,261 in tier 3. A feature built on card data cannot serve SME applicants, and every feature leans on a short history for the four in ten wallets under 30 days.
5. Run the placebo on the salary-like detector. Save placebo.py. It runs the detector on the real credit dates, then three times on dates dealt out at random among each customer’s own credits.
import random
import sqlite3
from datetime import date
from walletfeat import load_wallets, salary_like
db = sqlite3.connect("data1/finance.sqlite")
wallets = load_wallets(db)
kind = dict(db.execute("SELECT id, kind FROM customers"))
apps = db.execute("SELECT customer_id, applied_at FROM applications ORDER BY id").fetchall()
rng = random.Random(7)
def credits_before(cid, today):
return [(d, kobo, bank) for d, direction, kobo, k, bank in wallets.get(cid, [])
if d < today and direction == "credit" and k == "funding_transfer"]
def flagged(shuffle):
"""Applications with a salary-like credit. With shuffle=True every customer's credit dates are
dealt out again at random among their own credits: same amounts, same banks, no rhythm."""
hits = {"individual": 0, "merchant": 0}
for cid, applied in apps:
today = date.fromisoformat(applied)
credits = credits_before(cid, today)
if shuffle:
days = [c[0] for c in credits]
rng.shuffle(days)
credits = sorted([(d, c[1], c[2]) for d, c in zip(days, credits)])
if salary_like(credits, today):
hits[kind[cid]] += 1
return hits
real = flagged(False)
print(f"real dates: individuals {real['individual']:>4}, merchants {real['merchant']:>4}")
for run in range(1, 4):
fake = flagged(True)
print(f"shuffled dates {run}: individuals {fake['individual']:>4}, merchants {fake['merchant']:>4}")
n = {k: sum(1 for cid, _ in apps if kind[cid] == k) for k in ("individual", "merchant")}
print(f"applications: individuals {n['individual']}, merchants {n['merchant']}")python3 placebo.pyreal dates: individuals 72, merchants 154
shuffled dates 1: individuals 75, merchants 149
shuffled dates 2: individuals 82, merchants 136
shuffled dates 3: individuals 82, merchants 141
applications: individuals 7612, merchants 774With real dates the detector fires on 72 + 154 = 226 applications. With dates scrambled it fires on 224, 218 and 223. A detector that finds pay should fall to nearly nothing when the rhythm is destroyed. This one does not: it is finding coincidences, and it finds them mostly among merchants, whose wallets receive so many transfers that two will match by chance (154 of 774 merchant applications against 72 of 7,612 from individuals). The lab’s wallets were generated without a pay rhythm, so a placebo that matches the real run is the right answer here. With real payroll data the real run would stand well above its placebo.
6. Test what the features add to the bureau score. Save lift.py, which imports the helpers you saved as altlib.py in step 4. It fits each model on loans from applications up to 30 April, scores the later ones, and prints AUC for everyone, for applicants with a bureau hit and for thin files, then each feature alone, then the gain with a bootstrap interval.
import math
import random
from altlib import auc, fit, load
SPLIT = "2026-04-30" # train on applications up to here, test after
rows = [r for r in load() if r["bad"] is not None] # applications that became loans
train = [r for r in rows if r["applied_at"] <= SPLIT]
test = [r for r in rows if r["applied_at"] > SPLIT]
y = [r["bad"] for r in test]
print(f"train: {len(train)} loans, {sum(r['bad'] for r in train)} bad | test: {len(test)} loans, {sum(y)} bad")
mean_score = sum(r["score"] for r in train if r["hit"]) / sum(1 for r in train if r["hit"])
bureau = lambda r: [r["score"] if r["hit"] else mean_score, 1 - r["hit"]] # a thin file gets the average
wallet = lambda r: [math.log1p(r["inflow_monthly_kobo"] / 100), r["active_week_share"],
math.log1p(r["balance_floor_kobo"] / 100), 1 if r["salary_like_credits"] else 0]
device = lambda r: [1 if r["card_attempts"] else 0, r["devices"], r["new_device_share"] or 0.0]
models = {"bureau": [bureau], "wallet only": [wallet], "device only": [device],
"bureau + wallet": [bureau, wallet], "bureau + device": [bureau, device],
"bureau + both": [bureau, wallet, device]}
score = {name: fit(train, fs)(test) for name, fs in models.items()}
thin = [i for i, r in enumerate(test) if not r["hit"]]
hit = [i for i, r in enumerate(test) if r["hit"]]
sub = lambda s, idx: ([s[i] for i in idx], [y[i] for i in idx])
print(f"\n{'model':<17}{'all':>7}{'hit':>7}{'thin':>7} AUC on later applications")
for name in models:
s = score[name]
print(f"{name:<17}{auc(s, y):7.3f}{auc(*sub(s, hit)):7.3f}{auc(*sub(s, thin)):7.3f}")
print(f"(n: all {len(test)}, hit {len(hit)}, thin {len(thin)}; bad: {sum(y)}, "
f"{sum(y[i] for i in hit)}, {sum(y[i] for i in thin)})")
print("\neach feature alone (higher = safer, so the sign is flipped), test AUC")
alone = {"bureau score": lambda r: -(r["score"] if r["hit"] else mean_score),
"monthly inflow": lambda r: -r["inflow_monthly_kobo"],
"active weeks": lambda r: -r["active_week_share"],
"balance floor": lambda r: -r["balance_floor_kobo"],
"salary-like credit": lambda r: -r["salary_like_credits"],
"devices used": lambda r: r["devices"]}
for name, fn in alone.items():
print(f" {name:<19}{auc([fn(r) for r in test], y):.3f}")
def interval(a, b, idx, reps=500, rng=random.Random(1)):
"""Bootstrap: resample the test applications and recompute the AUC gain of model b over model a."""
gains = []
for _ in range(reps):
s = [rng.choice(idx) for _ in idx]
ys = [y[i] for i in s]
gains.append(auc([score[b][i] for i in s], ys) - auc([score[a][i] for i in s], ys))
gains.sort()
return gains[int(0.025 * reps)], gains[int(0.975 * reps)]
print("\ngain over the bureau alone, with a 95% bootstrap interval (500 resamples)")
everyone = list(range(len(test)))
for b in ("bureau + wallet", "bureau + device"):
for label, idx in (("all", everyone), ("thin", thin)):
gain = auc(*sub(score[b], idx)) - auc(*sub(score["bureau"], idx))
lo, hi = interval("bureau", b, idx)
print(f" {b:<16}{label:<5}{gain:+.3f} ({lo:+.3f} to {hi:+.3f})")python3 lift.pytrain: 1176 loans, 136 bad | test: 2469 loans, 232 bad
model all hit thin AUC on later applications
bureau 0.664 0.690 0.500
wallet only 0.567 0.553 0.567
device only 0.546 0.553 0.504
bureau + wallet 0.668 0.689 0.564
bureau + device 0.656 0.686 0.483
bureau + both 0.664 0.684 0.557
(n: all 2469, hit 1900, thin 569; bad: 232, 157, 75)
each feature alone (higher = safer, so the sign is flipped), test AUC
bureau score 0.642
monthly inflow 0.618
active weeks 0.558
balance floor 0.502
salary-like credit 0.520
devices used 0.552
gain over the bureau alone, with a 95% bootstrap interval (500 resamples)
bureau + wallet all +0.005 (-0.008 to +0.018)
bureau + wallet thin +0.064 (-0.004 to +0.132)
bureau + device all -0.008 (-0.022 to +0.005)
bureau + device thin -0.017 (-0.087 to +0.059)Read the table row by row.
- The bureau model, a score and a thin flag, gets 0.664 overall, 0.690 on files with a hit and exactly 0.500 on thin files, because it can only give every thin file the same number.
- A wallet-only model gets 0.567 on thin files: a little above a coin flip, on 75 bad loans. Bureau plus wallet gets 0.564 there. The gain on thin files is +0.064, and its interval, -0.004 to +0.132, barely reaches zero. A fair summary: wallet features probably help a little where the bureau is blind, and this test is too small to be sure.
- Over everyone the wallet adds +0.005 (-0.008 to +0.018), which is nothing you can tell from noise.
- Device features make it slightly worse: -0.008 overall and -0.017 on thin files, intervals well across zero. The generator drew these columns from a hidden fraud flag, not from repayment, so a null here is the right answer and says nothing about real device data. A feature built for one purpose is no evidence for another.
- Alone, monthly inflow scores 0.618, close to the bureau score’s 0.642, and yet bureau plus the whole wallet group gains only 0.005. Much of what inflow knows is already in the bureau model: thin files have lower inflows.
All of this is measured on loans only, which carry the old rule’s selection, and on a young label. Treat the figures as a method’s output, not as how any real feed would perform.
7. Read the weights. Save weights.py. It refits bureau plus all four wallet features on the training loans and prints each weight with the sign your story predicts, then compares three models on the test loans.
import math
from altlib import auc, fit, load
rows = [r for r in load() if r["bad"] is not None]
train = [r for r in rows if r["applied_at"] <= "2026-04-30"]
test = [r for r in rows if r["applied_at"] > "2026-04-30"]
y = [r["bad"] for r in test]
mean_score = sum(r["score"] for r in train if r["hit"]) / sum(1 for r in train if r["hit"])
bureau = lambda r: [r["score"] if r["hit"] else mean_score, 1 - r["hit"]]
inflow = lambda r: [math.log1p(r["inflow_monthly_kobo"] / 100)]
weeks = lambda r: [r["active_week_share"]]
floor = lambda r: [math.log1p(r["balance_floor_kobo"] / 100)]
salary = lambda r: [1 if r["salary_like_credits"] else 0]
names = ["bureau score", "thin file", "monthly inflow (log)", "active-week share", "balance floor (log)", "salary-like credit"]
expect = ["-", "+", "-", "-", "-", "-"]
model = fit(train, [bureau, inflow, weeks, floor, salary])
print("weights on standardised features (positive = riskier), fitted on the training loans")
print(f" {'feature':<22}{'weight':>8} the story says")
for n, w, e in zip(names, model.weights[1:], expect):
flag = " <-- opposite to the story" if (w > 0) != (e == "+") and abs(w) > 0.005 else ""
print(f" {n:<22}{w:+8.3f} {e}{flag}")
print("\ntest AUC on later applications")
for label, fs in (("bureau", [bureau]), ("bureau + all four wallet features", [bureau, inflow, weeks, floor, salary]),
("bureau + inflow only", [bureau, inflow])):
print(f" {label:<34}{auc(fit(train, fs)(test), y):.3f}")python3 weights.pyweights on standardised features (positive = riskier), fitted on the training loans
feature weight the story says
bureau score -0.517 -
thin file +0.330 +
monthly inflow (log) -0.230 -
active-week share +0.197 - <-- opposite to the story
balance floor (log) +0.001 -
salary-like credit -0.154 -
test AUC on later applications
bureau 0.664
bureau + all four wallet features 0.668
bureau + inflow only 0.672The active-week share has a weight of +0.197 where the story says regularity lowers risk. The data disagrees with the story. A fitted weight like that is either noise from 136 bad training loans or a real effect you cannot explain, and neither belongs in a model a customer may ask about. Monthly inflow has the sign you expect (-0.230), and so does the salary-like credit (-0.154), though the placebo already told you not to trust it. The balance floor has a weight of +0.001: the model ignores it. Dropping the active-week share and the floor and the salary detector, so that the wallet contributes only monthly inflow, lifts the test AUC from 0.668 to 0.672. Be careful with that: you chose it after seeing the test score, which is a way of fooling yourself. The honest confirmation is applications that arrive after the cut-off, and this book has none.
8. Try to fake it. Save gaming.py. It takes three thin-file applicants from the test period, adds a ₦300,000 credit two days before their application, leaves it in the wallet, recomputes their features, and reads their risk from the bureau-plus-wallet model.
import math
import sqlite3
from datetime import date, timedelta
from altlib import fit, load
from walletfeat import load_wallets, wallet_features
TOPUP = 30_000_000 # kobo: ₦300,000 sent in from a friend's account
DRESS_DAYS = 2 # ... this many days before the application, and left in the wallet
rows = load()
loans = [r for r in rows if r["bad"] is not None]
train = [r for r in loans if r["applied_at"] <= "2026-04-30"]
test = [r for r in loans if r["applied_at"] > "2026-04-30"]
mean_score = sum(r["score"] for r in train if r["hit"]) / sum(1 for r in train if r["hit"])
bureau = lambda r: [r["score"] if r["hit"] else mean_score, 1 - r["hit"]]
wallet = lambda r: [math.log1p(r["inflow_monthly_kobo"] / 100), r["active_week_share"],
math.log1p(r["balance_floor_kobo"] / 100), 1 if r["salary_like_credits"] else 0]
model = fit(train, [bureau, wallet])
sigmoid = lambda z: 1 / (1 + math.exp(-z))
test_scores = sorted(model(test))
db = sqlite3.connect("data1/finance.sqlite")
wallets = load_wallets(db)
# Three thin-file applicants in the test period with 100 days or more of wallet history and a modest inflow.
chosen = [r for r in test if not r["hit"] and r["wallet_age_days"] >= 100 and r["inflow_monthly_kobo"] < 3_000_000][:3]
print(f"top-up ₦{TOPUP // 100:,}, {DRESS_DAYS} days before the application, held in the wallet\n")
print(f"{'application':<12}{'':<7}{'inflow/month':>14}{'floor':>13}{'weeks':>7}{'P(bad)':>8}{'safer than':>12}")
for r in chosen:
today = date.fromisoformat(r["applied_at"])
events = list(wallets[r["customer_id"]])
for label, ev in (("before", events),
("after", sorted(events + [(today - timedelta(days=DRESS_DAYS), "credit", TOPUP,
"funding_transfer", "B01")], key=lambda e: e[0]))):
row = dict(r, **wallet_features(ev, today, r["wallet_age_days"]))
z = model([row])[0]
safer = 100 * sum(1 for s in test_scores if s > z) / len(test_scores)
print(f"{r['application_id']:<12}{label:<7}{row['inflow_monthly_kobo'] // 100:>13,}{row['balance_floor_kobo'] // 100:>13,}"
f"{row['active_week_share']:>7.2f}{sigmoid(z):>8.3f}{safer:>11.0f}%")python3 gaming.pytop-up ₦300,000, 2 days before the application, held in the wallet
application inflow/month floor weeks P(bad) safer than
279 before 29,561 13,029 0.46 0.155 30%
279 after 129,561 13,029 0.46 0.137 37%
752 before 20,365 0 0.69 0.184 13%
752 after 120,365 0 0.77 0.167 23%
5250 before 25,993 6,946 0.54 0.165 25%
5250 after 125,993 6,946 0.54 0.144 35%A top-up of ₦300,000 over a 90-day window adds ₦100,000 to monthly inflow: 30,000,000 kobo × 30 ÷ 90 = 10,000,000 kobo. Application 279 goes from ₦29,561 to ₦129,561. The balance floor does not move for any of them, because the wallet was lower earlier in the window. The model’s probability of bad falls from 0.155 to 0.137, and the applicant moves from safer than 30% of test loans to safer than 37%. For 752 and 5250 it is 13% to 23% and 25% to 35%. One transfer from a friend moved each applicant 7 to 10 percentage points up the ranking.
Make the floor your target instead. Open gaming.py, change DRESS_DAYS = 2 to DRESS_DAYS = 95, and run it again. The top-up now arrives before the window opens and stays in the wallet throughout:
top-up ₦300,000, 95 days before the application, held in the wallet
application inflow/month floor weeks P(bad) safer than
279 before 29,561 13,029 0.46 0.155 30%
279 after 29,561 313,029 0.46 0.156 30%
752 before 20,365 0 0.69 0.184 13%
752 after 20,365 300,000 0.69 0.185 12%
5250 before 25,993 6,946 0.54 0.165 25%
5250 after 25,993 306,946 0.54 0.165 24%The floor jumps from ₦13,029 to ₦313,029 for application 279, and from ₦0 to ₦300,000 for 752. The monthly inflow does not change, because the credit falls outside the 90-day window. And the probability of bad does not move: 0.155 to 0.156, 0.184 to 0.185. The model gives the floor almost no weight, as step 7 showed. The feature that costs the applicant something real (money tied up for three months) is ignored, and the one that costs a friend’s transfer for two days is rewarded. Then read loans.py around the hidden risk: the generator makes risk depend on how large inflow is, and on KYC tier and merchant status, and on nothing like regularity, balance floor or devices. Which of the features in this chapter would you harden first, and what would you change in its definition? Then run lift.py again with SPLIT = "2026-03-31". The training set falls to 543 loans and the thin-file result moves. That is what a small sample does.
Template
# Data source assessment: <source>, <date>
Prepared by <credit analyst>, credit risk. Decided by <credit committee, chaired by head of credit>.
## 1. The source
What it is, who holds it, the fields it sends (field by field), how often, and why it was collected originally: <...>
## 2. Coverage and cost
- Applicants with data: <count> of <total> (<share>). No data: <who>, and what they get instead
- Short history (the share too new to read): <share>
- Licence or per-call fee: <amount, or not known and who will say>
- Build and run cost: <amount, or not known and who will say>
## 3. Measured lift over what we already have
- Baseline model and test split: <...>
- Gain in AUC, all applicants: <+x.xxx (low to high)>
- Gain in AUC, thin files: <+x.xxx (low to high)> on <n> loans, <bad> bad
- Placebo or sign check: <what you ran, what it printed>
- Limits of the test: <selection, young labels, anything the source was not built for>
## 4. Consent and privacy
Lawful basis relied on, and the wording the customer sees: <...>
Controller and processor, and the written agreement: <...>
Withdrawal: <how the feed stops>. Impact assessment: <status>. To confirm with counsel: <...>
## 5. Fairness and gaming
Who is scored worse for lack of data, or because of the plan, the phone or the employer: <...>
Cheapest way to fake it, and what it costs the customer: <...>
What would be hardened first: <...>
## 6. How this could be wrong
<one way, and what would show it>
## 7. Decision
Recommendation: go, no-go, or go in shadow. Decision needed: <what, from whom, by when>.
Conditions to move from shadow to live: <figure and date>. Out of scope: <...>
Prepared <name, date>. Decided <name, date>. WORKED EXAMPLE
Nkemdirim, a credit analyst at Owoleaf, writes this for each new source; Owoleaf’s head of credit chairs the credit committee that decides. This one assesses the wallet-ledger features the lab builds, as the first source against which the Ferrowave and Lumora Mobile offers will be compared.
Source. Owoleaf’s own wallet entries: monthly inflow, active-week share, balance floor and a salary-like count, all read from the 90 days before each application day. Collected to run the wallet, so lending is a new purpose.
Coverage and cost. Data exists for every applicant, but 39.9% of applications come from wallets under 30 days old. Of 8,386 applications, 2,111 (25.2%) are thin files. Licence fee: none. Build and run cost: not measured by the lab; engineering to supply before committee.
Lift. Fitted on loans to 30 April, tested on later ones. On 2,469 test loans (232 bad), bureau plus wallet gains +0.005 overall (-0.008 to +0.018). On 569 thin files (75 bad) it gains +0.064 (-0.004 to +0.132), from 0.500 to 0.564. The salary-like detector fired on 226 applications and on 224, 218 and 223 after shuffling dates, so it is dropped. The active-week weight is +0.197, opposite to the story, so it is dropped too.
Consent. Assumed basis: the customer’s consent to use wallet history for credit, shown at application and withdrawable in the app, which stops the features being read. Wording not yet drafted. Counsel confirms the basis and the purpose-limitation question; a DPIA is planned.
Gaming. A ₦300,000 top-up two days before applying moved application 279 from safer than 30% of test loans to 37%. Harden first: monthly inflow, which a median over a longer window would blunt.
Could be wrong. Outcomes exist only for approved loans, so the thin-file gain may not hold for declined people. A pilot gain whose interval still includes zero would show it.
Decision. Go in shadow for thin files, with inflow only, for three months; committee decides by 18 December 2026. Not live; device data out of scope.
Now you
You are a credit analyst at a payday lender in Abuja. A mobile operator offers airtime top-up and data-use summaries for subscribers who agree, and says the data will fix your thin files. It holds records for millions of subscribers and quotes a lift measured on another lender’s customers. You have no outcomes on any of its data. Treat the lab’s scale-1 book as your own applicants.
Write the assessment for this source. Use coverage.py as your template for the coverage table, and lift.py to show what a measured lift looks like and how wide its interval is on thin files. The device-only rows are a warning about data built for another purpose. Treat the operator’s fields, fees and consent wording as assumptions and label them. Say what a pilot would have to show before the feed decides anyone’s loan, and how SIM swaps and several SIMs could mislead it.
Your head of credit signs it. It supports one decision: whether to run a shadow pilot, and on what terms.
Self-check
Owoleaf has 200 people. Nkemdirim has an offer from Ferrowave (salary-payout records) and one from Lumora Mobile (airtime and data-use summaries), each for applicants who consent. Her bureau model cannot rank 25% of applicants. Each partner says its data will fix thin files and quotes a lift from its other customers. She needs a decision for the credit committee in a month. What does she propose?
- PAPER Behavior Revealed in Mobile Phone Usage Predicts Loan Repayment (Björkegren and Grissen) Daniel Björkegren and Darrell Grissen, 2020
The best-known case for telco data in credit: call records from a South American operator, tested against bureau models, with a thin-file result. Read how they split the data and what they compare against. Skip the machine-learning details on a first pass. Read: The abstract, the data and test design, and the results on people with thin or no credit history.
- PAPER On the Rise of FinTechs: Credit Scoring Using Digital Footprints (Berg, Burg, Gombović, Puri) Tobias Berg, Valentin Burg, Ana Gombović, Manju Puri, 2020
The case that simple device and operating-system variables carry as much information as a bureau score, from an online retailer's data. Read the sections on what the footprint adds to the bureau score and on unscorable customers. Remember the data is one online retailer's. Read: The introduction, and the results on complementing the bureau score and on customers without a score.
- DOC Nigeria Data Protection Act 2023 and the NDPA GAID 2025 (Nigeria Data Protection Commission) Nigeria Data Protection Commission, 2025
The Commission's own document. Read the sections this chapter cites from commentary: 24 to 26 on principles and consent, 28 on impact assessments and 29 on processors, and check what the directive says about impact assessments and profiling. Check the section numbers yourself.
- DOC Digital lending: FCCPC tackles abuses, issues landmark regulations (FCCPC) Federal Competition and Consumer Protection Commission, 2025
The regulator's own announcement of the 2025 digital lending regulations. Read it for the commencement date and the stated aims, then find the regulations' data-access provision, which this chapter reports only from commentary.
- DOC DEON Consumer Lending Guidelines 2025 (FCCPC) Federal Competition and Consumer Protection Commission, 2025
The commission's companion guidance to the Regulations. Read it for how the regulator frames a lender's duties on data. It is guidance, so keep it apart from the binding text.
All companies and people in these examples are fictional. Any resemblance to a real business or person is unintended.