CDO
From ThetaWiki
Description
Collateralized Debt Obligations (CDOs) are a type of asset-backed security or structured finance product. In a CDO a portfolio of bonds, loans or other fixed income securities is gathered and used to create a new set of fixed-income securities.
This allows the use of a technique called "credit tranching" by which losses from the portfolio are repackaged. A CDO might typically issue four classes of securities designated as senior debt, mezzanine debt, subordinate debt, and equity. Any losses from the portfolio of investments are applied to the latter classes of debt before being applied to earlier ones. As a result, a range of products are created ranging from risky equity debt to relatively riskless senior debt.
ThetaScript
%% CDO model following the Vasicek Model %% Price of first 30% (equity) tranche model CDO import S "Stock Price" import EUR "Numeraire" import B "Barrier for default" import F "payment" import T "maturity" export P "CDO value" export sum "Sum" export C "defaults" export perc "Accumulated defaults" P = V! sum=0 C = 0; loop T*4 Theta 1/4 loop s,c : S,C % knock-out asset if price < barrier if s < B c = 1 end end % compute percentage of surviving assets perc=sum(C,2)/length(S) % compute payments for 30% equity tranche sum=sum + (max(0.3-perc,0) * F ) * EUR ; end V = sum end
Note that this CDO requires a multi-dimensional asset price process like Geometric Brownian Motion#N-Dimensional
