| scr_lgd_pools | R Documentation |
Cuts the training predictions into n_pools quantile bands, merges the
bands with fewer than min_defaults defaults into the neighbor with
the closer long-run average, then merges adjacent bands whose long-run
averages break the increasing order (pool-adjacent violators), so that
the pools are ordered both in predicted and in realized LGD. Per pool:
the default-weighted long-run average (the regulatory estimate), the
exposure-weighted one, the standard error, the category-C margin of
conservatism (one-sided 95% t interval on the mean) and their sum.
scr_lgd_pools(x, n_pools = NULL, min_defaults = NULL)
x |
An |
n_pools |
Target number of pools; |
min_defaults |
Minimum defaults per pool; |
A data.table with one row per pool: pool, pred_lo,
pred_hi, pred_mean, n, share, ead, lra, lra_ew, sd,
se, moc_c, lra_moc, merged_from.
Other irb-lgd:
scr_elbe(),
scr_lgd(),
scr_lgd_downturn(),
scr_lgd_floor(),
scr_lgd_validate(),
scr_workout()
cfg <- scr_config(verbose = FALSE, nthread = 1, n_boot = 20)
wo <- scr_workout(scr_demo_lgd, scr_demo_lgd_cashflows, rates = scr_demo_rates, config = cfg)
m <- scr_lgd(wo, drivers = c("product", "ltv", "prior_dpd_max"), config = cfg)
scr_lgd_pools(m, n_pools = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.