QuantLib
QuantLib copied to clipboard
Assess refactoring of inflation-index interpolation
The Inflationindex class and its children classes have an interpolated field that doesn't really belong there. There is no "interpolated HICP index" as opposed to a "non-interpolated HICP index". There is a single HICP index which fixes monthly; some instruments pay coupons based on its interpolated values and some on its non-interpolated values, but that should be a property of the coupon, not the index. (We did the right thing, for instance, with interest-rate indexes; there is no "in-arrears Euribor 6M index". There is an Euribor 6M index, and coupons can be in advance or in arrears.)
We should deprecate the InflationIndex constructors that take the interpolated field, add new ones that don't, and move the corresponding logic to the coupon. In the end, the fixing method of the index should only return actual monthly fixings. For convenience, we might have an interpolatedFixing method returning the interpolated ones, or possibly a free function doing the same, so the same logic can be written once and reused across different coupons.