Skip to content

acobotas/credit-risk-std-irb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mortgage RWA & CET1: STD vs IRB

Python Pandas Scikit-learn Basel III

Portfolio capital comparison under Basel III: Standardized (STD) vs Foundation Internal Rating Based (IRB).


Quick links


What this project answers

Banks must hold CET1 capital against credit risk. Basel III allows multiple approaches:

  • STD: prescribed risk weights (eg, LTV buckets)
  • IRB: model-driven risk sensitivity (requires defensible PD/LGD/EAD governance)

Question: for this mortgage dataset and PD modelling setup, which approach produces lower CET1?


Dataset

  • 5,960 rows × 11 columns
  • Target: BAD (1 = default/serious delinquency, 0 = paid)
  • Defaulted exposures exported separately: datasets/output/defaulted.csv

Results

Metric STD IRB
EAD (sum) $344.2M $344.2M
RWA (sum) $113.0M $662.8M
CET1 (sum) $9.0M $53.0M
RW (avg) 0.312 1.951

Takeaway: IRB is 5.86× higher than STD for both RWA and CET1

Recommendation

Standardized approach (STD) is recommended for this dataset and modelling setup.

Why

  • Capital outcome: STD requires $9.0M CET1 vs $53.0M under IRB (IRB is 5.86× higher).
  • PD signal is weak: Logistic Regression variants cluster at PR AUC ≈ 0.58, so the IRB input (PD) doesn’t add enough information to reduce capital.
  • Governance/audit simplicity: STD is rule-based; IRB needs stronger model governance, validation, and monitoring to be defensible.
  • Data constraint: only ~5k non-defaulted rows and 7 numeric predictors were used for PD, which limits IRB’s ability to become “risk-sensitive in a capital-efficient way”.

Visuals

  • Portfolio totals:
    STD vs IRB totals

  • Risk weight comparison:
    RW

  • In this portfolio, IRB’s implied average RW (~1.951) is far above 1.00, while STD’s average RW (~0.312) remains well below 1.00.


PD modelling

Metric focus: PR AUC (class imbalance).

Model PR AUC ROC AUC
LR_baseline 0.5801 0.7842
LR_class_weight 0.5800 0.7906
LR_class_weight_smote 0.5759 0.7908

Selected PD model: LR_baseline (best PR AUC).

  • Confusion matrix:
    Confusion matrix
  • Precision–Recall curve comparison:
    PR curve comparison

How it works

  1. Split first (no leakage): stratified train/test
  2. Capital track: impute MORTDUE/VALUE, build EAD, LTV
  3. Model track: transform PD predictors (fit on train only) → estimate PD
  4. STD capital: LTV → RW via Basel Table 11 → RWA → CET1
    Source: Basel III CRE 20.82 Table 11
  5. IRB capital: PD → K → RWA → CET1

Caveat

IRB is risk-sensitive and can be lower than STD with more data and richer features.
Here it is much higher, likely due to dataset size (~5k non-defaulted) and limited predictors (7 numeric). IRB should be re-tested with more data/features before treating STD as “the truth”.


Next steps

  • Re-run IRB with more data and re-evaluate
  • Estimate LGD empirically (instead of fixed 0.45)
  • Add defaulted exposure CET1 treatment (BAD = 1)
  • Build a dashboard (Power BI / Tableau / Looker Studio)

About

A Basel III mortgage capital project comparing STD vs IRB RWA/CET1, using Logistic Regression PD modelling.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors