https://github.com/gblack98/digital-lending-analytics-dbt
Data warehouse & BI for digital lending โ dbt models for loan portfolio analytics, KPIs and cohort analysis
https://github.com/gblack98/digital-lending-analytics-dbt
analytics business-intelligence data-warehouse dbt lending sql
Last synced: 2 months ago
JSON representation
Data warehouse & BI for digital lending โ dbt models for loan portfolio analytics, KPIs and cohort analysis
- Host: GitHub
- URL: https://github.com/gblack98/digital-lending-analytics-dbt
- Owner: Gblack98
- Created: 2026-03-31T21:40:15.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-03-31T21:52:40.000Z (3 months ago)
- Last Synced: 2026-04-01T00:59:43.992Z (3 months ago)
- Topics: analytics, business-intelligence, data-warehouse, dbt, lending, sql
- Size: 2.93 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ Digital Lending Analytics โ dbt Data Warehouse
   
> dbt data warehouse for digital lending platforms โ loan portfolio KPIs, cohort analysis, NPL tracking, and operational dashboards. Inspired by **Rubyx.io** (โฌ125M disbursed, 0.55% NPL rate).
## Models
### Risk Mart
| Model | Description |
|-------|-------------|
| `loan_portfolio_risk` | DPD buckets, NPL identification, loan status |
| `cohort_analysis` | Repayment rates by cohort month ร product ร country |
### Finance Mart
| Model | Description |
|-------|-------------|
| `revenue_recognition` | Interest income, fees, provisions |
| `portfolio_summary` | AUM, at-risk exposure, coverage ratios |
### Operations Mart
| Model | Description |
|-------|-------------|
| `disbursement_funnel` | Application โ approval โ disbursement rates |
| `collections_efficiency` | Recovery rates by DPD bucket |
## Key Metrics Tracked
| KPI | Formula | Target |
|-----|---------|--------|
| **NPL Rate** | Loans > 90 DPD / Total Portfolio | < 2% |
| **PAR30** | Loans > 30 DPD / Total Portfolio | < 5% |
| **Repayment Rate** | Closed loans / Matured loans | > 92% |
| **Cost of Risk** | Provisions / Average Portfolio | < 3% |
## Loan Status Buckets (DPD)
```sql
'active' โ not yet matured
'dpd_1_30' โ 1-30 days past due (early warning)
'dpd_31_60' โ 31-60 days (collection triggered)
'dpd_61_90' โ 61-90 days (escalation)
'npl' โ > 90 days (non-performing, provisioned)
'closed' โ fully repaid
```
## Setup
```bash
pip install dbt-postgres
dbt deps
dbt run
dbt test
dbt docs generate && dbt docs serve # Interactive docs at localhost:8080
```
## Author
**Ibrahima Gabar Diop** โ [GitHub](https://github.com/Gblack98) ยท [Kaggle](https://www.kaggle.com/ibrahimagabardiop)