What is QuantLib/ql/MarketModels - LMM?

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

What is QuantLib/ql/MarketModels - LMM?

Toyin Akin

OK,

It looks like some test cases have been coded up for the new
QuantLib/ql/MarketModels framework and this looks like another
implementation of the Libor Market Model equivalent to Klaus's where one
uses the FixedVolatilityModel class...

Does anyone know whether the two models are consistent with each other?

Klaus, have you looked at this implementation (a bit soon I know but it
would be worth getting your input on this)?

Best Regards,
Toyin Akin.




Reply | Threaded
Open this post in threaded view
|

Re: [Quantlib-dev] What is QuantLib/ql/MarketModels - LMM?

Ferdinando M. Ametrano-3
Hi all

> It looks like some test cases have been coded up for the new
> QuantLib/ql/MarketModels framework and this looks like another
> implementation of the Libor Market Model
yes it is. The coding project is led by Mark Joshi. Luigi, I and
others are involved.

> equivalent to Klaus's [...] Does anyone know whether the two models are
> consistent with each other?
They probably are. The new implementation follows Joshi and Rebonato's
approch (see The Concepts and Practice of Mathematical Finance, by
Mark S. Joshi, and Modern Pricing of Interest Rate Derivatives, by
Riccardo Rebonato)

This implementation strive for optimal efficiency, and it is not
really merged into QuantLib current design (yet). Klaus implementation
is much more QuantLib style, but suffer few efficiency problems.

Klaus knows about the project and we hope he will join us. For sure
we'll try to reuse much of his work where possible.

ciao -- Nando


Reply | Threaded
Open this post in threaded view
|

Re: [Quantlib-dev] What is QuantLib/ql/MarketModels - LMM?

Toyin Akin

Hi,

Great stuff.

I do like Klaus's framework especially since there are more volatility
models and you can calibrate various parts of the parameters (no doubt the
new framework will have these features in the future).

Concerning the new framework, can you price a 5 year cap starting in 2 years
without simulating the first 2 years of rates? Currently Klaus's framework
needs all the forwards from spot to price this contract (7 years worth) and
from the test suite, the new framework provides an example pricing from spot
also. Can the test case example be easily modified to provide starting
forward dates?

Best Regards,
Toyin Akin.

>From: "Ferdinando Ametrano" <[hidden email]>
>To: "Toyin Akin" <[hidden email]>
>CC: [hidden email], [hidden email],
>[hidden email]
>Subject: Re: [Quantlib-dev] What is QuantLib/ql/MarketModels - LMM?
>Date: Fri, 7 Jul 2006 09:33:23 +0200
>
>Hi all
>
>>It looks like some test cases have been coded up for the new
>>QuantLib/ql/MarketModels framework and this looks like another
>>implementation of the Libor Market Model
>yes it is. The coding project is led by Mark Joshi. Luigi, I and
>others are involved.
>
>>equivalent to Klaus's [...] Does anyone know whether the two models are
>>consistent with each other?
>They probably are. The new implementation follows Joshi and Rebonato's
>approch (see The Concepts and Practice of Mathematical Finance, by
>Mark S. Joshi, and Modern Pricing of Interest Rate Derivatives, by
>Riccardo Rebonato)
>
>This implementation strive for optimal efficiency, and it is not
>really merged into QuantLib current design (yet). Klaus implementation
>is much more QuantLib style, but suffer few efficiency problems.
>
>Klaus knows about the project and we hope he will join us. For sure
>we'll try to reuse much of his work where possible.
>
>ciao -- Nando




Reply | Threaded
Open this post in threaded view
|

Re: [Quantlib-dev] What is QuantLib/ql/MarketModels - LMM?

Klaus Spanderen
In reply to this post by Ferdinando M. Ametrano-3
Hi

from what I heard and what is in the CVS the scope of the MarketModels project
is much wider than the scope of the LMM code, which has some inefficiencies
and inherits some due to the "old quantlib style". Especially the separate
numeriare modelling is something I do appeiciate very much (was also on my
personal wish list for a long time).

Therefore I think the right way forward is to reuse the existing LMM code when
it makes sens (like parts of AbcdVolatility) but to remove the rest as soon
as the old code gets superseded by the new framework. Looking onto the
current momentum and the coding power of the MarketModels project this will
likely be in release 0.3.14;-)

