4.5

4.5 | 2 ratings Rate this file 6 Downloads (last 30 days) File Size: 7.19 KB File ID: #8945

Fast Computation of the Expected Tranche Loss of CDO Credit Portfolio

by Pavel Okunev

 

05 Nov 2005 (Updated 07 Nov 2005)

An algorithm for fast computation of the expected tranche loss of CDO credit portfolio.

| Watch this File

File Information
Description

The code is explained in the article P. Okunev, "A Fast Algorithm for Computing Expected Loan Portfolio Tranche Loss in the Gaussian Factor Model", LBNL-57676, 2005.

http://www-library.lbl.gov/docs/LBNL/576/76/PDF/LBNL-57676.pdf

Futher refinments of this algorithm are descibed in Okunev, Pavel, "Using Hermite Expansions for Fast and Arbitrarily Accurate Computation of the Expected Loss of a Loan Portfolio Tranche in the Gaussian Factor Model" .

http://ssrn.com/abstract=748625

This is a MATLAB code. It's relatively easy to adapt it for VBA.

ATTENTION: This code was tested and works well for portfolios of size 125. The accuracy will decrease for smaller portfolios. Higher accuracy can be achieved using the methos described in Okunev, Pavel, "Using Hermite Expansions for Fast and Arbitrarily Accurate Computation of the Expected Loss of a Loan Portfolio Tranche in the Gaussian Factor Model" .

http://ssrn.com/abstract=748625

This implements one factor Gaussian model.

[loss]=gsloss(L,w,p,a,d,N)
L = exposures,as fraction of total
portfolio, taking into account the recovery rate
Example: loan 1 is 0.01 fraction of the total portfolio, recovery rate is
 40% then L(1)=0.01*(1-0.4)
w = loading factors
 p = default probabilities
 a = attachement point
 d = detachment point
 N = number of names in the portfolio
 loss = expected tranche loss as percentage of the portfolio nominal
 expressed in basis points

 Copyright by Pavel Okunev 2005
 E-mail: pokunev@math.lbl.gov

This code is provided as is. The author provides no warranty and assumes no responsibility for any losses due to the use of this code.

You are granted permission to use this code for personal use and for academic research.
 
This code may not be used for commercial purposes without explicit permission by the author.

Permission for commercial use can be obtained by writing to pokunev@math.lbl.gov

You may make and distribute a small number of copies of this code if you include this copyright notice with the code.
  
If you distribute a modified version of this code you must include the copyright notice and conspicuously indicate that the code was modified.

We are thankful to John Weare, LBNL and UC Berkeley, for his assistance with debuging the code.

Please report bugs to: pokunev@math.lbl.gov

MATLAB release MATLAB 7 (R14)
Other requirements none
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (5)
25 Nov 2005 Ilya Gold

Superb.

30 Nov 2005 Dimitri Shvorob

Several lines of code? I am sure that derivation of the formulae is far from trivial - and is in public domain - but copyrighting the implementation seems to be somewhat of an overkill.

30 Nov 2005 Pavel Okunev

Dear Dimitri,
The copyright is a formality that people usually use. Please feel free to use the code.
-Pavel

22 Apr 2006 Reto Angliker

I find the idea of using Hermite Expansions quite interesting. It seems to me however that the calculation of the coefficients might be quite cumbersome in the case of an inhomogenous portfolio. Unfortunately there are not more details in your paper on implementation and there seems to be no code for the Hermite Expansion algorithm on the website. Otherwise great job! Regards, Reto

28 May 2006 Pavel Okunev

Dear Reto Angliker,
 Thanks for your comment. The code implementing the Hermite expansion can be found at www.creditquant.biz .The Q&A page there also provides more details on computing expansion coefficients.
Regards,
-Pavel

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
finance Pavel Okunev 22 Oct 2008 08:05:33
modeling Pavel Okunev 22 Oct 2008 08:05:33
analysis Pavel Okunev 22 Oct 2008 08:05:33
cdo Pavel Okunev 22 Oct 2008 08:05:33
credit portfolio Pavel Okunev 22 Oct 2008 08:05:33
tranche loss Pavel Okunev 22 Oct 2008 08:05:33
copula portfolio model Pavel Okunev 22 Oct 2008 08:05:33
gaussian Pavel Okunev 22 Oct 2008 08:05:33

Contact us at files@mathworks.com