
Synthetic exposure snapshot for expected loss, capital and ECL
Source:R/data.R
scr_demo_portfolio.Rd5,000 exposures in six segments that map one-to-one to the asset classes
of the IRB risk-weight function. The PD is a grade PD (constant within
asset class and grade; the ten geometric grades start below the
regulatory floors on purpose) and the LGD a pool value constant within
the segment, so that segment by grade is a homogeneous pool and the
production SQL of scr_capital() reproduces R exactly. About 3 % of the
exposures are in default with a best estimate of expected loss and a
provision close to it; the other columns feed the standardized
comparison and the accounting stage rule of scr_ecl().
Format
A data.frame with 5,000 rows and 21 columns:
idExposure identifier.
segmentReporting segment (
retail_loans,mortgages,cards_revolver,cards_transactor,corporate_large,corporate_sme).asset_classAsset class of the risk-weight function.
gradePD grade,
G01(safest) toG10.pdOne-year PD of the grade (decimal).
lgdDownturn LGD of the pool (decimal).
ead,drawn,undrawnExposure at default and its split.
mEffective maturity in years (corporates only).
salesAnnual sales in millions (corporates only).
ltvLoan-to-value at origination (mortgages only).
ratingExternal rating (large corporates;
NAunrated).transactorLogical: revolving facility repaid in full monthly.
defaulted0/1 default flag (about 3 %).
elbeBest estimate of expected loss of the defaulted rows.
provisionProvision stock.
stageAccounting stage 1, 2 or 3.
dpdDays past due.
pd_origOne-year PD at origination.
eirAnnual effective interest rate.
Source
Synthetic. Generated by data-raw/scr_demo_portfolio.R, seed 20260904, in the package source
repository https://github.com/evandeilton/scorecraft.
See also
Other data:
scr_demo,
scr_demo_ead,
scr_demo_lgd,
scr_demo_lgd_cashflows,
scr_demo_panel,
scr_demo_rates
Examples
head(scr_demo_portfolio)
#> id segment asset_class grade pd lgd ead drawn
#> 1 E00001 retail_loans retail_other G05 0.006463 0.45 6415 6415
#> 2 E00002 mortgages retail_mortgage G05 0.006463 0.15 264510 264510
#> 3 E00003 cards_revolver qrre_revolver G08 0.064633 0.75 2054 1724
#> 4 E00004 mortgages retail_mortgage G04 0.003000 0.15 151164 151164
#> 5 E00005 retail_loans retail_other G05 0.006463 0.45 5875 5875
#> 6 E00006 cards_revolver qrre_revolver G04 0.003000 0.75 2470 1636
#> undrawn m sales ltv rating transactor defaulted elbe provision stage dpd
#> 1 0 NA NA NA <NA> FALSE 0 NA 418 2 30
#> 2 0 NA NA 0.31 <NA> FALSE 0 NA 1603 1 0
#> 3 330 NA NA NA <NA> FALSE 0 NA 6 1 0
#> 4 0 NA NA 0.33 <NA> FALSE 0 NA 4362 2 60
#> 5 0 NA NA NA <NA> FALSE 0 NA 18 1 0
#> 6 834 NA NA NA <NA> FALSE 0 NA 20 1 0
#> pd_orig eir
#> 1 0.006463 0.250
#> 2 0.006463 0.113
#> 3 0.064633 0.360
#> 4 0.003000 0.100
#> 5 0.006463 0.231
#> 6 0.003000 0.390
table(scr_demo_portfolio$asset_class)
#>
#> corporate corporate_sme qrre_revolver qrre_transactor retail_mortgage
#> 500 700 800 500 1000
#> retail_other
#> 1500