What I personally find even more interestingly is that the new framework does
currently not use more important design issues of QL like stochastic
processes, the existing MonteCarlo & Pricing Engine approach or the given
instrument definitions. Nando, is it planed to "see" more fundamental changes
in the quantlib soon? (or will the MarketModels stuff be integrated in the
existing MonteCarlo framework, which is very much equity driven).

cheers
 Klaus

On Friday 07 July 2006 9:33 am, Ferdinando Ametrano wrote:

> Hi all
>
> > It looks like some test cases have been coded up for the new
> > QuantLib/ql/MarketModels framework and this looks like another
> > implementation of the Libor Market Model
>
> yes it is. The coding project is led by Mark Joshi. Luigi, I and
> others are involved.
>
> > equivalent to Klaus's [...] Does anyone know whether the two models are
> > consistent with each other?
>
> They probably are. The new implementation follows Joshi and Rebonato's
> approch (see The Concepts and Practice of Mathematical Finance, by
> Mark S. Joshi, and Modern Pricing of Interest Rate Derivatives, by
> Riccardo Rebonato)
>
> This implementation strive for optimal efficiency, and it is not
> really merged into QuantLib current design (yet). Klaus implementation
> is much more QuantLib style, but suffer few efficiency problems.
>
> Klaus knows about the project and we hope he will join us. For sure
> we'll try to reuse much of his work where possible.
>
> ciao -- Nando
>
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> QuantLib-dev mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev



Reply | Threaded
Open this post in threaded view
|

Re: [Quantlib-dev] What is QuantLib/ql/MarketModels - LMM?

Toyin Akin

Hi guys,

I was just scanning some of the code within the new abcdvolatility.cpp class
(marketmodel framework) and I noticed that at one point the order that the
a,b,c,d parameters are passed in are different than that of Klaus's abcd
class code dispite the fact that the formula that is finally called is the
same for both frameworks.

Basically

line #88 within the abcdvolatility.cpp file and...
line #69 within the lmlinexpvolmodel.cpp file.

The former file passes the parameters in the order of b,c,d,a and the latter
file - a,b,c,d. The same function is executed for both (code copied from
Klaus's class to the new framework).

Are we suggesting that the interpretation of the parameters are actually
different for both frameworks?

It doesn't help that the resulting function that is finally called within
the abcdvolatility.cpp file, primitive(), actually has the parameters
labeled as a,b,c,d, but what is actually passed in is b,c,d,a!!

I'm trying to determine whether I can generate similar outputs from both
models...

Either the interpretation of the parameters are different for each model, or
one is passing in the parameters in an incorrect order...

Also I do realise that the new framework is a work in progress...
Looks good though and it's pretty quick.

Toy out...




>From: Klaus Spanderen <[hidden email]>
>Reply-To: [hidden email]
>To: [hidden email], "Ferdinando Ametrano" <[hidden email]>
>CC: [hidden email],
>[hidden email]
>Subject: Re: [Quantlib-dev] What is QuantLib/ql/MarketModels - LMM?
>Date: Fri, 7 Jul 2006 23:14:23 +0200
>
>Hi
>
>from what I heard and what is in the CVS the scope of the MarketModels
>project
>is much wider than the scope of the LMM code, which has some inefficiencies
>and inherits some due to the "old quantlib style". Especially the separate
>numeriare modelling is something I do appeiciate very much (was also on my
>personal wish list for a long time).
>
>Therefore I think the right way forward is to reuse the existing LMM code
>when
>it makes sens (like parts of AbcdVolatility) but to remove the rest as soon
>as the old code gets superseded by the new framework. Looking onto the
>current momentum and the coding power of the MarketModels project this will
>likely be in release 0.3.14;-)
>
>What I personally find even more interestingly is that the new framework
>does
>currently not use more important design issues of QL like stochastic
>processes, the existing MonteCarlo & Pricing Engine approach or the given
>instrument definitions. Nando, is it planed to "see" more fundamental
>changes
>in the quantlib soon? (or will the MarketModels stuff be integrated in the
>existing MonteCarlo framework, which is very much equity driven).
>
>cheers
>  Klaus
>
>On Friday 07 July 2006 9:33 am, Ferdinando Ametrano wrote:
> > Hi all
> >
> > > It looks like some test cases have been coded up for the new
> > > QuantLib/ql/MarketModels framework and this looks like another
> > > implementation of the Libor Market Model
> >
> > yes it is. The coding project is led by Mark Joshi. Luigi, I and
> > others are involved.
> >
> > > equivalent to Klaus's [...] Does anyone know whether the two models
>are
> > > consistent with each other?
> >
> > They probably are. The new implementation follows Joshi and Rebonato's
> > approch (see The Concepts and Practice of Mathematical Finance, by
> > Mark S. Joshi, and Modern Pricing of Interest Rate Derivatives, by
> > Riccardo Rebonato)
> >
> > This implementation strive for optimal efficiency, and it is not
> > really merged into QuantLib current design (yet). Klaus implementation
> > is much more QuantLib style, but suffer few efficiency problems.
> >
> > Klaus knows about the project and we hope he will join us. For sure
> > we'll try to reuse much of his work where possible.
> >
> > ciao -- Nando
> >
> > Using Tomcat but need to do more? Need to support web services,
>security?
> > Get stuff done quickly with pre-integrated technology to make your job
> > easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
> > Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > _______________________________________________
> > QuantLib-dev mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/quantlib-dev
>




