customLifetimePDModel
Create customLifetimePDModel
object for lifetime probability
of default
Since R2022b
Description
Create and analyze a customLifetimePDModel
object to
calculate the lifetime probability of default (PD) using this workflow:
Fit a PD model that can predict PD for a loan or a portfolio of loans.
Define a function handle for a function that predicts the PD in your designated PD model.
Use
customLifetimePDModel
and pass the specified function handle to create acustomLifetimePDModel
object. The designated model is now wrapped as a lifetime PD model.Use
predict
to predict the conditional PD andpredictLifetime
to predict the lifetime PD.Use
modelDiscrimination
to return AUROC and ROC data. You can plot the results usingmodelDiscriminationPlot
.Use
modelCalibration
to return the RMSE of the observed and predicted PD data. You can plot the results usingmodelCalibrationPlot
.
Creation
Syntax
Description
creates a CustomLifetimePDModel
= customLifetimePDModel(pdFcnHandle
,IDVar
=idvar_value,ResponseVar
=responsevar_value)customLifetimePDModel
object for a PD model
using required name-value arguments and sets model object properties.
specifies options using one or more name-value arguments in addition to the
input arguments in the previous syntax. The optional name-value arguments
set model object properties. For example,
CustomLifetimePDModel
= customLifetimePDModel(___,Name=Value
)CustomLifetimePDModel =
customLifetimePDModel(pdFcnHandle,IDVar="ID",AgeVar="YOB",Description="Scorecard
as lifetime PD
model",LoanVars="ScoreGroup",MacroVars={'GDP''Market'},ModelID="ScorecardLifetime",ResponseVar="Default",WeightsVar="Weights")
creates a CustomLifetimePDModel
object.
Input Arguments
Properties
Object Functions
predict | Compute conditional PD |
predictLifetime | Compute cumulative lifetime PD, marginal PD, and survival probability |
modelDiscrimination | Compute AUROC and ROC data |
modelCalibration | Compute RMSE of predicted and observed PDs on grouped data |
modelDiscriminationPlot | Plot ROC curve |
modelCalibrationPlot | Plot observed default rates compared to predicted PDs on grouped data |
Examples
References
[1] Baesens, Bart, Daniel Roesch, and Harald Scheule. Credit Risk Analytics: Measurement Techniques, Applications, and Examples in SAS. Wiley, 2016.
[2] Bellini, Tiziano. IFRS 9 and CECL Credit Risk Modelling and Validation: A Practical Guide with Examples Worked in R and SAS. San Diego, CA: Elsevier, 2019.
[3] Breeden, Joseph. Living with CECL: The Modeling Dictionary. Santa Fe, NM: Prescient Models LLC, 2018.
[4] Roesch, Daniel and Harald Scheule. Deep Credit Risk: Machine Learning with Python. Independently published, 2020.