Request access to this dataset
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
This dataset is fully synthetic — it contains no real Kenyan individuals, borrowers, accounts, or transactions. By requesting access you agree to (1) always disclose that the data is synthetic in any downstream use or publication, (2) not represent it as real Kenyan consumer or DCP portfolio data, and (3) not attempt to re-identify, link, or cross-reference any record with real individuals or institutions.
Log in or Sign Up to review the conditions and access this dataset content.
- 1. Problem statement
- 2. Why it matters in Kenya
- 3. Existing data gap
- 4. Dataset description
- 5. Schema
- 6. Generation methodology
- 7. Class distribution
- 8. Quality control performed
- 9. Bias considerations
- 10. Privacy and ethical considerations
- 11. Licensing
- 12. Recommended uses
- 13. Recommended evaluation benchmarks
Kenya DCP Loan Performance & Collections Dataset (Synthetic) — v1.0
⚠️ This dataset is 100% synthetic. It does not contain, derive from, or represent any
real Kenyan individual, business, loan, or mobile-money transaction. All identifiers
(loan_id, borrower_id) are sequentially generated and carry no real-world meaning.
Any resemblance between generated values and real records is coincidental.
1. Problem statement
Kenya has 600+ entities registered or licensed as Digital Credit Providers (DCPs) under the Central Bank of Kenya's 2022 regulatory regime. Unsecured, short-term digital lending is central to Kenyan financial inclusion but is also associated with loan stacking, opaque pricing, and high default/write-off rates. There is no public dataset that lets researchers, regulators, smaller DCPs, or academics build and benchmark loan default, collections, or responsible-lending models — real DCP portfolios are commercially confidential and CBK-held.
2. Why it matters in Kenya
- Digital credit is often the first formal credit product for informal-sector and unbanked/underbanked Kenyans.
- Loan stacking (borrowing from multiple apps simultaneously) is a documented systemic risk that conventional bureau data captures poorly.
- CBK's DCP regulations require risk monitoring and responsible-lending practices, but smaller/newer providers and researchers have no data to prototype against.
- Collections practices in Kenyan digital lending have drawn regulatory and consumer- protection scrutiny — a labeled collections dataset supports research into fairer, more effective collections strategies.
3. Existing data gap
Public Kenyan fintech datasets are almost all either (a) generic global credit-scoring toy datasets with no Kenyan context, or (b) small survey-based financial-inclusion datasets (e.g., FinAccess) that lack loan-level granularity and outcome labels. No open dataset combines loan-level terms, borrower behavioral proxies, loan-stacking indicators, collections actions, and repayment outcomes in a Kenyan DCP context.
4. Dataset description
- Grain: one row per loan (a borrower may appear across multiple loans — 3,521 synthetic borrowers → 5,000 loans, avg. 1.42 loans/borrower, matching realistic repeat-borrowing patterns).
- Size: 5,000 records. Splits: train 3,499 / val 749 / test 753 (≈70/15/15,
stratified by
repayment_status). - Time span (synthetic): applications dated Jan 2024–Dec 2025.
- Files:
kenya_dcp_loan_dataset_full.csv— all 5,000 records withsplitcolumnkenya_dcp_loan_dataset_train.csv/_val.csv/_test.csv— pre-split, nosplitcolumn
5. Schema
| Column | Type | Description |
|---|---|---|
loan_id |
string | Synthetic unique loan identifier |
borrower_id |
string | Synthetic unique borrower identifier (repeats across loans) |
prior_loans_count |
int | Number of previous loans by this borrower in the dataset |
application_date, disbursement_date, due_date |
date | Loan lifecycle dates |
lender_type |
categorical | DCP category (mobile-only app, bank-backed, SACCO digital, fintech-MFI hybrid) |
loan_channel |
categorical | Mobile App / USSD / Agent-assisted / Bank digital channel |
loan_purpose |
categorical (5% missing) | Self-reported purpose |
loan_amount_kes |
float | Principal disbursed, KES |
loan_term_days |
int | 7/14/30/60/90-day term |
fee_pct |
float | Flat facilitation fee, % of principal (Kenyan digital-lender norm, not amortized interest) |
principal_plus_fee_kes |
float | Total amount owed at term end |
age, gender, county, urban_rural, employment_type (4% missing) |
— | Borrower demographics |
estimated_monthly_income_kes |
float (9% missing) | Self-reported/estimated income |
device_type |
categorical | Smartphone / feature phone (USSD-only) |
mobile_money_tenure_months |
int | Proxy for digital financial footprint |
avg_monthly_mm_inflow_kes, avg_monthly_mm_txn_count |
float/int | Mobile-money activity proxies (not real M-Pesa data) |
num_active_loan_apps_last_90d |
int | Loan-stacking proxy |
prior_default_count |
int | Defaults on earlier loans in this synthetic history |
credit_score_alt |
float (300–850) | Synthetic alternative credit score |
restructured_flag |
binary | Loan previously renegotiated |
repayment_channel |
categorical | M-Pesa STK Push / Agent cash / Bank transfer / Airtel Money |
number_of_reminders_sent, number_of_collection_calls |
int | Collections effort |
days_to_first_repayment_attempt |
int | Behavioral timing signal |
days_past_due |
int | DPD at 120-day observation window |
repayment_status |
categorical | Paid on time / Paid late / Defaulted — primary label |
default_flag |
binary | 1 = Defaulted — primary binary target |
written_off_flag |
binary | Default with DPD > 90 |
amount_recovered_kes, recovery_rate |
float | Collections/recovery outcome |
is_synthetic |
bool | Always True |
dataset_version |
string | kenya_dcp_synth_v1.0 |
6. Generation methodology
- Programmatic borrower simulation (numpy/pandas): demographics, county (weighted toward real population concentration, e.g. Nairobi/Kiambu/Mombasa), employment type, income (log-normal, conditioned on employment + urban/rural), mobile-money tenure and inflow proxies.
- Loan-term simulation: loan amount as a function of income, prior-loan graduation, and lender type (bank-backed lenders issue larger loans than mobile-only apps); fee structure reflects real Kenyan flat-fee digital-lending pricing conventions (higher % for shorter terms).
- Outcome simulation via logistic risk model (not independent random draws): default probability is a function of loan-to-income ratio, loan-stacking, prior defaults, mobile-money tenure, employment informality, restructuring history, and alt credit score, plus idiosyncratic noise (so the signal is realistic, not perfectly separable). A second logistic model determines "paid late" vs "on time" among non-defaults, reduced by collections effort (reminders/calls) — modeling diminishing-returns collections behavior.
- Recovery simulation: partial, DPD-dependent, collections-effort-boosted recovery for defaults; full recovery for on-time/late loans.
- Missingness injection: realistic missingness on self-reported fields (income 9%, employment type 4%, loan purpose 5%, age 2%) — mimics real DCP data-quality issues.
- No LLM-generated free text in this release (structured/tabular only); reasoning above (risk-factor weighting, vocabulary design, realistic fee/term conventions) was informed by domain knowledge of Kenyan digital lending rather than external real data.
- Fully reproducible: fixed seed (
20260908), deterministic pipeline, script-based — parameters documented above.
7. Class distribution
| Split | Paid on time | Paid late | Defaulted |
|---|---|---|---|
| Train | 65.4% | 23.1% | 11.5% |
| Val | 65.5% | 23.0% | 11.5% |
| Test | 65.3% | 23.1% | 11.6% |
Overall default rate 11.5% — calibrated to published ranges for unsecured short-term Kenyan digital credit, and intentionally imbalanced-but-workable (not degenerate).
8. Quality control performed
13 automated checks, all passing:
- No duplicate
loan_ids or fully duplicate rows - No invalid values (negative amounts, out-of-range ages, recovery rate outside [0,1])
- Due date always after disbursement date
- Default rate within a realistic band (5–25%)
loan_idsequence uncorrelated with target (rules out ordinal leakage, |r| = 0.019)- No phone-number-like or National-ID-like strings anywhere in the data
- Missingness rates within designed bands
- Loan amount correlates with income (r = 0.72) but is not deterministic (i.e., not a disguised formula the model could trivially invert)
- County / urban-rural geographic consistency
Baseline model sanity benchmark (see below) confirms the dataset is learnable (meaningfully above random) without being trivially solvable — the profile you want in a benchmark dataset.
| Model | AUC-ROC | PR-AUC |
|---|---|---|
| Logistic Regression (balanced) | 0.676 | 0.247 |
| LightGBM | 0.622 | 0.166 |
(Simple linear model outperforming a default-tuned GBM here is itself a realistic and useful benchmarking signal — it means the risk relationships are mostly monotonic/linear by design, and a well-tuned GBM should be able to match or exceed logistic regression with proper regularization/tuning — a good exercise for users of the benchmark.)
Top predictive features (LightGBM importance): fee_pct, credit_score_alt, county,
avg_monthly_mm_inflow_kes, mobile_money_tenure_months, estimated_monthly_income_kes,
age, loan_amount_kes — all plausible, pre-outcome, non-leaking features.
9. Bias considerations
- County weights approximate population concentration but are illustrative, not census- accurate — do not use this dataset to make real geographic policy claims.
- Income-by-employment-type base rates are directional approximations, not official wage statistics.
- Users building fairness-aware models should treat
gender,county, andurban_ruralas protected/sensitive attributes and test for disparate impact before any real-world-adjacent use (e.g., as a teaching example for fairness audits).
10. Privacy and ethical considerations
- No real people, accounts, phone numbers, national IDs, or M-Pesa transaction codes.
- All identifiers are synthetic sequence strings (
DCP-KE-######,BOR-######) with formats deliberately distinct from real Safaricom/CBK ID conventions. - Dataset must not be represented as real DCP portfolio data in any downstream
publication — always disclose as synthetic (per
is_synthetic=Truefield).
11. Licensing
Released for research, educational, and product-prototyping use. Treat as CC0-equivalent synthetic data — attribution appreciated but not required. Not for use in claiming regulatory compliance testing without disclosure that underlying data is synthetic.
12. Recommended uses
- Loan default / credit-risk model prototyping (
default_flag,repayment_status) - Collections-strategy optimization (
number_of_collection_callsvs. recovery outcomes) - Alternative credit scoring research (mobile-money-proxy features vs.
credit_score_alt) - Loan-stacking / responsible-lending research (
num_active_loan_apps_last_90d) - Teaching material for fairness/bias audits in credit models
- Baseline for a future "Kenyan Digital Credit Benchmark" if paired with additional real or synthetic datasets (fraud, SME cash-flow, etc.)
13. Recommended evaluation benchmarks
- Default prediction: AUC-ROC, PR-AUC (primary, given class imbalance), Brier score (calibration), KS-statistic (industry-standard for credit scoring)
- Multi-class repayment status: macro-F1, confusion matrix
- Recovery-rate regression: MAE, R²
- Recommended baseline models: Logistic Regression, LightGBM/XGBoost, and a simple MLP;
report performance stratified by
lender_typeandurban_ruralto surface fairness gaps.
- Downloads last month
- -