LOADING PORTFOLIO DATA...
Total EAD
Exposure at Default
Total RWA
Risk-Weighted Assets
Min Capital (8%)
Pillar 1 Requirement
Avg Risk Weight
Portfolio Average
Sector RWA Breakdown
Risk-weighted assets by sector
IRB
IRB Scenario Comparison
Total RWA across stress scenarios
IRB ONLY
SA Jurisdiction Comparison
Capital required — BCBS vs EU vs UK vs India
SA BASELINE
EAD by Asset Class
Portfolio composition
COMPOSITION
EAD by Country
Geographic concentration of exposures
GEO
Portfolio by Credit Rating
Number of exposures per rating grade
RATING
Top 15 Exposures by IRB RWA
Highest risk-weighted assets in portfolio (Baseline)
CONCENTRATION
PD Distribution
Probability of default across portfolio
CREDIT QUALITY
Derivative EAD Breakdown
EAD by instrument type
DERIVATIVES
Sector
Country
Rating
Type
NAME ↕ SECTOR ↕ COUNTRY ↕ INSTRUMENT RATING ↕ PD ↕ LGD ↕ EAD ↕ IRB RW% IRB RWA ↕ SA RW (BCBS) SA RW (INDIA)

Project Overview

This platform simulates an institutional credit risk portfolio and computes Basel III/IV capital requirements using a production-grade open-source library — creditriskengine. It was built to demonstrate end-to-end credit risk analytics: from raw trade inputs through EAD calculation, IRB risk weights, stress testing, and multi-jurisdiction SA comparison.

The project bridges finance domain expertise with Python-based quantitative implementation — showing how a risk professional with Basel/ICAAP background can leverage code to build analytical tools that would otherwise require expensive vendor platforms.

Methodology

1

Portfolio Construction

Multi-asset portfolio with Sovereigns, Banks, Corporates, SMEs, Mortgages, Retail pools, and Derivatives — reflecting a realistic institutional book.

2

EAD Calculation

For loans: EAD = Drawn + CCF × Undrawn. For derivatives: EAD = max(MTM, 0) + Notional × Add-on%. CCFs sourced from Basel supervisory tables.

3

IRB Risk Weights

Basel III IRB formula (CRE31.4–31.10): K = LGD × [N(G(PD)/√(1-R) + √(R/(1-R)) × G(0.999)) − PD], RW = K × 12.5 × MA. Asset correlations differ by class.

4

Stress Testing (ICAAP)

PD shocks applied: Baseline (1×), Adverse (1.5×), Severely Adverse (2.5×). Capital impact measured at 8% of RWA, reflecting Pillar 1 minimum.

5

Jurisdiction Comparison (SA)

Same portfolio run through BCBS, EU CRR3, UK PRA, and RBI frameworks. Key divergences include RBI's flat LTV-based mortgage RWs and EU SME supporting factor.

Tech Stack

Built entirely in Python using open-source libraries, with a vanilla JS frontend consuming JSON output.

Python 3.12
creditriskengine 0.4
openpyxl
JSON
Apache ECharts
Vanilla JS
HTML5 / CSS3

Outputs

📊

ICAAP_Dashboard.xlsx

4-sheet Excel: Portfolio Detail · IRB Stress Test · Jurisdiction Comparison · Summary

📄

portfolio.json

Full exposure dataset with all computed fields — feeds this dashboard

🌐

index.html

This interactive dashboard — 4 pages, scenario controls, drill-down tables

Asset Classes Covered

Sovereign
Bank
Corporate
SME
Residential Mortgage
QRRE
Other Retail
IRS
CCS
FX Forward/Option
Equity Derivatives
CDS
Commodity Swap
Bond Forward
Swaption