|
From: Kenji O. <for...@gm...> - 2026-01-05 10:14:00
|
Hi Luigi, Thank you very much for the clarification. I was not aware of ql.CustomRegion, but after creating a CustomRegion for Japan and passing it to the ZeroInflationIndex constructor, everything worked as expected. I really appreciate your help. By the way, I am based in Japan and have published a book here related to QuantLib-Python. Its ISBN-13 is *978-4320096530*. Thank you again for your support. Best regards, Kenji Ogawa 2026年1月5日(月) 17:36 Luigi Ballabio <lui...@gm...>: > Hi, > ql.Japan() is a calendar, not an instance of Region. You can create a > region for Japan using the ql.CustomRegion class. Once you pass that to > the ZeroInflationIndex constructor, it should work. > > Hope this helps, > Luigi > > > On Sun, Jan 4, 2026 at 1:33 AM Kenji Ogawa <for...@gm...> wrote: > >> Hi there, >> >> I am unable to construct a ZeroInflationIndex from Python using QuantLib >> version 1.40 and the current constructor. >> >> The following Python code fails on my side: >> >> import QuantLib as ql >> jpCPI = ql.ZeroInflationIndex( >> "Japan CPI", >> ql.Japan(), >> False, >> ql.Monthly, >> ql.Period(3, ql.Months), >> ql.JPYCurrency() >> ) >> >> Could you please point me to the specific place where this should be >> fixed? >> >> Regards, Kenji >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > |