# Fast Computation of the Expected Tranche Loss 1.0

OS : Windows / Linux / Mac OS / BSD / Solaris
Script Licensing : Free for non-commercial purposes.
Created : Aug 14, 2007
Thank you for voting...

## The code is explained in the article P. Okunev, "A ...

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
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" .
This is a MATLAB code. It's relatively easy to adapt it for VBA.
ATTENTION: This code was tested and works well for portfolio 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".
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)
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