| scr_ecl | R Documentation |
Discrete-time expected credit loss of every exposure:
scr_ecl(
pd_term,
lgd,
ead,
eir = 0,
stage = NULL,
dpd = NULL,
pd_orig = NULL,
scenarios = NULL,
weights = NULL,
prepay = NULL,
rho = 0.15,
t_max = NULL,
segment = NULL,
id = NULL,
config = scr_config(),
keep_rows = FALSE
)
pd_term |
Marginal monthly PDs: a matrix |
lgd, ead |
Vectors of length |
eir |
Annual effective interest rate, vector of length |
stage |
Optional stage vector (1, 2, 3); |
dpd |
Days past due (the rule); optional. |
pd_orig |
12-month PD at origination (the rule); optional. |
scenarios |
Named list of scenario shocks (see Details); |
weights |
Scenario weights; equal when |
prepay |
Monthly prepayment hazard: |
rho |
Asset correlation used by scenario shocks with |
t_max |
Term in months when |
segment |
Optional character vector of length |
id |
Optional identifier vector of length |
config |
An |
keep_rows |
Keep the per-exposure table. |
ECL_H = \sum_{t=1}^{H} S(t-1)\, h_t\, LGD_t\, EAD_t\, (1+r)^{-t/12}, \qquad S(t) = \prod_{s \le t}(1 - h_s - p_s)
with h_t the marginal monthly default hazard, p_t an optional
prepayment hazard and r the annual effective interest rate
(config$ecl_discount = "none" switches the discounting off). The
12-month figure uses H = config$ecl_horizon_months, the lifetime figure
the full term T. Stage 1 exposures carry the 12-month loss, stages 2
and 3 the lifetime loss; stage 3 exposures are credit-impaired and carry
LGD_1 * EAD_1. When stage is NULL the rule is: stage 3 if dpd >= config$ecl_stage_dpd[2], stage 2 if dpd >= config$ecl_stage_dpd[1] or
the 12-month PD now over the one at origination (pd_orig) is at least
config$ecl_sicr_ratio, else stage 1.
Scenarios are a named list of shocks applied to the base inputs, each a
list with any of pd_mult (non-negative multiplier of the hazards,
capped at one), z (systematic factor of the one-factor model applied to
the hazards with correlation rho, negative in a bad year), lgd_add
(added to the LGD, the result floored at zero) and ead_mult
(non-negative); weights (normalized to one) give the
probability-weighted result. When a shocked hazard plus the prepayment
hazard exceeds one, the exit probability of that month is capped at one.
The z shock is applied to each monthly hazard, not to the annual PD;
because the Vasicek map is non-linear, the implied 12-month stressed PD
is higher than the one obtained by stressing the annual PD with the same
z and rho (convert the annual PD yourself when that is wanted).
An object of class scr_ecl: a list with exposures (only
with keep_rows = TRUE: id, segment, stage, ead, pd_12m,
pd_life, ecl_12m, ecl_life, ecl), stages (stage, n,
ead, ecl_12m, ecl_life, ecl, coverage), segments (when a
segment is given), scenarios (scenario, weight, ecl_12m,
ecl_life, ecl), totals (n, ead, ecl_12m, ecl_life, ecl,
coverage, share_stage2, share_stage3), horizon, t_max,
discount, stage_rule, ledger and config.
International Accounting Standards Board (2014). IFRS 9 Financial Instruments, section 5.5 and paragraphs B5.5.1-B5.5.55.
Other irb-capital:
scr_capital(),
scr_el(),
scr_irb_rw(),
scr_pd_stress(),
scr_sa_rw()
cfg <- scr_config(verbose = FALSE)
d <- scr_demo_portfolio
h <- 1 - (1 - d$pd)^(1 / 12) # flat monthly hazard from the annual PD
e <- scr_ecl(h, d$lgd, d$ead, eir = d$eir, dpd = d$dpd, pd_orig = d$pd_orig,
t_max = 36L, segment = d$segment, config = cfg)
e
e$stages
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.