Serving the Quantitative Finance Community

 
User avatar
Shagbag
Topic Author
Posts: 0
Joined: February 5th, 2008, 2:30 pm

Broadie and Glasserman's Stochastic Mesh: Example Code?

August 27th, 2008, 5:30 am

I'm having difficulty coding the abovecaptioned monte carlo method for American options. In particular, the weighting scheme. Does anyone have any example code I could look at? Or can they explain to me how to code the weights for a multivariate lognormal process? Kind regards.
 
User avatar
AvH
Posts: 0
Joined: March 3rd, 2008, 11:45 am

Broadie and Glasserman's Stochastic Mesh: Example Code?

September 4th, 2008, 1:43 pm

say you have three nodes at the first time: A1, B1 and C1 which go over in the nodes A2, B2, and C2.Then define the transition probabilities of going from node A1->A2 as p(A1,A2).Say A1 is two-dimensional A1 = (x1,y1), A2 = (x2,y2), then p(A1,A2) = P[ (X2,Y2) = (x2,y2) | (X1,Y1) = (x1,y1) ] ('Bivariate normal pdf.')Then given that we are at node A1, we have w(A1,A2) = p(A1,A2) / ( p(A1,A2) + p(B1,A2) + p(C1,A2) ),which reads as the transition probability, normalized by the total probability into a node.Hence the total weight into a node should sum up to one.Hope I am correct with above formulas (been a small while ago), however I would advice you to definitely read Glasserman's book, in which this all is explained in full detail.