Risk-Weighted Assets
Version 1.2.2: Canonical default flags and regression cases.
Version 1.2.1: IRB default correction and API migration.
risk-weighted-assets is an institution-neutral, auditable Python reference engine for
CRR III risk-weighted assets, regulatory capital, IRRBB and ICAAP. It combines a stable
Python API, a command-line interface, a local browser application, canonical Excel
contracts, realistic synthetic portfolios and reproducible reference calculations.
The distribution is intended for research, education, prototyping and independent model validation. It is not regulatory, legal, accounting or investment advice and is not a certified regulatory reporting system. Read the disclaimer before use.
Functional scope
- CRR III credit risk under SA and IRB, credit-risk mitigation and output-floor views
- counterparty credit risk, SFT, CCP, securitisation, CVA and crypto exposures
- settlement, large exposures, market risk with parallel FRTB views, and operational risk
- own funds, buffers, leverage, MREL/TLAC and capital headroom
- IRRBB/CSRBB and ICAAP economic and normative perspectives
- deterministic fingerprints, lineage, reconciliations and calculation controls
- 38 public atomic regulatory formulae with explicit, analyst-controlled parameters
- nine focused risk-domain analyses plus granular metric, table and control access
- non-mutating parameter sensitivities with mandatory rationale, approver and audit trail
- 16 canonical input and six output workbooks per persisted calculation
Credit supporting factors (1.2.0)
SA/IRB eligibility, combined factors, legacy compatibility and audit fields are explained in Supporting factors.
Installation
Python 3.10 or newer is required. Install a locally built wheel with:
python -m pip install dist/risk_weighted_assets-1.2.2-py3-none-any.whl
Install the latest published release from PyPI with:
python -m pip install risk-weighted-assets
For development from this source tree:
python -m pip install -e '.[test,build]'
First calculation
Create an isolated, writable workspace from the immutable package resources and run the supplied universal-bank dataset:
rwa init ./rwa-workspace
rwa run --dataset ./rwa-workspace/daten/rechenlaeufe/2026-08-31/v1.0.0
Or generate a deterministic synthetic dataset and calculate it in one step:
rwa all \
--data-root ./rwa-workspace/daten/rechenlaeufe \
--as-of-date 2026-08-31 \
--version v1.0.1 \
--seed 5752026 \
--bank-profile MID_SIZE_UNIVERSAL
Set RWA_WORKSPACE=/absolute/path to change the default workspace used by the CLI and web
application. Package resources are never modified in place.
Python API
from pathlib import Path
from rwa_engine import calculate_dataset, create_workspace, validate_dataset
workspace = create_workspace(Path("rwa-workspace"))
dataset = workspace.runs_root / "2026-08-31" / "v1.0.0"
validation = validate_dataset(dataset)
if validation.valid:
result = calculate_dataset(dataset)
print(result.status, result.run_id, result.metrics)
For integration without Excel I/O, use calculate_tables(tables) with the canonical
dict[str, pandas.DataFrame] contract. It returns the same structured CalculationResult
without persisting output workbooks.
For formula-by-formula control and focused analysis:
from rwa_engine import (
analyze_credit_risk,
compare_calculation_views,
irb_capital_requirement,
regulatory_parameter,
)
print(regulatory_parameter("RWA_MULTIPLIER", "PILLAR1"))
print(irb_capital_requirement(0.01, 0.45, 0.20, 2.5))
credit = analyze_credit_risk(result)
print(credit.metrics, credit.tables, credit.controls)
print(compare_calculation_views(result))
CLI and local app
rwa --help
rwa doctor
rwa data list
rwa sources
rwa-web --data-root ./rwa-workspace/daten/rechenlaeufe
The web server binds to 127.0.0.1:8080 by default and invokes the same calculation
pipeline as the API and CLI. It has no authentication or TLS and is intended for a trusted
local workstation only.
Bundled data and source boundary
The wheel includes both complete synthetic profiles (MID_SIZE_UNIVERSAL and KSA_BANK),
their two calculation-ready datasets, retained reference outputs, configuration and the
machine-readable inventory of official sources. Use rwa data export PATH or
create_workspace(PATH) to obtain editable copies.
No downloaded regulation, standard, PDF or other third-party publication is redistributed.
Official links and archival checksums are available through rwa sources and the
regulatory source catalogue. The original construction
scaffold is not part of this distribution.
Documentation and verification
- documentation map
- public API
- granular bank-analyst API and all 38 formulae
- installation and troubleshooting
- architecture
- methodology
- governance, controls and acceptance
- package provenance
Run the complete local verification suite with:
python -m pytest
python -m ruff check src tests tools
python -m build
python -m twine check dist/*
python tools/validate_distribution.py dist
Legal and privacy
This project is published by RiskDataScience GmbH. The legally binding company information is available in the imprint, and information about the processing of personal data is provided in the privacy policy.
The installed library contains no telemetry, analytics or tracking and does not transmit portfolio, calculation or usage data to RiskDataScience GmbH. The optional browser application communicates only with the locally started RWA server. Interactions performed on GitHub or PyPI are additionally subject to the terms and privacy practices of those platforms.
License
Copyright © 2026 RiskDataScience GmbH. Original content is licensed under the GNU General Public License, version 3 only. External publications remain subject to their respective rights and are not included. See third-party notices.
Metadata
Release files for risk-weighted-assets 1.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| risk_weighted_assets-1.2.2.tar.gz | 4.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| risk_weighted_assets-1.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.7 MB
Release files / risk_weighted_assets-1.2.2.tar.gz
| Download URL | risk_weighted_assets-1.2.2.tar.gz |
|---|---|
| Size | 4.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bebd6565e6b2b8c39aae3c8fba69a8b0d346e85c83a687e400c94a3f774fd546
|
|
BLAKE2b-256 checksum How to use checksums |
62ca7a371cb2d45e058d5b077d4f46e037bcac08d758ebc8d4b0b7b2f143f87a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency logRelease files / risk_weighted_assets-1.2.2-py3-none-any.whl
| Download URL | risk_weighted_assets-1.2.2-py3-none-any.whl |
|---|---|
| Size | 4.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bf125c95d580b89917ce0e01779261be5bc97e2ee3693de58c4a3412bd20c52b
|
|
BLAKE2b-256 checksum How to use checksums |
adaf85c5323702d4dbe16489d83fbbebbc5aff26053d338927113628573b3af9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency log