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
  • class_bdr (float) – Result of calc_class_bdr()

  • rvst_target_par (float) – Reinvestment target par as per the transaction documents

  • coll_prin_amt (float) – Aggregate principal amount of the current portfolio

  • warr (float) – Weighted average recovery rate for the current portfolio

Returns

Class Adjusted BDR

Return type

float

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

tuple

calc_asset_side_A(pool, wal, coefs)

Calls each pool metric required for the CDO Monitor SDR (for IDT PD approach)

Parameters
Returns

Class SDR, diagnostics dictionary

Return type

tuple

calc_asset_side_B(pool, wal, coefs, WARF_sp)

Calls each pool metric required for the CDO Monitor SDR (for WARF approach)

Parameters
  • 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

tuple

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

Parameters
  • was (float) – Weighted average spread for the current portfolio

  • warr (float) – Weighted average recovery rate for the current portfolio

  • coef (list[float]) – coefficients for the CDO Monitor BDR formula (transaction specific)

Returns

Class BDR

Return type

float

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

float

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

float

calc_credit_dispersion(obligors, risk_score_table)

calculates the rating disperison of a pool from a list of obligor objects.

Parameters
  • obligors (dict[dataclasses]) – list of obligors

  • risk_score_table (dict) – rating score table

Returns

rating dispersion of the pool

Return type

float

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
Returns

Default rate dispersion (DRD)

Return type

float

calc_dscore(obligors, tables)

Computes the Diversity Score of a pool of obligors based on the DBRSM Industry classification

Parameters
Returns

Diversity Score of the pool

Return type

float

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

float

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
Returns

Expected pool default rate (EPDR)

Return type

float

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

float

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

float

calc_riskscore(obligors, tables)

Computes the weighted average DBRSM Risk Score of a pool of obligors based on a string DBRSM rating

Parameters
Returns

par weighted average DBRSM Risk Score of the pool

Return type

float

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
Returns

par weighted average DBRSM Risk Score of the pool

Return type

float

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

float