Hull White Calibration

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

Hull White Calibration

Jonathan Budd
I'm new to QuantLib, and recently put together some code to calibrate
the Hull White model to swaption volatilities. Everything is working
well, but I'm left wondering whether the calibration is performed on
volatilities or prices. I've read through the code in the test suite
and the source code for CalibrationHelper, and I'm almost sure that
when calibrating the Hull White model to swaption volatilities, the
CalibrationHelper minimises the distance between model and input
volatilities, rather than prices. However, I'm yet to find a
definitive answer (either in a comment or line of code).

Can anyone confirm or deny that this is the case? Save for modifying
the class, is there an easy way to set CalibrationHelper to calibrate
either way?

Best regards


jb

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Hull White Calibration

Klaus Spanderen-2
Hi Jonathan

hard to tell w/o your code. The last argument of SwaptionHelper's constructor
decides whether the calibration is carried out using

case RelativePriceError:
            error = std::fabs(marketValue() - modelValue())/marketValue();
            break;
case PriceError:
            error = marketValue() - modelValue();
            break;
case ImpliedVolError:
            ..
           error = implied - volatility_->value();

If you don't supply a CalibrationErrorType then the default
type "RelativePriceError" is used.

hope this helps,
 Klaus



On Monday 27 February 2012 23:31:28 Jonathan Budd wrote:

> I'm new to QuantLib, and recently put together some code to calibrate
> the Hull White model to swaption volatilities. Everything is working
> well, but I'm left wondering whether the calibration is performed on
> volatilities or prices. I've read through the code in the test suite
> and the source code for CalibrationHelper, and I'm almost sure that
> when calibrating the Hull White model to swaption volatilities, the
> CalibrationHelper minimises the distance between model and input
> volatilities, rather than prices. However, I'm yet to find a
> definitive answer (either in a comment or line of code).
>
> Can anyone confirm or deny that this is the case? Save for modifying
> the class, is there an easy way to set CalibrationHelper to calibrate
> either way?
>
> Best regards
>
>
> jb
>
> ---------------------------------------------------------------------------
>--- Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users



------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Hull White Calibration

Jonathan Budd
Thanks Klaus, that answers my question. I should've read
CalibrationHelper.cpp more than once.

On Tue, Feb 28, 2012 at 10:24 AM, Klaus Spanderen <[hidden email]> wrote:

> Hi Jonathan
>
> hard to tell w/o your code. The last argument of SwaptionHelper's constructor
> decides whether the calibration is carried out using
>
> case RelativePriceError:
>            error = std::fabs(marketValue() - modelValue())/marketValue();
>            break;
> case PriceError:
>            error = marketValue() - modelValue();
>            break;
> case ImpliedVolError:
>            ..
>           error = implied - volatility_->value();
>
> If you don't supply a CalibrationErrorType then the default
> type "RelativePriceError" is used.
>
> hope this helps,
>  Klaus
>
>
>
> On Monday 27 February 2012 23:31:28 Jonathan Budd wrote:
>> I'm new to QuantLib, and recently put together some code to calibrate
>> the Hull White model to swaption volatilities. Everything is working
>> well, but I'm left wondering whether the calibration is performed on
>> volatilities or prices. I've read through the code in the test suite
>> and the source code for CalibrationHelper, and I'm almost sure that
>> when calibrating the Hull White model to swaption volatilities, the
>> CalibrationHelper minimises the distance between model and input
>> volatilities, rather than prices. However, I'm yet to find a
>> definitive answer (either in a comment or line of code).
>>
>> Can anyone confirm or deny that this is the case? Save for modifying
>> the class, is there an easy way to set CalibrationHelper to calibrate
>> either way?
>>
>> Best regards
>>
>>
>> jb
>>
>> ---------------------------------------------------------------------------
>>--- Try before you buy = See our experts in action!
>> The most comprehensive online learning library for Microsoft developers
>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>> Metro Style Apps, more. Free future releases when you subscribe now!
>> http://p.sf.net/sfu/learndevnow-dev2
>> _______________________________________________
>> QuantLib-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
>

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users