|
From: Luigi B. <lui...@gm...> - 2021-06-03 08:07:46
|
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...>
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...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
|