Reply | Threaded
Open this post in threaded view
|

Re: [Quantlib-dev] What is QuantLib/ql/MarketModels - LMM?

Toyin Akin

Hi all,

What is the purpose of the displacements array within the new LMM framework?

This array is passed to the ExponentialCorrelation class.
Is this an observable market quantity (like the initial rates) or does it
need to be calibrated?

Best Regards,
Toyin Akin.

>From: "Toyin Akin" <[hidden email]>
>To: [hidden email], [hidden email]
>CC: [hidden email],[hidden email]
>Subject: Re: [Quantlib-dev] What is QuantLib/ql/MarketModels - LMM?
>Date: Sat, 08 Jul 2006 16:08:35 +0100
>
>
>Hi guys,
>
>I was just scanning some of the code within the new abcdvolatility.cpp
>class
>(marketmodel framework) and I noticed that at one point the order that the
>a,b,c,d parameters are passed in are different than that of Klaus's abcd
>class code dispite the fact that the formula that is finally called is the
>same for both frameworks.
>
>Basically
>
>line #88 within the abcdvolatility.cpp file and...
>line #69 within the lmlinexpvolmodel.cpp file.
>
>The former file passes the parameters in the order of b,c,d,a and the
>latter
>file - a,b,c,d. The same function is executed for both (code copied from
>Klaus's class to the new framework).
>
>Are we suggesting that the interpretation of the parameters are actually
>different for both frameworks?
>
>It doesn't help that the resulting function that is finally called within
>the abcdvolatility.cpp file, primitive(), actually has the parameters
>labeled as a,b,c,d, but what is actually passed in is b,c,d,a!!
>
>I'm trying to determine whether I can generate similar outputs from both
>models...
>
>Either the interpretation of the parameters are different for each model,
>or
>one is passing in the parameters in an incorrect order...
>
>Also I do realise that the new framework is a work in progress...
>Looks good though and it's pretty quick.
>
>Toy out...
>
>
>
>
> >From: Klaus Spanderen <[hidden email]>
> >Reply-To: [hidden email]
> >To: [hidden email], "Ferdinando Ametrano" <[hidden email]>
> >CC: [hidden email],
> >[hidden email]
> >Subject: Re: [Quantlib-dev] What is QuantLib/ql/MarketModels - LMM?
> >Date: Fri, 7 Jul 2006 23:14:23 +0200
> >
> >Hi
> >
> >from what I heard and what is in the CVS the scope of the MarketModels
> >project
> >is much wider than the scope of the LMM code, which has some
>inefficiencies
> >and inherits some due to the "old quantlib style". Especially the
>separate
> >numeriare modelling is something I do appeiciate very much (was also on
>my
> >personal wish list for a long time).
> >
> >Therefore I think the right way forward is to reuse the existing LMM code
> >when
> >it makes sens (like parts of AbcdVolatility) but to remove the rest as
>soon
> >as the old code gets superseded by the new framework. Looking onto the
> >current momentum and the coding power of the MarketModels project this
>will
> >likely be in release 0.3.14;-)
> >
> >What I personally find even more interestingly is that the new framework
> >does
> >currently not use more important design issues of QL like stochastic
> >processes, the existing MonteCarlo & Pricing Engine approach or the given
> >instrument definitions. Nando, is it planed to "see" more fundamental
> >changes
> >in the quantlib soon? (or will the MarketModels stuff be integrated in
>the
> >existing MonteCarlo framework, which is very much equity driven).
> >
> >cheers
> >  Klaus
> >
> >On Friday 07 July 2006 9:33 am, Ferdinando Ametrano wrote:
> > > Hi all
> > >
> > > > It looks like some test cases have been coded up for the new
> > > > QuantLib/ql/MarketModels framework and this looks like another
> > > > implementation of the Libor Market Model
> > >
> > > yes it is. The coding project is led by Mark Joshi. Luigi, I and
> > > others are involved.
> > >
> > > > equivalent to Klaus's [...] Does anyone know whether the two models
> >are
> > > > consistent with each other?
> > >
> > > They probably are. The new implementation follows Joshi and Rebonato's
> > > approch (see The Concepts and Practice of Mathematical Finance, by
> > > Mark S. Joshi, and Modern Pricing of Interest Rate Derivatives, by
> > > Riccardo Rebonato)
> > >
> > > This implementation strive for optimal efficiency, and it is not
> > > really merged into QuantLib current design (yet). Klaus implementation
> > > is much more QuantLib style, but suffer few efficiency problems.
> > >
> > > Klaus knows about the project and we hope he will join us. For sure
> > > we'll try to reuse much of his work where possible.
> > >
> > > ciao -- Nando
> > >
> > > Using Tomcat but need to do more? Need to support web services,
> >security?
> > > Get stuff done quickly with pre-integrated technology to make your job
> > > easier Download IBM WebSphere Application Server v.1.0.1 based on
>Apache
> > > Geronimo
> > >
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > > _______________________________________________
> > > QuantLib-dev mailing list
> > > [hidden email]
> > > https://lists.sourceforge.net/lists/listinfo/quantlib-dev
> >
>
>
>
>Using Tomcat but need to do more? Need to support web services, security?
>Get stuff done quickly with pre-integrated technology to make your job
>easier
>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>_______________________________________________
>QuantLib-dev mailing list
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/quantlib-dev




