Serving the Quantitative Finance Community

 
User avatar
rleeuk
Posts: 0
Joined: December 15th, 2003, 7:13 pm

Hull & White CDO model implementation

December 9th, 2004, 10:16 am

if you are integrating over m, shouldn't you integrate from -infinity to infinity instead?
 
User avatar
Karwitz
Posts: 0
Joined: October 21st, 2004, 10:17 pm

Hull & White CDO model implementation

December 9th, 2004, 10:54 am

Yes of course you're right. M is defined as a N(0,1) random variable, taking values in [-inf, inf]. That will explain everything.My Gaussian quadrature integration procedure probably needs some tweaking as the probabilities will not take values in [0,1] unless the integration is done from 0 to 1.Everything seems so clear now that I can't believe I missed that obvious piece of the puzzle. Thanks a million for pointing that out, rleeuk.Rgds
 
User avatar
Karwitz
Posts: 0
Joined: October 21st, 2004, 10:17 pm

Hull & White CDO model implementation

December 20th, 2004, 4:35 pm

Can someone recommend any good literature to understand the maths used to come up with the probability bucketing scheme in the HW paper (i.e the second implementation approach)? Nothing in the bibliography really gives a hint. Just to clarify, I'm only interested in learning more about the iterative procedure described in Appendix B.Thanks
 
User avatar
mohamedb
Posts: 2
Joined: December 16th, 2004, 4:07 pm

Hull & White CDO model implementation

December 20th, 2004, 4:58 pm

Check outUnderstanding the Risks of Synthetic CDOsMichael S GibsonFederal Reserve July 2004 This is readily available on google or defaultrisk.comHe describes in SIMPLE terms how to implement a recursive model.BM
 
User avatar
Karwitz
Posts: 0
Joined: October 21st, 2004, 10:17 pm

Hull & White CDO model implementation

December 20th, 2004, 5:36 pm

Thanks mohamedb, but currently I'm not concerned about the actual implementation. I'm looking for hints to help me explain in detail why the procedure described in Appendix B in the HW paper leads to the total conditional loss distribution. Of course it would also be interesting to see ppls ideas about the Andersen et al's recursive algorithm and its origin. Thanks
Last edited by Karwitz on December 19th, 2004, 11:00 pm, edited 1 time in total.
 
User avatar
mohamedb
Posts: 2
Joined: December 16th, 2004, 4:07 pm

Hull & White CDO model implementation

January 4th, 2005, 1:29 pm

This may be pitched at too simple a level but I hope it helps.We want to know the probability of N losses out of K credits.It can be determined by combining the following 2 parts:(a) The probability that N-1 losses from K-1 credits occured and the addition of one credit results in its default(b) The probability the N losses already occured in K-1 credits and the addtion of one credit results in its survivali.e. the probability of N losses out of K is a recursive definition and the parts (a) and (b) are determined by repeated applications of (a) and (b).Eventually we reach the starting case of "what is the probability that there are no losses out of zero credits" which is 1 and so we break out of the recursion and arrive at the conditional probabilities of N out of K.I hope this was of some use,BM
 
User avatar
jenniferlwj
Posts: 4
Joined: February 25th, 2005, 2:35 am

Hull & White CDO model implementation

August 31st, 2005, 5:58 pm

Any help for probability bucketing for pricing CDO by Hull white?I integrate the conditional probablity of loss in bucket k, for some time t|under M. Based on this unconditional probablity, I compute the expected absorbed loss up to time T(i) as Andersen's paper. Then, DL and PL. However, my result is totally different with Monte Carlo. It seems my Default leg payout is too small because there is very low probability that loss be in the large bucket. I'm not sure which step I goes wrong. Could anyone who implements this model helps check the probablity ?I really appreciate any help and suggestions. Attached is the unconditional probablity with 100 names, homogeneous, corr = 0.3, recovery 0.4, intensity 0.03, bucket is (0,30)(30, 90), ...(5940, 6000). (total notional is 60). QuoteOriginally posted by: KarwitzI use the second implementation approach in the HW paper where the loss distribution is built up in an iterative procedure one debt instrument at a time. As simple as it seems to be to implement, I assume millions have been successful in their implementation and now feel they want to share some thoughts on it with me. I use a Monte Carlo approach to produce a simple discrete loss distribution and compare it with the loss distribution produced by my HW implementation. Unfortunately I can not make the HW implementation come anywhere close the MC distribution for smaller baskets (N<100). For the trivial case with zero correlation I do have a match but that does not give me the nobel prize.Below I will describe the implementation with focus on my interpretation on the different parameters. If anyone care to read and comment on this I will be forever grateful.Consider a CDO with N obligors, constant pairwise linear correlation of c, recovery R and probability of default p.In the expression for the probability conditional on the common market factor M i set the parameters to the followingH = the Gaussian CDFF^-1 = the inverse Gaussian CDFQ(t) = pa = sqrt(c)I set up a bucket structure covering all potential losses with small bucket size in between the attachment and detachment points and (a lot) larger outside this area. The algorithm is set up so that for each t and value of M=m in the Gaussian quadrature integration I follow the steps described in appendix B. Using the notation in the paper I setalpha_j = the conditional probability described aboveL_k = L_j = Nominal of debt instrument j * (1-R), here I assume they have a typo and that they mean L_j when they write L_k.The integration is taken from 0 to 1. After this we end up with one probability for each t and bucket, i.e. the probability that we at time t will have a loss equal to the midpoint of a certain bucket. Thanks in advance.
Attachments
prob_loss.zip
(1.06 KiB) Downloaded 56 times
 
