Possible solution to the forward pricing LMM via montecarlo

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

Possible solution to the forward pricing LMM via montecarlo

Toyin Akin

Hi all,

As you may or may not know, the LMM model within QuantLib can only handle
forward rates of multiple periods from the spot date. Thus if you have a 3M
index on a floating rate leg and your pricing structure starts in 6M, 12M
etc... you are fine. If however, your structure starts in 11M, 56 days etc,
you are out of luck.

One possible (quick, but I beleive accurate) solution to this would be to
use the results returned from the discountBond() function from the LMM
Process class (via Monte-Carlo).

Bascially this function takes in the rates from a simulated path and spits
out a discount curve.

So why can't we do what we do today, which is to construct a discount curve
from this and then compute the rate that we want via interpolated discount
factors

rate = ((dcfs/dcfe) - 1 / coverage).

This would be a solution if one were using the LMM process class and
computing rates and discounts via monte-carlo. Via the LMM MODEL class is
something else...

This can be a temporary solution until this model is updated.
However, if it is believed that we should wait for a more accurate
implementation I would like to know whether there are any major flaws in
this approach (for the short term at least).

Thoughts...

Toy out.

>From: Klaus Spanderen <[hidden email]>
>Reply-To: [hidden email]
>To: "Toyin Akin" <[hidden email]>
>Subject: Re: [Quantlib-users] Calibration for the LFM parameters?
>Date: Mon, 12 Jun 2006 08:56:20 +0200
>
>Hi Toy
>
>impressive stuff, give me some time to study the spread sheets (I have to
>wait
>til tomorrow anyway as my OpenOffice can't handle them;-).
>
>The extra weights within the extended volatillity model get calibrated
>during
>the calibration procedure.
>
>If you simply construct the object and then use it the weights are constant
>at
>1.0  (If you want I can add a parameter array to the constructor to set
>these
>parameters explicitly.). They are not adjusted during the pricing.
>
>you wrote
> > (I found some logic within your new calibration class that
> > require at least N calibration instruments where N is the number of
> > parameters to be calibrated.)
>
>The levenberg marquardt algorithm based on the MINPACK implementation needs
>this.
>
>In general I'm a little bit in worry that the calibration is so sentitive
>to
>the start parameters. I added the levenberg marquardt algorithm to QL
>because
>I've thought that the LM optimization is not the sensitive. I'm definitly
>interesting in your spread sheets as they allow to play around with the
>parameters.
>
>more later
>  Klaus
>
>
>On Monday 12 June 2006 7:38 pm, you wrote:
> > Okay,
> >
> > Again, assuming my coding is correct, I've played with various values
> > within the volatility models
> > and I find that if I set the values of a,b,c and d to 0.07 before
> > calibrating, I get a pretty good fit after calibration. However the
>value
> > of the 'b' parameter is around 1.2 and 'd' close to 0. Is that pretty
>high
> > for 'b'?
> >
> > If however I set the initial a,b,c,d values close to your initial
>values, I
> > get a terrible fit. Thus it seems like you have to have pretty good
> > starting values. Do you find the same behaviour within your own tests?
> >
> > Also, one other question concerning the extended volatility model.
>Because
> > you have these extra weights within the model, are these weights
>calibrated
> > during the calibration procedure?
> >
> > If one were to simply construct the object and then use it, are the
>weights
> > constant at 1.0 or are they adjusted internally?
> >
> > If they are adjusted during the pricing and do not need to be calibrated
> > then I do not think it's a good idea to add these to the params array
> > internally as this would require more calibration instruments to aid in
>the
> > calibration (I found some logic within your new calibration class that
> > require at least N calibration instruments where N is the number of
> > parameters to be calibrated.) Thus if the LMM volatility weights are
>added
> > to this array, but do not need to be calibrated, then we need a lot of
> > instruments...
> >
> > Toy out.
> >
> > From: Klaus Spanderen <[hidden email]>
> >
> > >Reply-To: [hidden email]
> > >To: "Toyin Akin" <[hidden email]>
> > >CC: [hidden email]
> > >Subject: Re: [Quantlib-users] Calibration for the LFM parameters?
> > >Date: Sat, 10 Jun 2006 06:42:20 +0200
> > >
> > >Hi Toy,
> > >
> > >yes, I used swaptions to fix the correlation models. Please find the
> > > "const wrappers" enclosed in the attachments. Hope that works..
> > >
> > >cheers
> > >  Klaus
> > >
> > >On Wednesday 07 June 2006 11:41 pm, Toyin Akin wrote:
> > > > Hi,
> > > >
> > > > I like it, I like it a lot!!
> > > >
> > > > I do like the way that different volatility and correlation
> > >
> > >specifications
> > >
> > > > can be passed into the LFM model.
> > > >
> > > > Very nice.
> > > >
> > > > I assume that you require swaptions in order to calibrate the
> > >
> > >correlation
> > >
> > > > models...
> > > >
> > > > Toy out.
> > > >
> > > >
> > > > From: Klaus Spanderen <[hidden email]>
> > > >
> > > > >Reply-To: [hidden email]
> > > > >To: "Toyin Akin" <[hidden email]>
> > > > >CC: [hidden email]
> > > > >Subject: Re: [Quantlib-users] Calibration for the LFM parameters?
> > > > >Date: Wed, 7 Jun 2006 09:25:24 +0200
> > > > >
> > > > >Hi Toy,
> > > > >
> > > > >can be implemented soon. What do you think about a "const" wrapper
>for
> > >
> > >the
> > >
> > > > >LmVolatilityModel and LmCorrelationModel that hide the parameters
>of
> > >
> > >the
> > >
> > > > >model and therefore avoid that either the correlation model or the
> > > > >volatility
> > > > >model get calibrated?
> > > > >
> > > > >would look like
> > > > >
> > > > >boost::shared_ptr<LmVolatilityModel> constModel(
> > > > > new LmVolatilityModelConstWrapper(lmVolaModel));
> > > > >
> > > > >Klaus
> > > > >
> > > > >On Wednesday 07 June 2006 6:09 pm, you wrote:
> > > > > > Hi Klaus,
> > > > > >
> > > > > > I'm still playing with your new files.
> > > > > >
> > > > > > Should have something to report by Thursday.
> > > > > >
> > > > > > Question, is it possible to have, possibly an enumeration
>variable,
> > > > > > that indicates different calibration choices for the LFM model.
>At
> > >
> > >the
> > >
> > > > >moment,
> > > > >
> > > > > > the calibration routine will calibrate all the volatility and
> > > > >
> > > > >correlation
> > > > >
> > > > > > parameters in one go.
> > > > > >
> > > > > > It would be nice to have a method within the LFM model class
>that
> > >
> > >can
> > >
> > > > > > indicate three types of calibration :
> > > > > >
> > > > > > calibration of the volatility parameters only
> > > > > > calibration of the correlation parameters only
> > > > > > calibration of the volatility and correlation parameters (as we
> > > > > > have
> > > > >
> > > > >today)
> > > > >
> > > > > > This would be perfect for the case where you are given the
> > >
> > >volatility
> > >
> > > > > > parameters, but need to calibrate the correlation parameters.
> > > > > >
> > > > > > Thoughts...?
> > > > > > Toy out.
> > > > > >
> > > > > > From: Klaus Spanderen <[hidden email]>
> > > > > >
> > > > > > >To: "Toyin Akin" <[hidden email]>
> > > > > > >CC: [hidden email]
> > > > > > >Subject: Re: [Quantlib-users] Calibration for the LFM
>parameters?
> > > > > > >Date: Tue, 6 Jun 2006 08:20:59 -0700
> > > > > > >
> > > > > > >Hi Toy,
> > > > > > >
> > > > > > >can you do me a favour and try out the more complex
> > > > > > > parametizations enclosed
> > > > > > >in the attached tar ball? (haven't fully tested them, the tar
>ball
> > > > > > > also contains the modified test case file.),  This should
>improve
> > >
> > >the
> > >
> > > > > > > ratio values.
> > > > > > >
> > > > > > >And please send me the vols for your caplets. 0.92 is really
>low.
> > >
> > >Is
> > >
> > > > > > > it the global minimum?
> > > > > > >
> > > > > > >cheers
> > > > > > >  Klaus
> > > > > > >
> > > > > > >On Tuesday 06 June 2006 11:52, you wrote:
> > > > > > > > Hi Klaus,
> > > > > > > >
> > > > > > > > What kind of success rate are you having after calibrating
>for
> > >
> > >the
> > >
> > > > >a,
> > > > >
> > > > > > >b,c,
> > > > > > >
> > > > > > > > d and rho parameters of the LFM model?
> > > > > > > >
> > > > > > > > I'm finding that after calibrating to ITM
> > > > >
> > > > >caplets/floorlets/swaptions
> > > > >
> > > > > > >and
> > > > > > >
> > > > > > > > computing the ratio of the black (analytical) price over the
> > > > >
> > > > >calibrated
> > > > >
> > > > > > > > (LFM) price (basically using a modified version of your
>sample
> > >
> > >code
> > >
> > > > > > >within
> > > > > > >
> > > > > > > > the test directory), I get ratio values of 0.92 or less for
>the
> > > > > > > > caplets. Worst still for swaptions
> > > > > > > >
> > > > > > > > Are you finding the same ratio values or do you suspect I've
> > >
> > >done
> > >
> > > > > > >something
> > > > > > >
> > > > > > > > wrong?
> > > > > > > >
> > > > > > > > Best Regards,
> > > > > > > > Toy out.
> > > > > > >
> > > > > > >--
> > > > > > >_______________________________________________________
> > > > > > >Klaus Spanderen
> > > > > > >Hubertustal 13f
> > > > > > >48734 Reken (Germany)
> > > > > > >Email: [hidden email]
> > > > > > >(remove NOSPAM from the address)
> > > > > > >http://www.spanderen.de
> > > > > > >
> > > > > > >
> > > > > > ><< lfm.tgz >>
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >_______________________________________________
> > > > > > >QuantLib-users mailing list
> > > > > > >[hidden email]
> > > > > > >https://lists.sourceforge.net/lists/listinfo/quantlib-users
> > > >
> > > > _______________________________________________
> > > > QuantLib-users mailing list
> > > > [hidden email]
> > > > https://lists.sourceforge.net/lists/listinfo/quantlib-users
> > >
> > ><< lmconstwrappervolmodel.hpp >>
> > >
> > >
> > ><< lmconstwrappercorrmodel.hpp >>
> > >
> > >
> > >
> > >
> > >_______________________________________________
> > >QuantLib-users mailing list
> > >[hidden email]
> > >https://lists.sourceforge.net/lists/listinfo/quantlib-users
>