Reply | Threaded
Open this post in threaded view
|

Re: [Quantlib-dev] What is QuantLib/ql/MarketModels - LMM?

Luigi Ballabio

On 07/08/2006 06:02:03 PM, Toyin Akin wrote:
> What is the purpose of the displacements array within the new LMM
> framework?

One might want to model lognormal displaced rates instead of lognormal  
rates. It is not an observable.

Luigi


----------------------------------------

It is better to know some of the questions than all of the answers.
-- James Thurber


Reply | Threaded
Open this post in threaded view
|

Re: [Quantlib-dev] What is QuantLib/ql/MarketModels - LMM?

Luigi Ballabio
In reply to this post by Toyin Akin

On 07/08/2006 05:08:35 PM, Toyin Akin wrote:
> I was just scanning some of the code within the new  
> abcdvolatility.cpp class (marketmodel framework) and I noticed that  
> at one point the order that the a,b,c,d parameters are passed in are  
> different than that of Klaus's abcd class code

Klaus used a Brigo-Mercurio paper, while we started coding based on  
Rebonato's book. The two references use the same formula but with the  
a,b,c,d parameters in different places---hence the permutation. At some  
point we'll uniform the notation.

Luigi


----------------------------------------

Ninety percent of everything is crap.
--- Theodore Sturgeon


Reply | Threaded
Open this post in threaded view
|

Re: [Quantlib-dev] What is QuantLib/ql/MarketModels - LMM?

Toyin Akin
In reply to this post by Luigi Ballabio

Hi Luigi, Everyone,

Another LMM question for you all...

Within the new marketmodels test examples, there is a construction of a
volatility array which is passed to the exponentialcorrelation class
constructor.

