How salgadosalgadoje/credit-risk-vintage-analytics works
This repository is a LendingClub credit-risk analytics pipeline: obtain a local loan extract, validate and load it into a PostgreSQL dimensional warehouse, then expose portfolio KPIs and quarterly vintage analysis for statistical review and executive BI. The README documents the warehouse, KPI, vintage, and BI layers; excerpts show configuration, download, and ETL behavior. Statistical implementation is only a documented capability: src/risk_stats.py is a stub in the supplied source.
Main entry points: dax_measures.md Power BI semantic layer · download_data.py Dataset downloader · etl_load.py Validated ETL loader · 03_vintage_analysis.sql Quarterly vintage matrix
Components 17
Data ingestion
- Dataset downloader
src/download_data.py - Local loan extract
data/raw - Pipeline settings
src/config.py - Validated ETL loader
src/etl_load.py
Dimensional warehouse
- PostgreSQL warehouse
- Kimball star schema
sql/01_ddl_star_schema.sql - Conformed dimensions
sql/01_ddl_star_schema.sql - Loan performance fact
sql/01_ddl_star_schema.sql
Risk analytics
- Portfolio KPI views
sql/02_kpi_views.sql - Quarterly vintage matrix
sql/03_vintage_analysis.sql - Cohort statistics
src/risk_stats.py
Executive BI
- Power BI semantic layer
powerbi/dax_measures.md - DAX and scenario measures
powerbi/dax_measures.md - Audience access rules
powerbi/dax_measures.md
Other components
- LendingClub dataset
- Kaggle dataset service
- Risk and finance users
Connections 17
- LendingClub dataset → Kaggle dataset service: publishes extract
README.md - Dataset downloader → Kaggle dataset service: downloads dataset
src/download_data.py - Dataset downloader → Pipeline settings: loads settings
src/download_data.py - Dataset downloader → Local loan extract: writes extract
src/download_data.py - Validated ETL loader → Pipeline settings: reads settings
src/etl_load.py - Validated ETL loader → Local loan extract: reads extract
README.md - Validated ETL loader → PostgreSQL warehouse: loads validated loans
README.md - Kimball star schema → PostgreSQL warehouse: defines schema
README.md - Conformed dimensions → Loan performance fact: conform fact keys
README.md - Portfolio KPI views → PostgreSQL warehouse: defines KPI views
README.md - Quarterly vintage matrix → PostgreSQL warehouse: defines cohort matrix
README.md - Cohort statistics → Quarterly vintage matrix: tests cohort curves
README.md - Power BI semantic layer → Portfolio KPI views: uses KPI layer
README.md - Power BI semantic layer → Quarterly vintage matrix: uses vintage analysis
README.md - Power BI semantic layer → DAX and scenario measures: defines measures
README.md - Power BI semantic layer → Audience access rules: defines access
README.md - Risk and finance users → Power BI semantic layer: reviews decisions
README.md