| scr_pd | R Documentation |
Assembles the final grade table: pd_be from scr_grades(), the active
entries of the MoC ledger by category (A and B summed over their
entries, the latest C), pd_moc = pd_be + A + B + C, the PD floor of
the asset class under the framework of params, and
pd_final = max(pd_moc, floor). With philosophy = "pit" the
through-the-cycle pd_moc is converted with the one-factor bridge of
scr_pd_pit_ttc() before the floor (rho and z required).
scr_pd(
grades,
moc = NULL,
params = NULL,
asset_class = NULL,
philosophy = c("ttc", "pit"),
rho = NULL,
z = NULL
)
grades |
An |
moc |
|
params |
An |
asset_class |
Asset class of the floor; |
philosophy |
|
rho, z |
Asset correlation and systematic factor for |
An object of class scr_pd: table (grade, label,
score_lo, score_hi, n, share, defaults, dr, pd_be,
moc_a, moc_b, moc_c, pd_moc, pd_ttc, pd_pit, floor,
pd_final, floor_applied), breaks, band_grade, direction,
alignment, alignment_score, master_scale, asset_class,
framework, floor, philosophy, rho, z, moc_ledger,
calibration, concentration, portfolio (weighted pd_be,
pd_moc, pd_final, moc_bp, share_at_floor), scorecard,
ledger, model_card.
Also params_modified, repairs, dr, rows, pd_source,
grade_method, sample, target, config and, after scr_export(),
files.
Other irb-pd:
predict.scr_grades(),
predict.scr_pd(),
scr_calibrate(),
scr_grades(),
scr_master_scale(),
scr_migration(),
scr_moc(),
scr_pd_pit_ttc(),
scr_pd_validate()
cfg <- scr_config(verbose = FALSE, nthread = 1, use_ranger = FALSE,
use_lightgbm = FALSE, xgb_rounds = 40, n_boot = 10)
res <- scr_select(scr_demo, "default", config = cfg, drop = c("id", "churn"),
date_col = "ref_date")
sc <- scr_scorecard(res)
gr <- scr_moc(scr_grades(sc, n_grades = 6, min_defaults = 10), "C", method = "ci_binomial")
pd <- scr_pd(gr)
pd
pd$table[, c("grade", "pd_be", "moc_c", "pd_final", "floor_applied")]
head(predict(pd, score = c(480, 560, 640), type = "pd_final"))
head(scr_apply(pd, head(scr_demo, 5)))
cat(tail(scr_sql(pd), 8), sep = "\n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.