Skip to main content

Risk-Weighted Assets

License: GPL v3 Python CI

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
  • 16 canonical input and six output workbooks per persisted calculation

Installation

Python 3.10 or newer is required. Install a locally built wheel with:

python -m pip install dist/risk_weighted_assets-1.0.0-py3-none-any.whl

For development from this source tree:

python -m pip install -e '.[test,build]'

Once the package has completed the separate publication process, the regular PyPI command will be python -m pip install risk-weighted-assets.

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.

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

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

risk_weighted_assets-1.0.0.tar.gz (4.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

risk_weighted_assets-1.0.0-py3-none-any.whl (4.4 MB view details)

Uploaded Python 3

File details

Details for the file risk_weighted_assets-1.0.0.tar.gz.

File metadata

  • Download URL: risk_weighted_assets-1.0.0.tar.gz
  • Upload date:
  • Size: 4.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for risk_weighted_assets-1.0.0.tar.gz
Algorithm Hash digest
SHA256 94b60a4a73226778bc1ed80d49649745623a727259f57b74c89dbdd53ab145e4
MD5 fa0690d33f68a37bd78d573fb4a44ad3
BLAKE2b-256 a87fac6bfa7de0096115a5ecf0307d3ea8a7629410ac1186c10d9eb40e1ae129

See more details on using hashes here.

Provenance

The following attestation bundles were made for risk_weighted_assets-1.0.0.tar.gz:

Publisher: publish.yml on rds0001/risk-weighted-assets-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file risk_weighted_assets-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for risk_weighted_assets-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 07d6f72fc49b9847518dc142bd2286a33ec13e91eef2210243df7796e5cda295
MD5 6760a76a7eb729cf13762aa187417e90
BLAKE2b-256 165f109f9bc94b53f0c9cf9a3aead12a0355ee786d65d4368d0c4d1f9b982b1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for risk_weighted_assets-1.0.0-py3-none-any.whl:

Publisher: publish.yml on rds0001/risk-weighted-assets-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.1.0

2 files

This release

1.0.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page