Open Net Worth
Open Net Worth is an open-source personal AI wealth assistant you run yourself: one ledger for your whole financial life, worked by an AI agent you control.
翻訳待ち
A high-performance, PRA PS1/26 compliant Risk-Weighted Assets (RWA) calculator for credit risk, built with Python and Polars.
翻訳待ち
Loading the full README. The saved excerpt is shown below.
This package is still in active development and is not production ready - release 1.0.0 will confirm when ready for current CRR and 2.0.0 for Basel 3.1
UK Credit Risk (CR) & Counterparty Credit Risk (CCR) RWA Calculator
A high-performance Risk-Weighted Assets (RWA) calculator for UK CR & CCR, supporting both current regulations and future Basel 3.1 implementation. Built with Python using Polars for vectorized performance.
The web UI and REST API ship with the base package — no extra required.Read the full README ↗[!IMPORTANT] This package is still in active development and is not production ready - release 1.0.0 will confirm when ready for current CRR and 2.0.0 for Basel 3.1
A high-performance Risk-Weighted Assets (RWA) calculator for UK CR & CCR, supporting both current regulations and future Basel 3.1 implementation. Built with Python using Polars for vectorized performance.
Documentation: https://OpenAfterHours.club/rwa_calculator/
Install with uv (recommended)
uv add rwa-calc
Or with pip
pip install rwa-calc
The web UI and REST API ship with the base package — no extra required.
| Extra | Description |
|---|---|
dev | Development tools (pytest, ruff, ty, zensical) |
all | All optional dependencies |
from datetime import date
from rwa_calc.api import CreditRiskCalc
response = CreditRiskCalc(
data_path="/path/to/data",
framework="CRR",
reporting_date=date(2026, 12, 31),
permission_mode="irb",
).calculate()
if response.success:
print(f"Total RWA: {response.summary.total_rwa:,.0f}")
df = response.collect_results()
IRB Mode — set permission_mode="irb" and provide a model_permissions input table
to route exposures to FIRB, AIRB, or slotting based on per-model approvals. Exposures
without a matching model permission fall back to SA. See the
Data Model docs
for the model permissions schema.
Interactive UI — server-rendered web interface (calculator, results, CRR vs Basel 3.1 comparison, and legacy-engine reconciliation) plus a REST API:
uv add rwa-calc
rwa-ui
# Open http://localhost:8000 in your browser (REST API + OpenAPI at /docs)
This calculator supports two regulatory regimes:
| Regime | Effective Period | UK Implementation | Status |
|---|---|---|---|
| CRR (Basel 3.0) | Until 31 December 2026 | UK CRR (EU 575/2013 as onshored) | Active |
| Basel 3.1 | From 1 January 2027 | PRA PS1/26 | Implemented |
A configuration toggle allows switching between calculation modes for:
The hardest part of adopting a new credit-risk engine is not installing it — it is signing off that the new numbers are correct on your own book. Parallel-run reconciliation operationalises that discipline: run this calculator and your existing/legacy calculator on the same portfolio, then reconcile the two outputs component by component (exposure class, approach, CCF, EAD, PD, LGD, risk weight, RWA, …).
Every exposure is bucketed as an exact match, a within-tolerance difference, a break, or missing on one side — with our engine's reason and input drivers attached so each break can be traced to either a data / mapping issue or an engine difference.
from datetime import date
from rwa_calc.api import CreditRiskCalc
calc = CreditRiskCalc(
data_path="/path/to/data",
framework="CRR",
reporting_date=date(2026, 12, 31),
permission_mode="standardised",
)
# Map your legacy output columns onto our components in a small TOML file
response = calc.reconcile("reconciliation.toml")
print(response.collect_totals_tie_out()) # does it tie out?
print(response.collect_summary_by_component()) # which components agree
breaks = response.collect_breaks_detail() # the break worklist, largest first
response.to_excel("reconciliation.xlsx") # full report, one sheet per view
You can also run it without writing Python from the Reconciliation page in the web UI
(rwa-ui, then open http://localhost:8000/reconciliation) or over HTTP via
POST /api/reconcile. This is distinct from Framework Comparison (CRR vs Basel 3.1 on the
same engine) — here the other side is your external, legacy output.
Details: See the Parallel-Run Reconciliation guide.
| Approach | Description |
|---|---|
| Standardised (SA) | Risk weights based on external ratings and exposure characteristics |
| Foundation IRB (F-IRB) | Bank-estimated PD, supervisory LGD |
| Advanced IRB (A-IRB) | Bank-estimated PD, LGD, and EAD |
| Slotting | Category-based approach for specialised lending |
This is the beginning of the README. Read the rest at the original. Read the full README ↗