Hello Bjorn,sorry for the late answer. I didn't have much time to give to the mailing list this month.The normal and displaced lognormal model are not available in the current release of the Python bindings, but Peter Caspers just opened a pull request that adds them. You can find it at <https://github.com/lballabio/QuantLib-SWIG/pull/32 >; if you want to try it, you can check out the changes from Peter's fork and rebuild the module. Drop me a line if you need instructions.LuigiOn Sat, Sep 10, 2016 at 8:24 PM Björn <[hidden email]> wrote:[hidden email]Hello,
I was really excited when I learned that support for negative rates had been
added to the QL option models. However, I can't get the shifted normal model
or the Bachelier model to work via the QL-Python SWIG bindings. Is there a
tutorial available showing how to use them?
What I'm trying to do is something along the lines:
vol1 = QuoteHandle(SimpleQuote(0.1533))
swaption1.setPricingEngine(BlackSwaptionEngine( termStructure, vol1, -0.03))
swaption2.setPricingEngine(BachelierSwaptionEngine( termStructure, vol1))
But already the first setPricingEngine() fails:
File "<stdin>", line 1, in <module>
File "EuropeanSwaption.py", line 207, in <module>
swaption1.setPricingEngine(BlackSwaptionEngine( termStructure,vol1,-0.03))
File "/Library/Python/2.7/site-packages/QuantLib/QuantLib.py" , line 17495,
in __init__
this = _QuantLib.new_BlackSwaptionEngine(*args)
NotImplementedError: Wrong number or type of arguments for overloaded
function 'new_BlackSwaptionEngine'.
Possible C/C++ prototypes are:
BlackSwaptionEnginePtr::BlackSwaptionEnginePtr(Handle<
YieldTermStructure > const &,Handle< Quote > const &)
BlackSwaptionEnginePtr::BlackSwaptionEnginePtr(Handle<
YieldTermStructure > const &,Handle< SwaptionVolatilityStructure > const &)
What am I doing wrong here?
Thanks,
Björn
--
View this message in context: http://quantlib.10058.n7.nabble.com/Swaption-pricing- with-negative-rates-in-python- tp17714.html
Sent from the quantlib-users mailing list archive at Nabble.com.
------------------------------------------------------------ ------------------
_______________________________________________
QuantLib-users mailing list
https://lists.sourceforge.net/lists/listinfo/quantlib-users
------------------------------------------------------------ [hidden email]------------------
_______________________________________________
QuantLib-users mailing list
https://lists.sourceforge.net/lists/listinfo/quantlib-users
If you reply to this email, your message will be added to the discussion below:http://quantlib.10058.n7.nabble.com/Swaption-pricing- with-negative-rates-in-python- tp17714p17759.html
Free forum by Nabble | Disable Popup Ads | Edit this page |