1
$\begingroup$

I am trying to import indexes from QuantLib for my further analysis and term structures. But below code is not working and giving me 'ModuleNotFoundError'. Please suggest if this the correct way of importing. I have seen in some examples of similar way of importing.

from QuantLib.indexes.inflation.europe import EUHICP
from QuantLib.time.calendars.target import TARGET
$\endgroup$

1 Answer 1

4
$\begingroup$

That's the structure of the folders in the C++ source, but the Python module is flat. Just write:

from QuantLib import EUHICP, TARGET
$\endgroup$
1

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.