model_clo_insight.analysis.pool_metrics module¶
Module that contains methods that compute various pool metrics. These are used extensively in the generation of stressed modeling pools (hypo pools)
- calc_adj_class_bdr(class_bdr, rvst_target_par, collat_prin_amt, warr)¶
Computes Adjusted Class Break-even Default Rate
Used for CDO Monitor Test
Adjusts Class Break-even Default Rate for par build / erosion
- Parameters
- Returns
Class Adjusted BDR
- Return type
- calc_asset_side(run_mode, pool, wal, coefs, WARF_sp)¶
Wrapper for the underlying methods that computes all the pool metrics for the CDO Monitor SDR
- Parameters
run_mode (str) – routing for EPDR vs SP_WARF
pool (list[clo_internal_objects.Obligor]) – pool of obligors to calculate the metric on
wal (float) – Weighted average life of the current portfolio
coefs (list[float]) – coefficients for the CDO Monitor SDR formula
WARF_sp (dict) – lookup table for weighted average rating factor
- Returns
Class SDR, diagnostics dictionary
- Return type
- calc_asset_side_A(pool, wal, coefs)¶
Calls each pool metric required for the CDO Monitor SDR (for IDT PD approach)
- calc_asset_side_B(pool, wal, coefs, WARF_sp)¶
Calls each pool metric required for the CDO Monitor SDR (for WARF approach)
- Parameters
- Returns
Class SDR, diagnostics dictionary
- Return type
- calc_class_bdr(was, warr, coef)¶
Computes Class Break-even Default Rate
Used for CDO Monitor Test
Designed to proxy a full BDR analysis of the highest priority class in the capital structure
- calc_class_sdr_exp_def_rate(exp_def_rate, def_rate_dispersion, ob_div_measure, ind_div_measure, reg_div_measure, wal, coefs)¶
Computes Class Scenario Default Rate: Method A (Expected Default Rate)
Used for CDO Monitor Test
Proxy for cumulative default hurdle rates from CDO Evaluator
Relies on the results of the following functions:
calc_exp_def_rate
calc_def_rate_dispersion
calc_ind_div_measure
calc_ind_div_measure
- Parameters
exp_def_rate (float) – Expected default rate of the current portfolio
def_rate_dispersion (float) – Default rate dispersion of the current portfolio
ob_div_measure (float) – Obligor diversity measure of the current portfolio
ind_div_measure (float) – Industry diversity measure of the current portfolio
reg_div_measure (float) – Regional diversity measure of the current portfolio
wal (float) – Weighted average life of the current portfolio
coefs (list[float]) – coefficients for the CDO Monitor SDR formula
- Returns
Class SDR
- Return type
- calc_class_sdr_sp_warf(exp_def_rate, def_rate_dispersion, ob_div_measure, ind_div_measure, reg_div_measure, wal, coefs)¶
Computes Class Scenario Default Rate: Method B (Using WARF)
Used for CDO Monitor Test
Proxy for cumulative default hurdle rates from CDO Evaluator
Relies on the results of the following functions:
calc_exp_sp_warf
calc_def_rate_dispersion
calc_ind_div_measure
calc_ind_div_measure
- Parameters
exp_def_rate (float) – Expected default rate of the current portfolio
def_rate_dispersion (float) – Default rate dispersion of the current portfolio
ob_div_measure (float) – Obligor diversity measure of the current portfolio
ind_div_measure (float) – Industry diversity measure of the current portfolio
reg_div_measure (float) – Regional diversity measure of the current portfolio
wal (float) – Weighted average life of the current portfolio
coefs (list[float]) – coefficients for the CDO Monitor SDR formula
- Returns
Class SDR
- Return type
- calc_credit_dispersion(obligors, risk_score_table)¶
calculates the rating disperison of a pool from a list of obligor objects.
- calc_def_rate_dispersion(pool, exp_def_rate)¶
Computes Absolute Deviation of PD for a Pool via IDT
Used in Class Scenario Default Rate calcs, method A
- Parameters
pool (list[clo_internal_objects.Obligor]) – pool of obligors to calculate the metric on
exp_def_rate (float) – Expected pool default rate (EPDR) via calc_exp_def_rate()
- Returns
Default rate dispersion (DRD)
- Return type
- calc_dscore(obligors, tables)¶
Computes the Diversity Score of a pool of obligors based on the DBRSM Industry classification
- Parameters
obligors (list[clo_internal_objects.Obligor]) – pool of obligors to calculate the metric on
tables (dict) – dictionary of various lookup tables used in the calculation
- Returns
Diversity Score of the pool
- Return type
- calc_exp_def_rate(pool)¶
Computes E(default rate) via IDT for a Pool
Used in Class Scenario Default Rate calcs
IDT lookup uses rating and tenor
- Parameters
pool (list[clo_internal_objects.Obligor]) – pool of obligors to calculate the metric on
- Returns
Expected pool default rate (EPDR)
- Return type
- calc_exp_sp_warf(pool, WARF_sp)¶
Computes E(default rate) for a Pool via WARF
Used in Class Scenario Default Rate calcs for certain middle market transactions
WARF does not have a tenor component
- Parameters
pool (list[clo_internal_objects.Obligor]) – pool of obligors to calculate the metric on
WARF_sp (dict) – lookup table for weighted average rating factor
- Returns
Expected pool default rate (EPDR)
- Return type
- calc_ind_div_measure(pool)¶
Computes Industry Diversity Metric
Used in the CDO Monitor calculations
Based on the Herfindahl index
- Parameters
pool (list[clo_internal_objects.Obligor]) – pool of obligors to calculate the metric on
- Returns
Industry diversity metric (IDM)
- Return type
- calc_ob_div_measure(pool)¶
Computes Obligor Diversity Metric
Used in the CDO Monitor calculations
Based on the Herfindahl index
- Parameters
pool (list[clo_internal_objects.Obligor]) – pool of obligors to calculate the metric on
- Returns
Obligor diversity metric (ODM)
- Return type
- calc_riskscore(obligors, tables)¶
Computes the weighted average DBRSM Risk Score of a pool of obligors based on a string DBRSM rating
- Parameters
obligors (list[clo_internal_objects.Obligor]) – pool of obligors to calculate the metric on
tables (dict) – dictionary of various lookup tables used in the calculation
- Returns
par weighted average DBRSM Risk Score of the pool
- Return type
- calc_riskscore_numerical_rtg(obligors, risk_score_table)¶
Computes the WA DBRSM Risk Score of a pool of obliors based on an integer DBRSM rating
- Parameters
obligors (list[clo_internal_objects.Obligor]) – pool of obligors to calculate the metric on
tables (dict) – dictionary of various lookup tables used in the calculation
- Returns
par weighted average DBRSM Risk Score of the pool
- Return type
- calc_sp_warf_dispersion(pool, exp_sp_warf, WARF_sp)¶
Computes Absolute Deviation of WA Rating Factor for a Pool via WARF
Used in Class Scenario Default Rate calcs, method B
- Parameters
pool (list[clo_internal_objects.Obligor]) – pool of obligors to calculate the metric on
exp_sp_warf (float) – Expected pool default rate (EPDR) via calc_exp_sp_warf()
WARF_sp (dict) – lookup table for weighted average rating factor
- Returns
Default rate dispersion (DRD)
- Return type