|
From: Rasika S. <ras...@ai...> - 2021-06-03 13:38:11
|
Hello Luigi,
Thanks for your prompt response!
As suggested, I have opened an issue on GitHub with the request to export bucketAnalysis. Alternatively will also see how can we calculate the key rate durations without bucketAnalysis.
Regards,
Rasika Sinha
From: Luigi Ballabio <lui...@gm...>
Sent: Thursday, June 3, 2021 1:37 PM
To: Rasika Sinha <ras...@ai...>
Cc: qua...@li...
Subject: Re: [Quantlib-users] Quantlib installation on Ubuntu - bucketAnalysis function missing
Hello,
not all C++ functionality is available from Python — it's a partly manual process, so it's done when things are needed or requested. You can see what's exported by looking into <https://github.com/lballabio/QuantLib-SWIG/tree/master/SWIG>.
You can open an issue on GitHub to request that function to be exported. However, it might be easier to write something similar in Python. The idea is to calculate the initial NPV of the instruments, then bump the quotes and calculate the NPV again.
Hope this helps,
Luigi
On Wed, Jun 2, 2021 at 6:49 PM Rasika Sinha <ras...@ai...<mailto:ras...@ai...>> wrote:
Hello QL-Community,
Issue – Unable to access bucketAnalysis in Quantlib
Environment – Ubuntu 18.04 via WSL; Python 3.6.1; Windows 10
Details - I was following the steps to install Quantlib as mentioned at https://www.quantlib.org/install/linux-python.shtml. To start with I tried the first approach i.e. “Installation from PyPI”. Quantlib 1.21 got installed successfully but I am unable to use the function bucketAnalysis.
The error says - module 'QuantLib' has no attribute 'bucketAnalysis'.
I tried the second approach as well mentioned under “Installation from a released version”, but when using the newly compiled files, I got same error as mentioned above.
I can see bucketAnalysis function is present in the c++ code under experimental/risk/ but why is it missing in the Python wrapper.
Can you please guide me.
Regards,
Rasika Sinha
_______________________________________________
QuantLib-users mailing list
Qua...@li...<mailto:Qua...@li...>
https://lists.sourceforge.net/lists/listinfo/quantlib-users
|