|
From: Luigi B. <lui...@gm...> - 2011-09-13 14:24:22
|
On Sun, 2011-08-21 at 21:17 +0200, SK A wrote: > I am planning to implement a lattice in QuantLib that can cope with > different discounting and forwarding curves. [...] I think that the > curicial point is to separate the rollback method on the payoffs (i.e. > DiscretizedSwap and DiscretizedSwaption objects) and on the > DiscretizedBond object. In the first one discounting will be done > with Eonia and in the second one with Euribor (in order to calculate > the Euribor forwards). > > My plan is to implement a new class in numericalmethod.hpp, called > TwoCurveTreeLattice that has two rollback and respectivley two > partialRollback methods, calling two different stepback methods with > corresponding discountings It could become a mess very quickly. How about passing two lattices to the DiscretizedSwaption instead? The swaption would roll itself and the DiscretizedSwap on the Eonia lattice, and the DiscretizedBond on the Euribor lattice. You'll have to take care that the two lattices have the same nodes, of course, so you'll have to use a model where they don't depend on the underlying curve; but that's a problem you'd have with the two-curve lattice too. This way, you wouldn't have to modify the Lattice class. Luigi -- Quote me as saying I was misquoted. -- Groucho Marx |