3
$\begingroup$

I am using the SwaptionHelper class to create the swaptions.

Reading the documentation: https://www.quantlib.org/reference/class_quant_lib_1_1_swaption_helper.html

I realize that one of the parameters required to provide is called BlackCalibrationHelper. However, I am using Normal volatility for the calibration.

I think it is also not possible to just omit the parameter.

Could anyone advise the parameter to provide in this case? The example online used CalibrationHelper which is deprecated in v1.16.

$\endgroup$
2
$\begingroup$

The SwaptionHelper class inherits from BlackCalibrationHelper class: https://www.quantlib.org/reference/class_quant_lib_1_1_black_calibration_helper.html As a result, one of its attributes is volatilityType which can be normal or lognormal or shifted lognormal.

You can see it in the first constructor in the link you sent:

SwaptionHelper (
   const Period &maturity, const Period &length,
   const Handle< Quote > &volatility,
   const ext::shared_ptr< IborIndex > &index,
   const Period &fixedLegTenor,
   const DayCounter &fixedLegDayCounter,
   const DayCounter &floatingLegDayCounter,
   const Handle< YieldTermStructure > &termStructure,
   BlackCalibrationHelper::CalibrationErrorType errorType=BlackCalibrationHelper::RelativePriceError,
   const Real strike=Null< Real >(), const Real nominal=1.0,
   const VolatilityType type=ShiftedLognormal, const Real shift=0.0)

As you can see, by default it is ShiftedLognormal, but you can set it to Normal when instanciating your swaption helper.

| improve this answer | |
$\endgroup$
  • $\begingroup$ thanks, I have seen that, I guess my question was more around the blackcalibrationhelper class. are we using blackcalibrationhelper class even though we are using normal vol to construct the swaption? $\endgroup$ – hao Nov 20 '19 at 13:19
  • $\begingroup$ The answer is yes, SwaptionHelper is a subclass of BlackCalibrationHelper (which handles the three vol types). $\endgroup$ – byouness Nov 20 '19 at 14:41
  • $\begingroup$ The CapHelper doesn't accept Volatility type, does it? Is it not possible to calibrate to caps with normal vols as input? $\endgroup$ – David Duarte Dec 20 '19 at 11:52
  • $\begingroup$ It seems that's not the case: github.com/lballabio/QuantLib/blob/… However, I'd recommend to ask the question on QuantLib's mailing list. I also stumbled upon this case github.com/lballabio/quantlib/issues/38 it is closed but is seems only the shiftedLognormal case was done. $\endgroup$ – byouness Dec 20 '19 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.