Risk Latte - Simulating Default Time for Pricing CDOs

Simulating Default Time for Pricing CDOs

Rahul Bhattacharya
June 10, 2006

The notion that CDO pricing using the Gaussian Copula approach is "rocket science" or very difficult and can only be done by high flying quants with Ph.D.s is a simple myth. You are as good as your quant and can perhaps add 2 plus 2 better than him.

Here we present a simple algorithm to simulate the default time of credit events in a Monte Carlo simulation framework. This algorithm is quite simple and powerful and if used in C++ or MATLAB can produce pretty robust pricing for CDO. But even in Excel/VBA- which we all used day in and day out -this algorithm can be easily applied and CDOs can be priced.

Step 1: Generating Cholesky

A default time correlation matrix is given for the names (assets) in the portfolio. We have to generate a corresponding Cholesky matrix that performs the following decomposition: where is the Cholesky matrix, is the transpose of the Cholesky matrix and C is the correlation matrix. Writing the code for Cholesky, using the above equation in Excel/VBA is very easy and one can very easily handle 150 x 150 correlation matrix for a standard CDO or Basket CDS portfolios.

If Step 1 fails:

If the correlation matrix is nonsensical then the Cholesky matrix will fail, and Excel will not generate any Cholesky. Check the following conditions for the correlation matrix:

  • The determinant of the matrix is positive and greater than zero;

  • The matrix is invertible;

  • The Cholesky of the matrix should exist;

If these conditions are not satisfied then the correlation matrix is nonsensical and it needs to be cleaned (the procedure is explained elsewhere on this site). But if the names are not too many then manually check the correlations of the names and see if they make sense intuitively to you. Try and change those correlations that don't make sense by a very small amount and keep doing it until the Cholesky comes to life.

Step 2: Generating Correlated Random Numbers

  • Generate set of independent random numbers from a uniform distribution corresponding to assets in a basket. You can do this using Excel's library function.

  • Transform these random numbers into random normal numbers, i.e. random numbers drawn from a normal distribution. You can use the Excel's library function as well; Alternatively, you can generate random normal numbers by using a Sobol sequence of the form: . Alternatively, you can use a Box-Muller sequence to generate the random normal numbers: or where is a random number drawn from an exponential distribution and is a random number drawn from a uniform distribution. The Box-Muller algorithm can also be easily implemented in Excel.

  • Multiply the row vector of random normal numbers with the Cholesky matrix to get a set of correlated random numbers . . This involves simple matrix multiplication and can easily be done in Excel.

Set 3: Simulating Default Time

  • Take the cumulative probability of the correlated normal numbers, i.e. where the PDF is

  • Associate this probability with the survival probability and then calculate the default time. Survival probability is a simple exponential function of default time with a constant hazard rate.

  • Once this default time is estimated using the constant hazard and the cumulative probability function compare this with the deal life, which is given in the term sheet of the product. If the simulated default time is less than the deal life then the name (reference asset) has defaulted otherwise the name survives. Do this for all the reference assets in the portfolio.

  • In the event of default calculate the loss given default by taking into account the recovery rate of the assets. The calculate the total LGD

  • Repeat this process for at least 100,000 simulation runs and calculate the average LGD for all the reference assets in the basket.

After this the average LGD should be used to calculate the total loss allocation for each tranche of the CDO by using the attachment points of that tranche; the attachment points will tell you how much loss to allocate to each tranche. After this estimating the fair spread for that tranche is pretty trivial.

Any comments and queries can be sent through our web-based form.

More on Quantitative Finance >>

back to top


More from Articles

Quantitative Finance