Inflation swaps


#1

Hi Steven,
We are trying to process Bloomberg Inflation Swaps examples and getting indexOutOfBound exception.
It seems that while building the curve array according to effective date, termination date and the period, the array is too small.

For example,
<calculationPeriodDates id="recCalcDates"> <effectiveDate> <unadjustedDate>2016-07-12</unadjustedDate> <dateAdjustments> <businessDayConvention>NONE</businessDayConvention> </dateAdjustments> </effectiveDate> <terminationDate> <unadjustedDate>2021-07-12</unadjustedDate> <dateAdjustments> <businessDayConvention>NONE</businessDayConvention> </dateAdjustments> </terminationDate> <calculationPeriodDatesAdjustments> <businessDayConvention>NONE</businessDayConvention> </calculationPeriodDatesAdjustments> <calculationPeriodFrequency> <periodMultiplier>5</periodMultiplier> <period>Y</period> <rollConvention>NONE</rollConvention> </calculationPeriodFrequency> </calculationPeriodDates>
Through debugging we see:
The termInYearsEstimate is 7
frequency.eventsPerYearEstimate() is 0.2
frequency.eventsPerYearEstimate() * termInYearsEstimate is 1.4
int(1.4) is 1

I would have thought that the value should be rounded up rather than truncated and result should be 2.


#2

Discussion moved to this thread.