Hi Joe,
On Wed, 2009-04-29 at 04:10 -0700, lowlyworm wrote:
> I'm trying to reproduce some calculations from Brigo and Mercurio book
> interest rate models - theory and practice 2nd edition. particularly the
> g2++ model in chapter 4. I'm using the BermudaSwaption example and have
> modified the data but am not understanding how to change from the
> FlatForward YieldTermStructure to a non-FlatForward yield term structure
> (using values from Fig 1.1) so i can reproduce their results.
instead of FlatForward, you can use (for instance) InterpolatedZeroCurve
and feed it the zero rates and the kind of interpolation you want to
use. It's missing the feature of using simple rates up to one year and
compounded rates afterwards, so you'll have to convert all rates to a
uniform compounding. Apart from that, you can just replace FlatForward,
as in, e.g.,
Handle<YieldTermStructure> rhTermStructure(
boost::shared_ptr<InterpolatedZeroCurve<Linear> >(
new InterpolatedZeroCurve<Linear>(...)));
Hope it helps,
Luigi
--
For every problem there is one solution which is simple, neat, and
wrong.
-- H. L. Mencken
|