I am simulating an swaption strategy through time. Following the examples in the Python Quantlib cookbook, as I progress through time I am updating the internal evaluation date

ql.Settings.instance().evaluationDate= todays_date 

The first few iterations its reasonably fast, but after about 10 or so this line of code takes forever. What's going on? How can I keep it fast?


It's a known issue with the current version of SWIG, which we use to generate Python bindings to the underlying C++ library. See https://github.com/lballabio/QuantLib-SWIG/issues/212 for details and workarounds.

| improve this answer | |

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.