The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
Complete public function reference
Canonical flags in 1.2.2
calculate_tables() normalises exposure defaults once for both reporting views. SA and IRB detail expose defaulted. Invalid flags fail closed; see vignette("default-flags") for the accepted scalar representations and reference cases.
Snapshot times in 1.2.3
official_snapshot() preserves ISO time-of-day from run_config and shares its UTC parser with calculate_tables(). POSIXt values, ISO T/space strings, optional Z and fractional seconds are accepted. Date-only inputs denote midnight. Malformed or non-scalar timestamps are rejected. See ?official_snapshot.
Scope
This vignette is the task-oriented index for the complete public API of riskweightedassets 1.2.3. Every public function is listed below. Detailed arguments, return values, formulas, controls and runnable examples are provided by the corresponding R help page, for example help("sa_exposure_value", package = "riskweightedassets").
The API separates individual formulas from portfolio orchestration so that a bank analyst can inspect an input, select a rule set, apply a governed parameter override, reproduce a metric and inspect the resulting control trail. Formula structure itself remains version-controlled code; runtime parameter changes are accepted only through the explicit override interface.
End-to-end calculation and validation
calculate_tables() |
Calculate applied and fully-loaded views from 68 canonical in-memory tables. |
calculate_dataset() |
Validate and calculate a versioned workbook dataset and write controlled outputs. |
validate_dataset() |
Validate a workbook dataset without running the calculation engines. |
Synthetic data, workspaces and source inventory
generate_synthetic_tables() |
Create a complete synthetic bank profile as canonical data frames. |
generate_synthetic_dataset() |
Materialise a synthetic profile as canonical workbooks. |
create_workspace() |
Create a caller-selected, writable reference workspace. |
default_workspace() |
Resolve the configured default workspace without creating it. |
list_reference_profiles() |
List bundled synthetic bank profiles. |
list_reference_datasets() |
List bundled reference-dataset metadata. |
regulatory_sources() |
Inspect official-source URLs, dates, hashes and redistribution status. |
Parameters, rule sets, schemas and governance
regulatory_parameters() |
Return the complete effective regulatory parameter table. |
regulatory_parameter() |
Resolve one parameter for explicit dimensions and dates. |
override_regulatory_parameters() |
Apply non-mutating, reasoned and approved parameter overrides. |
parameter_overrides() |
Retrieve the old/new-value audit trail attached to a parameter set or result. |
formula_catalog() |
Inspect formula identifiers, versions and implementation coverage. |
available_rule_sets() |
List available applied and fully-loaded rule sets. |
select_rule_set() |
Resolve one rule set by identifier and effective date. |
table_dictionary() |
Inspect the canonical table inventory. |
table_schema() |
Inspect the field-level contract for one canonical table. |
official_snapshot() |
Select an official bitemporal snapshot reproducibly. |
Result inspection and reconciliation
rwa_metrics() |
Return all headline metrics from a calculation result. |
rwa_metric() |
Retrieve one named metric with strict name checking. |
rwa_result_tables() |
Return all detailed result tables. |
rwa_result_table() |
Retrieve one detailed result table by name. |
rwa_table_names() |
List detailed result-table names. |
rwa_controls() |
Return the complete reconciliation and control table. |
failed_controls() |
Return only controls that did not pass. |
rwa_validation() |
Return the structured validation report. |
compare_calculation_views() |
Compare applied and fully-loaded metrics. |
rwa_summary() |
Produce a compact analyst summary of metrics, controls and overrides. |
Domain analysis
Each domain function extracts the relevant metrics, tables and controls into a rwa_domain_analysis object without rerunning the calculation.
analyze_credit_risk() |
Standardised and IRB credit risk, CRM and exposure results. |
analyze_counterparty_risk() |
Counterparty credit risk, SFT, CCP, CVA and settlement risk. |
analyze_securitisation() |
Securitisation approach selection and tranche calculations. |
analyze_market_risk() |
Legacy and FRTB market-risk views. |
analyze_operational_risk() |
Business indicator and operational-risk requirement. |
analyze_output_floor() |
Shadow standardised TREA, floor factor and uplift. |
analyze_capital_adequacy() |
Own funds, ratios, buffers, leverage, MREL and TLAC. |
analyze_irrbb() |
EVE, NII, CSRBB and outlier-test measures. |
analyze_icaap() |
Economic capital, diversification and normative projections. |
Credit supporting factors
sme_supporting_factor() |
Weighted Article 501 SME factor using reviewed E* in EUR. |
infrastructure_supporting_factor() |
Governed Article 501a infrastructure factor. |
apply_credit_supporting_factors() |
Apply independent SME and infrastructure factors once. |
irb_risk_weighted_assets() |
EAD times RWA multiplier times K and eligible support factors. |
These are arithmetic helpers, not eligibility certificates. The table API requires explicit eligibility, evidence and approval; it validates the selected exposure context. See the installed supporting-factors vignette for migration, legacy warnings, audit outputs and the independent output-floor paths.
library(riskweightedassets)
factor <- sme_supporting_factor(5000000)
irb_risk_weighted_assets(1000000, 0.08, sme_factor = factor,
infrastructure_factor = infrastructure_supporting_factor())
#> [1] 604462.5
S3 methods and object behaviour
The package also registers five documented S3 methods. Users normally invoke the generic rather than calling the method directly.
print.rwa_calculation_result() |
Print a concise calculation status and headline summary. |
print.rwa_domain_analysis() |
Print one domain-analysis summary. |
print.rwa_validation_report() |
Print validation counts and issues. |
as.data.frame.rwa_validation_report() |
Convert validation issues to a stable data-frame contract. |
print.rwa_workspace() |
Print resolved workspace paths. |
Controlled analyst example
library(riskweightedassets)
tables <- generate_synthetic_tables(bank_profile = "KSA_BANK")
overrides <- data.frame(
parameter_key = "SA_RW",
dimension_1 = "CORPORATE",
dimension_2 = "UNRATED",
parameter_value = 0.40
)
adjusted_tables <- override_regulatory_parameters(
tables,
overrides,
reason = "Approved sensitivity scenario SCN-2026-09",
approved_by = "Model Risk Committee decision 2026-09-14"
)
result <- calculate_tables(adjusted_tables)
rwa_summary(result)
failed_controls(result)
parameter_overrides(result)
analyze_credit_risk(result)
The package is a transparent analytical reference implementation. Use with a real institution requires independent legal interpretation, data governance, model validation, change approval and regulatory reporting controls.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.