|
From: Anastasia A. <ana...@di...> - 2023-01-10 02:39:51
|
Hi! I have a problem with the CPI bond. I want to extract the index fixing on a daily basis (that fixing which is calculated within the cash flow including the inflation lag). If I apply the index.fixing(ql.Date(...) function, I get the value from the interpolated curve, but not the index which is taken into account when calculating the CPI coupon. Does the new method from version 1.26 laggedFixing solve this problem ? I did not get how it works, unfortunately. I have tried different options, ql.CPIBond.laggedFixing((index, ql.Date(31,12,2022), ql.Period(3, ql.Months), ql.CPI.Linear), but the errors like type object 'CPIBond' has no attribute 'laggedFixing' and others occur . Could anyone advise how to use this method correctly? Warm regards, Anastasia |