IMA Eligibility Program for Trading Desks (FRTB Compliant)
This document outlines a comprehensive Internal Models Approach (IMA) Eligibility Program for trading desks under the Fundamental Review of the Trading Book (FRTB) framework (BCBS 457). The program automates the determination of IMA eligibility based on:
- Trading Desk Definitions (unambiguous P&L attribution).
- Risk-Theoretical P&L (RTP&L) computation.
- P&L Attribution Tests (PLAT: RTP&L vs. Actual P&L).
- Backtesting Exceptions (Hypothetical P&L vs. Actual P&L, with multipliers).
The program is designed as a modular Python-based system (pseudocode provided for core functions). It processes daily data over a 250-business-day rolling window (extendable to 12 months for initial approval). Desks failing tests are escalated to Standardized Approach (SA) or de-designated.
Prerequisites & Data Inputs
- Daily Data (per trading desk):
| Field | Source | Description |
|---|
desk_id | Inventory System | Unique desk identifier |
actual_pnl (AP&L) | P&L System | Realized + unrealized P&L |
positions_eod | Risk System | End-of-day positions/risk factors |
market_data_eod | Market Data Feed | EOD risk factor levels |
market_shocks | Scenario Engine | Stressed shocks for HPL/RTP&L |
risk_model_output | IMA Model (ES/Sensitivities) | RTP&L from full Expected Shortfall model |
- Regulatory Thresholds:
| Test | Window | Pass Criteria | Fail Action |
|---|
| PLAT | 12 months | Avg( | RTP&L - AP&L |
| Backtesting | 250 days | Exceptions ≤ 4 (green); 5-9 (amber, ×1.5 multiplier); ≥10 (red, SA) | Multiplier or de-IMA |
1. Trading Desk Definitions
Trading desks must be P&L-attributable units:
2. Risk-Theoretical P&L (RTP&L) Computation
RTP&L is the P&L from the full IMA risk model (e.g., Expected Shortfall at 97.5% under stressed scenarios).
- Formula: RTP&L_t = ES_model(positions_{t-1}, shocks_t)
- Hypothetical P&L (HPL) for Backtesting: HPL_t = revalue(positions_{t-1}, market_data_t)
- Pseudocode:
def compute_rtpl_hpl(positions_eod, market_data_eod, market_shocks, risk_model):
hpl = revalue_positions(positions_eod, market_data_eod) # Linear approx or full reval
rtpl = risk_model.expected_shortfall(positions_eod, market_shocks) # Full IMA ES
return {'rtpl': rtpl, 'hpl': hpl}
3. P&L Attribution Tests (PLAT)
Tests if RTP&L explains AP&L.
-
Metrics (over window):
| Metric | Formula | Threshold |
|---|
| Attribution Breach Rate | # days |RTP&L - AP&L| > 10% max(|RTP&L|, |AP&L|) / total days | ≤10% |
| Avg. Attribution Error | Mean(|RTP&L - AP&L| / max(|RTP&L|, |AP&L|)) | ≤10% |
-
Pseudocode:
def pnl_attribution_test(desk_data): # desk_data: df with 'date', 'apl', 'rtpl'
breaches = []
for i in range(len(desk_data)):
apl, rtpl = desk_data.iloc[i]['apl'], desk_data.iloc[i]['rtpl']
denom = max(abs(apl), abs(rtpl)) if max(abs(apl), abs(rtpl)) > 0 else 1e-6
error = abs(rtpl - apl) / denom
breaches.append(error > 0.10)
breach_rate = sum(breaches) / len(breaches)
avg_error = np.mean([abs(rtpl - apl)/denom for apl, rtpl, denom in ...]) # Simplified
status = 'PASS' if breach_rate <= 0.10 and avg_error <= 0.10 else 'FAIL'
return {'status': status, 'breach_rate': breach_rate, 'avg_error': avg_error}
4. Backtesting Exceptions
Compares HPL vs. AP&L for traffic light framework.
- Exception: |AP&L - HPL| > 10% × max(|AP&L|, |HPL|) AND |AP&L| > $75K (de-minimis).
- Multiplier (k_b): Green=1 (≤4 exc/250d), Amber=1.5 (5-9), Red=SA (≥10).
- Pseudocode:
def backtesting_exceptions(desk_data): # df with 'date', 'apl', 'hpl'
exceptions = 0
for i in range(len(desk_data)):
apl, hpl = desk_data.iloc[i]['apl'], desk_data.iloc[i]['hpl']
if abs(apl) > 75000: # De-minimis
denom = max(abs(apl), abs(hpl)) if max(abs(apl), abs(hpl)) > 0 else 1e-6
if abs(hpl - apl) / denom > 0.10:
exceptions += 1
if exceptions <= 4:
multiplier = 1.0; color = 'GREEN'
elif exceptions <= 9:
multiplier = 1.5; color = 'AMBER'
else:
multiplier = float('inf'); color = 'RED' # SA fallback
return {'exceptions': exceptions, 'multiplier': multiplier, 'color': color}
Main Eligibility Engine
Integrates all modules. Run daily/weekly.
def ima_eligibility_program(all_data_df):
eligible_desks = define_trading_desks(all_data_df)
results = {}
for desk in eligible_desks:
desk_data = all_data_df[all_data_df['desk_id'] == desk].tail(250) # Rolling window
# Compute P&Ls
desk_data[['rtpl', 'hpl']] = desk_data.apply(
lambda row: compute_rtpl_hpl(row['positions'], row['mkt_data'], ...), axis=1
)
# Tests
plat = pnl_attribution_test(desk_data)
bt = backtesting_exceptions(desk_data)
# 12-month PLAT for full eligibility
plat_12m = pnl_attribution_test(desk_data.tail(500)) # ~12m = 500 days approx
eligible = (plat['status'] == 'PASS') and (plat_12m['status'] == 'PASS') and (bt['color'] != 'RED')
results[desk] = {
'plat_daily': plat,
'plat_12m': plat_12m,
'backtest': bt,
'ima_eligible': eligible,
'kb_multiplier': bt['multiplier']
}
# Escalation: Email/report FAILs
fails = {k: v for k, v in results.items() if not v['ima_eligible']}
generate_report(results, fails)
return results
Implementation Notes
- Tech Stack: Python (Pandas/NumPy for data, RiskAPI for models), SQL for storage, Airflow for scheduling.
- Governance:
- Model validation: Annual review of RTP&L/HPL engines.
- Overrides: Manual exceptions logged, capped at 5% of days.
- Reporting: Daily dashboard (Tableau/PowerBI) with breach heatmaps.
- Edge Cases:
- Zero-P&L days: Skip de-minimis.
- New desks: 3-month provisional IMA, full test after 12m.
- Stress periods: Optional waiver for >20% market moves.
This program ensures full regulatory compliance while minimizing operational burden. For production deployment or customizations (e.g., bank-specific risk models), provide sample data for testing.