This repository is the post-origination monitoring and impairment reporting layer in the commercial credit-risk stack. It uses loan-level expected loss data, prior-period snapshots, and optional pricing or capital inputs to produce facility-level ECL outputs, stage summaries, transition matrices, early-warning views, and concentration reports. The project is positioned as a portfolio monitoring layer that is relevant to both bank-style impairment review and non-bank portfolio performance management.
This project demonstrates how a commercial portfolio can be monitored after origination using staging, lifetime PD, scenario-weighted ECL, migration, and concentration analytics. It is designed as a portfolio project, so the workflow is transparent, the assumptions are clearly disclosed, and the outputs are shaped for recruiter-friendly review across both institutional and non-bank lending contexts.
Upstream inputs:
expected-loss-engine-commercial- optional facility-level capital context from
RWA-capital-commercial - optional pricing context from
RAROC-pricing-and-return-hurdle - prior-period snapshots and reviewer inputs staged under
data/
Downstream consumers:
- portfolio monitoring packs and early-warning review
- impairment and stage-movement summaries
- employer-ready disclosure and management-reporting examples
This project can be applied in:
- Portfolio risk monitoring, staging, and impairment-style reporting
- Early-warning and migration analysis for structured risk review
- Concentration, watchlist, and management reporting support
- Early risk monitoring and portfolio performance tracking after origination
- Roll-rate, arrears-style, and warning-signal review for collections or servicing teams
- Management reporting on customer cohorts, segments, and emerging risk pockets
data/output/facility_ecl.csvdata/output/ecl_summary_by_stage.csvdata/output/ecl_summary_by_segment.csvdata/output/concentration_report.csvdata/output/transition_matrix_grade.csvdata/output/transition_matrix_stage.csvdata/output/early_warning_summary.csvdata/output/aps330_stage_movement.csvdata/output/aps330_credit_quality.csv
data/: tracked folder guide plus runtime-createdinput/,manual/,processed/, andoutput/subfolders used during local runssrc/: reusable staging, lifetime PD, ECL, migration, and monitoring modulesscripts/: wrapper scripts for pipeline executiondocs/: methodology and disclosure notesnotebooks/: reviewer-facing notebook index and walkthrough placeholderstests/: validation and regression checks
python -m src.pipeline --refresh-demo-inputsOr:
python scripts/run_pipeline.py --refresh-demo-inputsRun validation tests:
pytest- All monitoring inputs are synthetic or simulated for demonstration purposes.
- The repo shows a practical monitoring and impairment workflow, not a production accounting, disclosure, or regulatory reporting platform.
- Scenario weights, staging thresholds, and early-warning rules are simplified so the logic remains easy to inspect.