All New Wilmott Jobs Board                     (r)

Forum Navigation:

magazine

FORUMS > General Forum < refresh >
Topic Title: Help on calibrating the G2++ Model against swaption prices
Created On Fri Nov 23, 07 10:54 AM
Topic View:

View thread in raw text format


bademeister
Junior Member

Posts: 2
Joined: Nov 2007

Fri Nov 23, 07 10:54 AM
User is offline

Dear all,

I know that something like this has been on the forum before, but it didn't solve my problem (the thread leaves of when the poster apparently solved his problem). I am trying to calibrate the G2++ model parameters to swaption prices as described in Brigo and Mercurio (2nd edition pg 158). I use the swaption formula they describe to compute swaption prices and try to fit the parameters to match a number of market observed swaption prices.

The calculation of the swaption price involves numerically solving an integral. The integrant, in return, involves numerically finding a root to an equation. I compute the root of the equation using Matlab's fsolve and the numerical integration with Matlab's quad or quadl procedures (quad (using a adaptive Simpson quadrature, about 100 function evaluations) and quadl (using adaptive Gauss/Lobatto quadrature, about 280 function evaluations, thus slower)). This, as one might expect, is pretty slow, taking a little more than 2.5 seconds to calculate the price of a swaption.

I then try to fit the parameters to a number of swaption prices (originally 70 but have reduced to 9 without convergence in acceptable time) using the Matlab minimizer lsqnonlin.

My questions on this are threefold:
1. As the calculation of the swaption price and the evaluation of the integrand seems critical, are there any ways to speed this up in Matlab? What would you consider acceptable evaluation times for the price of a swaption?
2. Are there better ways of numerically computing the integral? I read something on the forum about using Gauss-Legendre polynomials to compute it, but am unsure of how that would work.
3. Is the optimization algorithm (lsqnonlin) the right approach? I have also read on the forum about using a simulated annealing algorithm, is that a better approach?

Any practical input on this would be highly apreciated. I am also aware that Matlab may not be the best option to do this, but am a little reluctant to implement all of its neat functions myself.
Thank you very much in advance
B

Edited: Fri Nov 23, 07 at 10:57 AM by bademeister
 
Reply
   
Quote
   
Top
   
Bottom
     



GM
Member

Posts: 106
Joined: Aug 2002

Fri Nov 23, 07 01:29 PM
User is offline

Hi

Gauss-legendre is easy enough to implement, you just need x-values (abscissas) and weights, evaluate the integral at these points, weight them and the answer magically pops out. 2.5s per swaption is too slow for calibration.

You can get the weights at
http://www.efunda.com/math/num_integration/findgausslegendre.cfm
Even using 10 points is accurate, 20 is better.

For the root of the equation use any gradiant method.

I can't tell you much about Matlab, but the optimisation itself is non-trivial, to put it mildly. Convergence anywhere close to a global maximum is difficult to achieve. Also you'll probably get different parameters from swaption prices compared to caplet + swaption prices.

Good luck!
 
Reply
   
Quote
   
Top
   
Bottom
     



gjk77
Member

Posts: 54
Joined: Oct 2005

Fri Nov 23, 07 03:50 PM
User is offline

to speed up the pricing of european swaptions you could look at approximating the dynamics of the swap rate under the swap measure, for example using time zero values of so-called 'low variance martingales' yields an approximate normal vol for the swaption. This is a little like some approximations used in BGM models. There is a recent article which discusses this idea, although I'm not sure they explicitly mention g2++.

Schrager and Pelsser, "Pricing Swaptions and Coupons Bond options in Affine term structure models", Math Finance 16(4), 2006.
 
Reply
   
Quote
   
Top
   
Bottom
     



andruu
Junior Member

Posts: 10
Joined: Nov 2007

Thu Jan 24, 08 03:18 PM
User is offline

Hello

I'm also working with pricing swaption with G2++ in matlab. I have a set of model parameters and yield curve but i don't know if the price a correct since I don't have anything to compare with.

bademeister or someone else, is it possible to get a set of parameters and the price so that I can compare with my code.

Thank you in advance

 
Reply
   
Quote
   
Top
   
Bottom
     

View thread in raw text format
FORUMS > General Forum < refresh >

Forum Navigation:

© All material, including contents and design, copyright Wilmott Electronic Media Limited - FuseTalk 4.01 © 1999-2014 FuseTalk Inc. Terms & Conditions