主要内容

shockedProbabilityModel

R2026b

Create shocked probability model for climate-adjusted credit risk

Since R2026b

Description

Create a shockedProbabilityModel object to fit and predict climate-adjusted probabilities of default using the UNEP FI methodology.

Use the shockedProbabilityModel object to extrapolate expert-guided credit shocks from a small group of borrowers to an entire portfolio based on climate scenario data. The object simplifies the optimization and prediction steps of the UNEP FI methodology into an iterative model development process.

After creating a shockedProbabilityModel object, use the associated object functions to:

  • fit — Fit the model by running the group-level and subgroup-level optimizations.

  • predict — Predict probabilities of default for new data.

Creation

Description

spm = shockedProbabilityModel(data) creates a shockedProbabilityModel object from a table data that contains columns named Group, SubGroup, BaselineProbability, and TargetProbability.

example

spm = shockedProbabilityModel(data,Name=Value) specifies the names of the columns in data that represent the group, subgroup, baseline probability, target probability, and ID variables. For example, spm = shockedProbabilityModel(data,GroupVar="Sector",SubGroupVar="Segment",BaselineProbabilityVar="BasePD",TargetProbabilityVar="TargetPD") specifies that the group, subgroup, baseline probability, and target probability columns have nondefault names.

example

Input Arguments

expand all

Input data for model fitting, specified as a table. By default, the table must contain columns named Group (group variable), SubGroup (subgroup variable), BaselineProbability (baseline probability variable), and TargetProbability (target probability variable), as well as one or more columns of predictor variables. To use a table with nondefault column names, specify the name-value arguments GroupVar, SubGroupVar, BaselineProbabilityVar, and TargetProbabilityVar.

Name-Value Arguments

expand all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: spm = shockedProbabilityModel(data,GroupVar="Sector",SubGroupVar="Segment") specifies that the group variable column is named "Sector" and the subgroup variable column is named "Segment".

Name of the ID variable column, specified as a string scalar. Use this name-value argument to identify a column in data that contains observation identifiers.

Name of the group variable column, specified as a string scalar. Use this name-value argument to identify a column in data that contains the top-level grouping used in the group-level optimization.

Name of the subgroup variable column, specified as a string scalar. Use this name-value argument to identify a column in data that contains the grouping used in the subgroup-level optimization.

Name of the baseline probability variable column, specified as a string scalar. Use this name-value argument to identify a column in data that contains each observation's pre-shock probability of default.

Name of the target probability variable column, specified as a string scalar. Use this name-value argument to identify a column in data that contains each observation's expert-guided shocked probability of default.

Output Arguments

expand all

Shocked probability model object, returned as a shockedProbabilityModel object.

Data Types: object

Properties

expand all

Data

This property is read-only.

Input data, represented as a table.

Data Types: table

This property is read-only.

Name of the ID variable column, represented as a string scalar.

Data Types: string

This property is read-only.

Name of the group variable column, represented as a string scalar.

Data Types: string

This property is read-only.

Name of the subgroup variable column, represented as a string scalar.

Data Types: string

This property is read-only.

Name of the baseline probability variable column, represented as a string scalar.

Data Types: string

This property is read-only.

Name of the target probability variable column, represented as a string scalar.

Data Types: string

Model

This property is read-only.

Model identifier, represented as a string scalar.

The fit object function sets this property.

Data Types: string

This property is read-only.

Model description, represented as a string scalar.

The fit object function sets this property.

Data Types: string

This property is read-only.

Names of predictor variables, represented as a string vector.

The fit object function sets this property.

Data Types: string

Optimization Settings

This property is read-only.

Link function, represented as "normal" or "logistic".

The fit object function sets this property.

Data Types: string

This property is read-only.

Objective function formulation, represented as "inverse-cdf" or "cdf".

The fit object function sets this property.

Data Types: string

Optimization options, represented as an optimization options object.

The fit object function sets this property.

Data Types: object

Results

This property is read-only.

Group-level sensitivity coefficients, represented as a dictionary.

The fit object function sets this property.

Data Types: dictionary

This property is read-only.

Subgroup-level sensitivity coefficients, represented as a dictionary.

The fit object function sets this property.

Data Types: dictionary

Object Functions

fitFit shocked probability model
predictPredict shocked probabilities of default

Examples

collapse all

Load sample climate data data from the sample file sampleClimateData.mat. Examine the variable names in the data table.

load sampleClimateData.mat data
data.Properties.VariableNames
ans = 1×5 cell
    {'ID'}    {'Group'}    {'SubGroup'}    {'BaselineProbability'}    {'TargetProbability'}

The table has the column names that the shockedProbabilityModel function requires. Use the sample data to create a shockedProbabilityModel object.

spm = shockedProbabilityModel(data)
spm = 
  shockedProbabilityModel with properties:

                              Data: [230×5 table]
                             IDVar: [0×0 string]
                          GroupVar: "Group"
                       SubGroupVar: "SubGroup"
            BaselineProbabilityVar: "BaselineProbability"
              TargetProbabilityVar: "TargetProbability"
                           ModelID: []
                       Description: []
                     PredictorVars: []
          GroupSensitivityBaseline: []
        GroupSensitivityLowerBound: []
        GroupSensitivityUpperBound: []
      SubGroupSensitivityBaselines: []
    SubGroupSensitivityLowerBounds: []
    SubGroupSensitivityUpperBounds: []
                   LinearRelations: []
                              Link: []
              ObjectiveFormulation: []
                      OptimOptions: []
                GroupSensitivities: []
             SubGroupSensitivities: []

Load sample portfolio climate data from samplePortfolioClimateData.mat. Examine the variable names in the calibrationPortfolioClimateData table.

load samplePortfolioClimateData.mat calibrationPortfolioClimateData
calibrationPortfolioClimateData.Properties.VariableNames
ans = 1×13 cell
    {'LoanID'}    {'Sector'}    {'Segment'}    {'TTCRating'}    {'ExpertImmediateRating'}    {'Year'}    {'TTCPD'}    {'ExpertImmediatePD'}    {'ShockedCapitalExpenditure'}    {'ShockedDirectEmissionsCosts'}    {'ShockedIndirectCosts'}    {'ShockedNetIncome'}    {'ShockedRevenue'}

The data in the table is organized according to these specifications:

  • ID: LoanID

  • Group: Sector

  • Subgroup: Segment

  • Baseline probability: TTCPD

  • Target probability: ExpertImmediatePD

Use these specifications with the data to create a shocked probability model.

spm = shockedProbabilityModel(calibrationPortfolioClimateData,IDVar="LoanID",GroupVar="Sector",SubGroupVar="Segment",BaselineProbabilityVar="TTCPD",TargetProbabilityVar="ExpertImmediatePD")
spm = 
  shockedProbabilityModel with properties:

                              Data: [230×13 table]
                             IDVar: "LoanID"
                          GroupVar: "Sector"
                       SubGroupVar: "Segment"
            BaselineProbabilityVar: "TTCPD"
              TargetProbabilityVar: "ExpertImmediatePD"
                           ModelID: []
                       Description: []
                     PredictorVars: []
          GroupSensitivityBaseline: []
        GroupSensitivityLowerBound: []
        GroupSensitivityUpperBound: []
      SubGroupSensitivityBaselines: []
    SubGroupSensitivityLowerBounds: []
    SubGroupSensitivityUpperBounds: []
                   LinearRelations: []
                              Link: []
              ObjectiveFormulation: []
                      OptimOptions: []
                GroupSensitivities: []
             SubGroupSensitivities: []

More About

expand all

Version History

Introduced in R2026b