| scr_capital | R Documentation |
Runs scr_irb_rw() on every exposure, aggregates by segment, compares
the IRB result with the standardized approach for the output floor,
reconciles regulatory expected loss with the provision stock
(shortfall deducted from capital; excess eligible as tier 2 up to 0.6 %
of the IRB risk-weighted assets), measures the impact of each input
floor, runs a fixed sensitivity grid and reports the name concentration
of the book. The parameter tables come from params; the object records
whether they were edited.
scr_capital(
x,
pd = "pd",
lgd = "lgd",
ead = "ead",
segment = NULL,
asset_class = config$asset_class,
m = NULL,
defaulted = NULL,
elbe = NULL,
provisions = NULL,
ltv = NULL,
rating = NULL,
sales = NULL,
fi = NULL,
transactor = NULL,
grade = NULL,
id = NULL,
claim = NULL,
granular = TRUE,
params = scr_irb_params(config$framework),
config = scr_config(),
keep_rows = FALSE
)
x |
A table of exposures ( |
pd, lgd, ead |
Column names of the probability of default, loss given default and exposure at default. |
segment |
Optional column name of the reporting segment. |
asset_class |
A column name or a single asset class (see
|
m, defaulted, elbe, provisions, ltv, rating, sales, fi, transactor, grade, id |
Optional column names: effective maturity, default flag, best estimate
of expected loss, provision stock, loan-to-value, external rating,
annual sales, financial-institution flag, transactor flag, PD grade
(defines the SQL pools together with |
claim |
Optional column name: the claim type of each exposure under
the foundation approach (a row of |
granular |
|
params |
An |
config |
An |
keep_rows |
Keep the per-exposure table in the object. |
An object of class scr_capital: a list with exposures
(per-exposure table, only with keep_rows = TRUE), segments (the
reconciliation table: segment, n, ead, pd_mean, lgd_mean,
m, r_mean, k_mean, rw, rwa_irb, rwa_sa, irb_sa_ratio,
el, provisions, shortfall_excess), pools (one row per
segment and grade with the constants the SQL emits), totals (n,
ead, el, rwa_irb, rwa_sa, irb_sa_ratio, output_floor,
rwa_floor, rwa_reported, floor_binding, headroom, density,
target_ratio, capital, provisions, shortfall, excess,
tier2_addback, tier2_cap, hhi, n_eff, max_share,
granular), floors (floor, n_hit, ead_hit, delta_rwa),
sensitivity (shock, rwa, delta, delta_pct),
concentration (share of EAD and RWA by segment), framework,
approach, params, config, ledger, model_card and, after
scr_export(), files.
segments and totals also carry n_defaulted; totals also
el_rate and rwa_irb_no_floors; concentration has segment, n,
ead, rwa, ead_share, rwa_share and hhi_contribution; columns
records the column names the SQL reads.
x is either a table of exposures, the remaining arguments naming its
columns, or a list list(pd = , lgd = , ead = , data = ) whose elements
are fitted models with an scr_apply() method (the PD, LGD and EAD
objects of the IRB modules) and data the table to apply them to. In
the list form each model present fills the corresponding vector from the
columns pd_final, lgd_final and ead_predicted of its scr_apply()
output, and the provenance is written to the ledger; elements that are
NULL fall back to the named columns of data.
asset_class is a column name of x or a single class applied to every
row. Segment means are weighted by EAD. The sensitivity grid shocks the
PD (x1.10, x1.25, x1.50), the LGD (+5 percentage points), the EAD
(+10 %), removes the input floors, scales the correlation (x1.25) and
stresses the PD with the one-factor model at q = 0.95 and 0.99
(scr_pd_stress(), the stressed PD then re-entering the function so
that the correlation follows it).
Basel Committee on Banking Supervision (2023). The Basel Framework, CRE31, CRE35 (treatment of expected losses and provisions), RBC20 (output floor).
Other irb-capital:
scr_ecl(),
scr_el(),
scr_irb_rw(),
scr_pd_stress(),
scr_sa_rw()
cfg <- scr_config(verbose = FALSE)
cap <- scr_capital(scr_demo_portfolio, segment = "segment", asset_class = "asset_class",
m = "m", defaulted = "defaulted", elbe = "elbe", provisions = "provision",
ltv = "ltv", rating = "rating", sales = "sales", transactor = "transactor",
grade = "grade", id = "id", config = cfg)
cap
cap$segments[, c("segment", "n", "rw", "irb_sa_ratio")]
cap$floors
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.