Issue creating an InflationNodalCurve

If we want to build an inflation curve we’re going to be using market quotes for zero coupon swaps with a lag, however it does not seem this lag is handled correctly. FixedInflationSwapCurveNode#calculateEnd appears to supply the end date of a swap e.g. BPSWIT1 Curncy is the ticker for a 1Y ZC RPI swap which currently runs from Feb '20 to Feb '21 but is a swap on the Dec '19 - Dec '20 RPI (where Dec '19 is known @ 291.9)

If I build a curve with a valuation date of 2020-02-03 then I end up in InflationNodalCurve#of with the extendedCurve containing y values of [-2, 12, 24…]

One place to “fix” this is InterpolatedNodalCurveDefinition#buildNodeTimes although getting access to the lag is pretty messy. Can you confirm whether this is a bug, and if there’s a better place to fix it?

1 Like

In FixedInflationSwapCurveNode#date, the node date is first calculated by calculateEnd and modified by calculateLastFixingDate, then this date will be used for calculating X value of the curve.

Please see our inflation curve example, CalibrationUsdCpiExample, where the resulting inflation curve has node points at [-1, 10, 22,…] corresponding to the lag defined in InflationRateSwapLegConvention in FixedInflationSwapCurveNode.

I see thanks, looks like CurveNodeDate.LAST_FIXING needs to be used instead of CurveNodeDate.END - should have be the default in FixedInflationSwapCurveNode#applyDefaults ?