Re: QuantLib-users Digest, Vol 30, Issue 3

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

Re: QuantLib-users Digest, Vol 30, Issue 3

luca ferraro-2
Lothar wrote:
 > Hey Luca,
 >
> I have pretty much the same problem as you: I also want to setup a QL
>  LMM calibration and started to reconstruct the implementations in
> "libormarketmodel.cpp" of the testsuite.

I suspended my previous study of the QL LMM implementation, due to other
activities. I'm now again on it, hoping to improve my understanding
... which didn't get so far, honestly.

I have been using the "legacy" LMM implementation, following the example
in test-suite/libormarketmodel.cpp

There is a brand "new" implementation which I'm starting to study,
following the example in test-suite/marketmodel.cpp This is the
framework Mark Joshi will present in his course for MoneyScience in London.


Using the legacy framework, I wrote a simple program that takes real
market-data (zero-curve, cap and swaption volatilities) and try to
calibrate the LFM to some caps and swaptions and reproduce the price of
a simple 2x8 european-swaption.
(so, I am in the case where BOTH forward vols AND correlation matrix
parameters should be calibrated to market data, I'm not relying on any
exogenously provided correlation matrix, built for example from
historical correlations).

I've tried different combinations using different vol and corr models,
considering just caps, just swaptions, both caps and swaptions, caps and
co-terminal swaptions, caps and upper left vol matrix inside co-terminal
swaptions ... but I didn't get a good calibration (meaning that in my
best case, last forwards volatility curves are not so smooth and
correlation matrix is essentially flat).

[SNIP]
> The market provides quoted ATM Cap volatilities e.g. starting from 2Y
>  tenor up to 5 years.
> The market provides quoted ATM Cap volatilities e.g. starting from 2Y tenor
> up to 5 years. I'm wondering now how to get the corresponding caplet
> volatilities for the above calibration? Is there any stripping algorithm in
> QL to recover the caplet volatilities from the market quoted cap
> volatilities?
[SNIP]
> It seems to me that the CapHelper doesn't provide such an algorithm
> and expects to get cap ATM volatilities and not caplet volatilities
> as an input. Or am I wrong?

 From my understanding (confirmed by an help from Klaus Spanderen), you
don't need caplet vols for calibration, but you can directly use
CapHelper to describe ATM CAPS and use them in the calibration process.

Anyway, to extrapolate caplet vols there is the class
ql/termstructures/volatility/optionlet/capletvariancecurve.hpp
but it is DEPRECATED. They suggest to refer to the
StrippedOptionletAdapter and the StrippedOptionlet, but I didn't try it yet.

> Luca, did you find answers or solutions to your questions?

Nobody answer my previous questions, anyway I report what I found
(maybe it is totally wrong):

> Suppose I want to price a 1x4 vanilla european swaption (1Y frequency
>  for the fixed leg, 6M for the floating EURIBOR 6M index) ... [SNIP]
> Now I need 8 instantaneous volatilities \sigma_{T_i} to be
> calibrated, using at least 8 caplet vols, related to the following
> atm caplets: Caplet1(T_{1Y},T_{1Y6M}) , Caplet2(T_{1Y6M}, T_{2Y}),
> ... , Caplet8(T_{4Y6M}, T_{5Y}). Market provides me 1 year tenor ATM
> CAPs vols.
First "mistake", I can use/evolve 6M index, but I can use 1Y index as
well because if you write down the forward swaption rate expression,
numerator is just a difference between first and last zero-coupon bond
(no dependence on the underlying floating leg payment frequency), while
the denominator is a sum of zero-coupon bond with accrual times that
depend on the fixed leg tenor (so 1Y is OK)

> 1) Which CapHelpers do QL need? I would provide market quoted ATM
> CAPS starting from 2Y tenor up to 5 years, is it enough/correct in
> current QL LMM framework? 2) Do I have to provide CAPS with the same
> tenor of the underlying LMM index? (ATM CAPS quotes are tipically 1Y
> based, while in my example I use a EURIBOR 6M index for the LMM
> process).

You can use CapHelper with a tenor compatible to the forward you want to
evolve (so you cannot use for example a 3Y6M length cap if you evolve a
1Y index forward rate), and CAPs' lengths should be between the first
and last forward you want to evolve. Within these constraints, you can
use as many CAPs you want, taking in mind that each CapHelper will be a
point to be calibrated in your minimization space (if you provide 1Y and
a 4Y CapHelper, no other point is automatically extrapolated and used
between them). So, choosing the most parametrized models for vols and
correlations, you need at least 4+2+n Helpers (n+4 from vols, 2 from
corr, where n is the number of forwards you want to evolve)

> 3) What if I have "holes" between available market atm caps quotes
> (tipically between 10Y and 30Y): how do I extrapolate atm cap vol
> from market data?
To extrapolate ATM CAP vols you can use the CapFloorTermVolCurve class
ql/termstructures/volatility/capfloor/capfloortermvolcurve.hpp
The same can be done for Swaption vols using the class
ql/termstructures/volatility/swaption/swaptionvolstructure.hpp


Hope this helps, in case, contact me by mail.

Cheers,

luca

--
   Luca Ferraro
   Gruppo Scienze dei Materiali
   CASPUR (Consorzio per le Applicazioni di
   Supercalcolo Per Università e Ricerca)
   Via dei Tizii, 6b - 00185 ROMA
   Tel. +39-06-44486717
   Fax: +39-06-4957083
   cell: +39-339-7879898
   Email: [hidden email]
   Web: http://www.caspur.it

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users