User avatar
jenniferlwj
Posts: 4
Joined: February 25th, 2005, 2:35 am

Hull & White CDO model implementation

September 1st, 2005, 9:08 pm

Fixed a bug for my implementation of HW's scheme 2. But the bucket probaility is still far away from Andersen's. Anyone implemented HWs recursive algorithm may share your implementation or suggestions?
 
User avatar
Paka
Posts: 0
Joined: June 24th, 2003, 1:48 am

Hull & White CDO model implementation

September 7th, 2005, 11:12 am

Jennifer:Would you mind share you program by posting it on the forum?Regards,
 
User avatar
aharvey8
Posts: 1
Joined: July 4th, 2005, 8:29 pm

Hull & White CDO model implementation

September 12th, 2005, 11:54 pm

Perhaps I 'm a bit dense, but I'm having trouble finishing off the problem. I've computed all the probabilities they mention in the paper, but I'm not sure what to do with them. To clarify, I've got loss distributions for each time t across the buckets, but how to price the CDO tranche? Perhaps someone has some guidance?Cheers,
 
User avatar
jenniferlwj
Posts: 4
Joined: February 25th, 2005, 2:35 am

Hull & White CDO model implementation

September 13th, 2005, 1:05 pm

If you got the loss distribution, you almost get everything done. You may see Andersen's paper, there is details about how to deal with prob to get price of CDO tranch. Paka,My problem is I didn't get the correct loss distribution (the probability in each bucket), there must be something wrong in my implementation of bucket. If you may help, attached is code snippet. (Sorry I can't share the whole code due to some restrictions. )I'll highly appreciate if anyone may share some implementation code for that bucket iterative algorithm.
Attachments
bucket_snippet.zip
(2.14 KiB) Downloaded 50 times
 
User avatar
aharvey8
Posts: 1
Joined: July 4th, 2005, 8:29 pm

Hull & White CDO model implementation

September 15th, 2005, 8:49 pm

 
User avatar
aharvey8
Posts: 1
Joined: July 4th, 2005, 8:29 pm

Hull & White CDO model implementation

September 15th, 2005, 8:58 pm

Opps, sorry for the blank message.Jennifer, perhaps we can help each other out. I'm attaching an excel sheet that I've been working on. The answers appear to be close to the ones published in the HW paper, but I'm not satisfied that they are correct. The calculation is painfully slow, but at least it's easy to see what's going on. If anyone has any comments, I'd love to hear them!Andrew
Attachments
HW Model.zip
(1.08 MiB) Downloaded 57 times
 
User avatar
jenniferlwj
Posts: 4
Joined: February 25th, 2005, 2:35 am

Hull & White CDO model implementation

September 16th, 2005, 3:22 pm

Thank you aharvey. I looked at your code, but not in very detail. For k = 0 To (nBuckets - 1) UK = FindUK(A(k) + Lj, k, Upper, Lower) Pstar = P(k) PUKstar = P(UK) Astar = A(k) AUKstar = A(UK)Should that Pstar, PUKstar outside of the loop? That is, you'll need to store the Prob and mean before the new name is added. I'm stilling not knowing what's wrong with my code. The probablity of no default is calculated correctly. However, other prob is too small to be correct.
 
User avatar
aharvey8
Posts: 1
Joined: July 4th, 2005, 8:29 pm

Hull & White CDO model implementation

September 16th, 2005, 5:32 pm

I'll try that out and let you know what happens.Andrew