Skip to content

Commit cb89328

Browse files
committed
If maturity date falls on begin of the inflation period,
no interpolation of the forward cpis needed, even if the index is interpolated inflation rate helper earliest and latest date should fall on the same day
1 parent 9079515 commit cb89328

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ql/termstructures/inflation/inflationhelpers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ namespace QuantLib {
4646

4747
std::pair<Date, Date> limStart = inflationPeriod(maturity_ - swapObsLag_, zii_->frequency());
4848

49-
if (detail::CPI::effectiveInterpolationType(zii_, observationInterpolation_) == CPI::Linear) {
49+
if ((detail::CPI::effectiveInterpolationType(zii_, observationInterpolation_) == CPI::Linear) && (maturityDate_ != limStart.first)) {
5050
// if interpolated, we need to cover the end of the interpolation period
5151
earliestDate_ = limStart.first;
5252
latestDate_ = limStart.second + 1;

0 commit comments

Comments
 (0)