0
$\begingroup$

Does anyone know if it is possible to evaluate swaptions with negative interest rates with Quantlib?

    blackEngine = ql.BlackSwaptionEngine(discountingTermStructure, ql.QuoteHandle(ql.SimpleQuote(vol)))
    swaption.setPricingEngine(blackEngine)
    swaptionnpv = swaption.NPV()

My vol value is an interpolated value from a volatility matrix which is equal to 0.34.

RuntimeError: forward + displacement (-0.00128788 + 0) must be positive

Thanks in advance

$\endgroup$
4
  • $\begingroup$ Hi and welcome. Would you please add more details to your question, esp. the software (I guess it's QuantLib?) and the calling code? A pure guess: You use lognormal vols with negative rates? $\endgroup$ Nov 12 '21 at 9:17
  • 1
    $\begingroup$ Edited, thank you. $\endgroup$ Nov 12 '21 at 9:44
  • $\begingroup$ It's customary to use the bachelier normal model because the lognormal assumption of Black doesn't allow for negative values. $\endgroup$
    – AKdemy
    Nov 12 '21 at 12:02
  • $\begingroup$ Thank you very much! $\endgroup$ Nov 12 '21 at 12:17
3
$\begingroup$

Here is an example on pricing the the Bachelier model (Normal vols):

import QuantLib as ql

yts = ql.YieldTermStructureHandle(ql.FlatForward(2, ql.TARGET(), 0.05, ql.Actual360()))

calendar = ql.TARGET()
today = ql.Date().todaysDate()
exerciseDate = calendar.advance(today, ql.Period('5y'))
exercise = ql.EuropeanExercise(exerciseDate)
swap = ql.MakeVanillaSwap(ql.Period('5y'), ql.Euribor6M(yts), 0.05, ql.Period('5y'))
swaption = ql.Swaption(swap, exercise)


bachelierEngine = ql.BachelierSwaptionEngine(yts, ql.QuoteHandle(ql.SimpleQuote(0.0055)))
swaption.setPricingEngine(bachelierEngine)
swaption.NPV()
$\endgroup$

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.