Is this array the forward rate (caplet) volatilities observed (calibrated)
from the market?

Or is this array the outcome of some function applied to the observed
(calibrated) forward rate volatilities?

I noticed within Klaus's implementation (test cases), there is a class,
LfmHullWhiteParameterization, which takes the forward rate vols and
processes the volatilities before passing them into his lmm fixedvol model.

I was wondering if the same processing needs to be done under the new
framework.

Toy out...

>From: Luigi Ballabio <[hidden email]>
>To: Toyin Akin <[hidden email]>
>CC: [hidden email],
>[hidden email],[hidden email],
>[hidden email]
>Subject: Re: [Quantlib-users] [Quantlib-dev] What is
>QuantLib/ql/MarketModels - LMM?
>Date: Mon, 10 Jul 2006 09:33:44 +0200
>
>
>On 07/08/2006 06:02:03 PM, Toyin Akin wrote:
>>What is the purpose of the displacements array within the new LMM
>>framework?
>
>One might want to model lognormal displaced rates instead of lognormal  
>rates. It is not an observable.
>
>Luigi
>
>
>----------------------------------------
>
>It is better to know some of the questions than all of the answers.
>-- James Thurber




Reply | Threaded
Open this post in threaded view
|

Re: [Quantlib-dev] What is QuantLib/ql/MarketModels - LMM?

Toyin Akin
In reply to this post by Luigi Ballabio

Hi Luigi, Everyone,

Another LMM question for you all...

Within the new marketmodels test examples, there is a construction of a
volatility array which is passed to the exponentialcorrelation class
constructor.

Is this array the forward rate (caplet) volatilities observed (calibrated)
from the market?

Or is this array the outcome of some function applied to the observed
(calibrated) forward rate volatilities?

I noticed within Klaus's implementation (test cases), there is a class,
LfmHullWhiteParameterization, which takes the forward rate vols and
processes the volatilities before passing them into his lmm fixedvol model.

I was wondering if the same processing needs to be done under the new
framework.

Toy out...

>From: Luigi Ballabio <[hidden email]>
>To: Toyin Akin <[hidden email]>
>CC: [hidden email],
>[hidden email],[hidden email],
>[hidden email]
>Subject: Re: [Quantlib-users] [Quantlib-dev] What is
>QuantLib/ql/MarketModels - LMM?
>Date: Mon, 10 Jul 2006 09:33:44 +0200
>
>
>On 07/08/2006 06:02:03 PM, Toyin Akin wrote:
>>What is the purpose of the displacements array within the new LMM
>>framework?
>
>One might want to model lognormal displaced rates instead of lognormal  
>rates. It is not an observable.
>
>Luigi
>
>
>----------------------------------------
>
>It is better to know some of the questions than all of the answers.
>-- James Thurber




Reply | Threaded
Open this post in threaded view
|

Re: [Quantlib-dev] What is QuantLib/ql/MarketModels - LMM?

Ferdinando M. Ametrano-3
In reply to this post by Klaus Spanderen
Hi all

On 7/7/06, Klaus Spanderen <[hidden email]> wrote:
> What I personally find even more interestingly is that the new framework does
> currently not use more important design issues of QL like stochastic
> processes, the existing MonteCarlo & Pricing Engine approach or the given
> instrument definitions. Nando, is it planed to "see" more fundamental changes
> in the quantlib soon? (or will the MarketModels stuff be integrated in the
> existing MonteCarlo framework, which is very much equity driven).

The new approach is actually separated from the current QuantLib
framework, in order to allow for maximum efficiency and design
flexibilty. Later it will be "merged" into the higher-level QuantLib
framework: this merge might or might not lead to QuantLib refactoring.

ciao -- Nando


Reply | Threaded
Open this post in threaded view
|

Re: [Quantlib-dev] What is QuantLib/ql/MarketModels - LMM?

Ferdinando M. Ametrano-3
In reply to this post by Toyin Akin
Hi all

> What is the purpose of the displacements array within the new LMM framework?
simulating displaced lognormal forward gets you a "natural" skew, so
displacement are used to fit an observed volatility skew.

Suggestion: if you really want to follow this development you should
get a copy of Rebonato's "Modern Pricing Of Interest Rate Derivatives"

ciao -- Nando