2

Background

Financial institutions use Probability of Default (PD) models for purposes such as client acceptance, provisioning and regulatory capital calculation as required by the Basel accords and the European Capital requirements regulation and directive (CRR/CRD IV). A PD model is supposed to calculate the probability that a client defaults on its obligations within a one year horizon.

Backtests

To test whether a model is performing as expected so-called backtests are performed. One such a backtest would be to calculate how likely it is to find the actual number of defaults at or beyond the actual deviation from the expected value (the sum of the client PD values). If this probability turns out to be below a certain threshold the model will be rejected. For this procedure one would need the CDF of the distribution of the sum of n Bernoulli experiments,each with an individual, potentially unique PD.

The Question

Does Python have a built-in distribution that describes the sum of a number of Bernoulli draws each with its own probability?

Addendum

Since many financial institutions divide their portfolios in buckets in which clients have identical PDs, can we optimize the calculation for this situation?

Note: This question has been asked on mathematica stack exchange and answer has been provided for the same. I need to get the answer in python code. Here is the link to the mathematica solution: https://mathematica.stackexchange.com/questions/131347/backtesting-a-probability-of-default-pd-model

kali
  • 21
  • 1

0 Answers0