model_clo_insight.app module

Module for the Methods to be Hosted as RESTful APIs

  • Can be accessed as RESTful APIs with web-based clients such as Jupyter Notebooks or Javascript UIs

  • Can be accessed locally via XL Wings

_step_5_final_results_mode_1_2(deal, inputs)

Performs the final aggregation of trading scenario results from 4a (cashflow BDRs, pasted in from Proprietary Cashflow Engine) and the Predictive Model simulation results matrix. The cushion per scenario is calculated, and a summary matrix computed. This is the final step in the analysis.

For modes 1 & 2, we use the Scenario Matrix (generated in step 3) as the base matrix for merging in all the results

Parameters
Return type

OutputStep5

Returns

details in model_clo_insight.clo_external_data_contracts.OutputStep5

General Steps

  1. Build tranche and scenario dataframes

  2. Determine default hurdle rates for each tranche

  3. Build dataframe of break evens (BDRs) that were pasted in from Proprietary Cashflow Engine

  4. Determine governing BDRs per tranche per scenario (min for AAA, avg for the rest)

  5. Compute cushion (BDR - default hurdle rate)

  6. Filter scenarios by the user ‘is_on’ choice

  7. Compute stats and summary results table

  8. Setup output dataclass structure

_step_5_final_results_mode_3(deal, inputs)

Performs the final aggregation of trading scenario results from 4a (cashflow BDRs, pasted in from Proprietary Cashflow Engine) and the Predictive Model simulation results matrix. The cushion per scenario is calculated, and a summary matrix computed. This is the final step in the analysis.

For Mode 3, we use the deal matrix as the base matrix for merging in all the results

Parameters
Return type

OutputStep5

Returns

details in model_clo_insight.clo_external_data_contracts.OutputStep5

General Steps

  1. Build tranche and deal matrix dataframes

  2. Build scenario dataframe

  3. Map default hurdle rates from scenario matrix -> deal matrix

  4. Determine default hurdle rates for each tranche

  5. Build dataframe of break evens (BDRs) that were pasted in from Proprietary Cashflow Engine

  6. Determine governing BDRs per tranche per scenario (min for AAA, avg for the rest)

  7. Compute cushion (BDR - default hurdle rate)

  8. Compute stats and summary results table

  9. Setup output dataclass structure

step_1_parse_pool(deal, indicative_pool, overrides=None)

Ingests the transaction structure and indicative portfolio. Computes key metrics on the indicative portfolio. Loads in assumption tables from methodology reference. Note that outputs from this step are used in multiple subsequent steps

Parameters
  • deal (CLOTransaction) – transaction capital structure and key terms like deal.trading_scenario_mode

  • indicative_pool (List[CLOPoolRow]) – portfolio data (loan tape)

  • overrides (Optional[Dict]) – optional input to override methodology parameters

Return type

OutputStep1

Returns

pool metrics, modeling pool, and recommended values for trading scenarios

General Steps

  1. Indicative portfolio: Mapped data

  2. Indicative portfolio: Derived data (computed values)

  3. Compute pool metrics

  4. Compute portfolio strats

  5. Build replines - Indicative Portfolio

  6. Build replines - Trading scenario recommendations

  7. Compute trading scenario recommended parameters

  8. Rounding and date cleanup

  9. Setup output dataclass structure

step_2_run_indicative_pool(deal, inputs, overrides=None)

Ingests the indicative portfolio and cutpoint tenors. Runs the core Predictive Model algorithm to generate the cumulative default distribution & compute percentiles -> hurdle rates

Parameters
Return type

OutputStep2

Returns

details in model_clo_insight.clo_external_data_contracts.OutputStep2

General Steps

  1. Create internal CLO objects (obligors, loans, transaction, settings, meth params)

  2. Setup object references

  3. Run simulation to generate time-to-default (ttd) matrix

  4. Loop through each rating-based amortization schedule to compute default hurdle rates and diagnostic statistics (this is how prepayment assumptions are implemented)

  5. Create tranche results dataframe

  6. Setup output dataclass structure

step_3_build_trading_scenarios(deal, inputs, overrides=None)

Builds out trading scenarios as per new methodology approach. Runs hypo pool on each to infer WARF/risk score, but do not run simulation algo.

Recommended inputs in this step are displayed to the Analyst as Step 1 output, but the analyst may choose to use the recommendend values or override the recommended values using the choice values. If analyst chooses to override recommendend values, they must include a rationale in the comment fields.

Parameters
Return type

OutputStep3

Returns

details in model_clo_insight.clo_external_data_contracts.OutputStep3

General Steps

  1. If mode 3, map deal matrix to modeling matrix (row for row) and create dataframe

  2. If mode 1 or 2, create dataframe for investment grade scenarios

  3. If mode 1 or 2, create dataframe for AAA scenarios

  4. Setup hypo pool parameters and lookup tables

  5. Main loop:

    1. Solve for industry/obligor concentration limitations s.t. target Dscore is realized

    2. If mode 1, solve for rating mixture s.t. BDR ~ SDR (e.g. the CDO Monitor test), For Mode 2 and 3, the respective deal matrices are used.

    3. Build a row for the results, and the diagnostics

  6. Build results and diagnostics dataframes

  7. Setup output dataclass structure

step_4a_generate_cf_scenarios(deal, inputs, overrides=None)

This step is used to build out the cash flow matrix for the trading scenarios. It is designed to be used in Proprietary Cashflow Engine out-of-the-box, but may also be used in Intex with some modifications. The scenarios are built around the unique combinations of WAS and seniority/WARR that arise from the trading scenarios.

Parameters
Return type

OutputStep4a

Returns

details in model_clo_insight.clo_external_data_contracts.OutputStep4a

General Steps

  1. If mode 3:

    1. Determine unique WAS

    2. Determine unique WARR and create an integer ID

    3. Determine repline balances s.t. target WARR is met for all unique WARR keys

  2. If mode 1, 2:

    1. Create filtered scenario dataframe based on analyst ‘is_on’ choice

    2. Create integer keys for seniority

  3. Create integer keys for WAS

  4. Use numpy operations to create scenario matrix

  5. Setup output dataclass structure

step_4b_run_trading_scenarios(deal, inputs, overrides=None)

This method runs the trading scenario matrix through the Predictive Model simulation. The hypo pools are re-generated identical to step 3, and the resulting pools run through the simulation.

Parameters
Return type

OutputStep4b

Returns

details in model_clo_insight.clo_external_data_contracts.OutputStep4b

General Steps

  1. Setup scenario dataframe and filter out based on user ‘is_on’ choice

  2. Setup hypo pool parameters and lookup tables

  3. Create internal CLO objects (transaction, settings, meth params)

  4. Setup amortization matrix

  5. Main execution loop:

    1. Solve for industry/obligor concentration limitations s.t. target Dscore is realized

    2. If mode 1, solve for rating mixture s.t. BDR ~ SDR (e.g. the CDO Monitor test). For mode 2 and 3, use hypo_pool.HypoResultMonitor to generate results using matrices.

    3. Create lists of Obligor and Loan objects from the hypo pool

    4. Run simulation to generate time-to-default (ttd) matrix

    5. Loop through each rating-based amortization schedule to compute default hurdle rates and diagnostic statistics (this is how prepayment assumptions are implemented)

  6. Create results and diagnostics dataframes

  7. setup output dataclass structure

step_5_final_results(deal, inputs, overrides=None)

Wrapper for the final aggregation method. The logic is quite different for modes 1, 2 vs 3. There are 2 internal methods below that handle each of these paths:

Parameters
Return type

OutputStep5

Returns

details in model_clo_insight.clo_external_data_contracts.OutputStep5