0
$\begingroup$

Good morning,

I am trying to link the volatility surface to my swaption pricing engine.

swaptionVolMatrix = ql.SwaptionVolatilityMatrix(calendar, rollConvention, optionTenors, swapTenors, ql.Matrix(normal_vols),dayCountConvention, False, ql.Normal)
#Matrix is a 8x6 shape

swaptionVolHandle = ql.SwaptionVolatilityStructureHandle(swaptionVolMatrix)
swaptionVolHandle.enableExtrapolation()

I get the following error:

RuntimeError: BlackSwaptionEngine requires (shifted) lognormal input volatility here:

blackEngine = ql.BlackSwaptionEngine(discountingTermStructure, swaptionVolHandle)

I have tried to follow this from the documentation: enter image description here

Do I need to extrapolate manually first then? And insert just the quote value?

Thanks in advance!

$\endgroup$
2
  • $\begingroup$ The error message says that the Black surface requires lognormal vols. You provide the argument ql.Normal when setting up SwaptionVolatilityMatrix. I think you simply need to change accordingly. $\endgroup$ Nov 11, 2021 at 9:32
  • $\begingroup$ … and you must provide lognormal vols, of course $\endgroup$ Nov 11, 2021 at 9:53

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.