Skip to content

Add MREL framework (BRRD2 / SRMR2) — v0.23.0#28

Merged
ankitjha67 merged 1 commit into
mainfrom
claude/mrel
Jun 29, 2026
Merged

Add MREL framework (BRRD2 / SRMR2) — v0.23.0#28
ankitjha67 merged 1 commit into
mainfrom
claude/mrel

Conversation

@ankitjha67

Copy link
Copy Markdown
Owner

Summary

New rwa/mrel.py implementing the EU resolution Minimum Requirement for own funds and Eligible Liabilities (BRRD2 Art. 45-45m / SRMR2) — the EU analogue of the TLAC framework shipped in v0.20.0.

What's new

  • mrel_trea_requirement(p2r, market_confidence_charge, …) — the Loss Absorption + Recapitalisation calibration: LAA = P1 + P2R, RCA = P1 + P2R + MCC, MREL = LAA + RCA, floored at the 18% TLAC minimum for G-SII resolution entities
  • mrel_tem_requirement(leverage_p2r, …) — the leverage-based requirement 2 × (P1 + leverage_P2R), floored at 6.75% for G-SIIs
  • assess_mrel(...) — compares eligible MREL against the higher of the TREA and TEM requirements, returning both ratios, the binding constraint, shortfalls, and a compliance flag (MRELResult)

The framework is parameterized (P2R, MCC, leverage P2R supplied by the caller per their resolution authority's policy) rather than hard-coding a contested calibration.

Tests

16 new tests covering the LAA+RCA calibration, the G-SII floors (binding and non-binding), TREA-vs-TEM binding constraints, breach/shortfall, and validation. Module at 100% coverage.

Full suite: 2,777 passing, 100% line coverage (8,391 statements), mypy clean (172 files), ruff clean. Version 0.23.0.

🤖 Generated with Claude Code


Generated by Claude Code

New rwa/mrel.py implementing the EU resolution Minimum Requirement for own
funds and Eligible Liabilities — the EU analogue of TLAC.

- mrel_trea_requirement / mrel_tem_requirement: the Loss Absorption +
  Recapitalisation Amount calibration (Pillar 1 + P2R, plus a market-
  confidence charge on the TREA recapitalisation amount), floored at the
  18% / 6.75% TLAC minimums for G-SII resolution entities.
- assess_mrel: compares eligible MREL against the higher of the TREA and
  TEM (leverage) requirements, reporting both ratios, the binding
  constraint, shortfalls, and a compliance flag.

16 new tests; module at 100% coverage. Full suite 2,777 passing, 100%
line coverage, mypy and ruff clean. Bumps to 0.23.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PktGA7a3zzvbAczr6UhrsT
Signed-off-by: Claude <noreply@anthropic.com>
@ankitjha67 ankitjha67 merged commit 4d96c50 into main Jun 29, 2026
1 of 5 checks passed
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@ankitjha67, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 17 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f8d1216a-6473-4afb-bf38-958bb1c2455f

📥 Commits

Reviewing files that changed from the base of the PR and between 7f3819e and 7a94a8e.

📒 Files selected for processing (7)
  • CHANGELOG.md
  • README.md
  • docs/architecture.md
  • pyproject.toml
  • src/creditriskengine/__init__.py
  • src/creditriskengine/rwa/mrel.py
  • tests/test_rwa/test_mrel.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/mrel

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7a94a8e737

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +184 to +185
trea_ratio = eligible_mrel / trea
tem_ratio = eligible_mrel / tem

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Separate TREA buffer deduction from TEM numerator

When a bank has CET1 allocated to the combined buffer, using the same eligible_mrel numerator for both ratios is not correct: SRB policy distinguishes that CET1 used for MREL-TREA cannot also meet the CBR, while leverage-based MREL is not restricted by that same amount (SRB MREL Policy 2024). This API has no CBR or separate-numerator input, so passing gross resources overstates TREA compliance, while passing resources net of the CBR fabricates TEM shortfalls; for entities with non-zero CBR near the risk-weighted stack, assess_mrel can report the wrong binding constraint and compliance flag.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants