G2++ Bermudan Swaption

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

G2++ Bermudan Swaption

Zakoian2000
Sorry if this is double posting...  I just registered for the membership...

Hello. Has anybody tried to use the G2++ model in the Bermudan Swaption
example?

It works fine with HW1, HW2, and BK but the following does not work...

Handle<Model> modelG2(new G2(rhTermStructure));
swaptions.setPricingEngine(Handle<PricingEngine>(new TreeSwaption(modelG2,
grid)));
calibrateModel(modelG2, swaptions, 0.25);

bermudanSwaption.setPricingEngine(
            Handle<PricingEngine>(new TreeSwaption(modelG2, 100)));

bermudanSwaption.NPV();

What am I doing wrong? I just started C++ programming and don't have much
idea if TreeSwaption class can take 2 factor models.

Please help!

Zakoian