Methodology
Methodology

Methodology

How the data was built, how the model was trained, and what its limits are.

1. Synthetic data generation

Because real lending portfolios are not publicly available, the dataset used here is generated customer-by-customer. Each customer receives a coherent underlying profile — demographics, employment, income, credit behaviour, borrowing behaviour — and every downstream record (employment, income history, credit accounts, transactions, loans, repayments) is derived from that profile.

The dataset contains approximately:

  • 18,000 customers
  • 17,300 employment records
  • ~2 million income-history entries
  • ~9 million financial transactions
  • 27,000 loan applications
  • 5,049 originated loans — 930 defaults (~18%)

2. Feature engineering

The training data is built at the application level — one row per loan — using only information that would have been available at the moment of the credit decision. No future information (repayments, default events) leaks into the features.

Approximately 30 features are used, grouped into:

  • Borrower: age, gender, marital status, education, dependants, location
  • Employment: status, employer type, tenure, monthly income
  • Debt: existing balance, debt-to-income ratio, number of accounts
  • Loan: requested amount, term, interest rate, PTI and LTI ratios
  • Credit behaviour: previous late/missed payments

3. Model training

Three models were trained on the same 80/20 time-based split — earlier loans for training, more recent loans for testing — which mirrors how a real lender would validate a model.

  • Logistic Regression — selected as the primary model (highest PR-AUC, fully interpretable)
  • Random Forest — comparable ROC-AUC, weaker PR-AUC on this dataset size
  • XGBoost — under-performed on this dataset size; needs more data to shine

4. Class imbalance

Defaults are the minority class (~18–30% depending on the sample). We handle this with class_weight="balanced" in Logistic Regression and by reporting PR-AUC alongside ROC-AUC, since ROC-AUC can be misleading on imbalanced data.

5. Explainability

Because Logistic Regression is linear, we can express each prediction as a sum of per-feature contributions — the same quantity SHAP reports. The result page shows the top six features that pushed a given applicant's prediction up or down.

6. Limitations

  • The data is entirely synthetic — performance numbers reflect internal consistency, not real-world accuracy.
  • The default rate in this sample is higher than typical real portfolios.
  • The model does not use transaction-level behaviour or bureau data.
  • Predictions are probabilistic estimates, not lending decisions.