@@ -77,10 +77,12 @@ void OISCapFloorHelper::initializeDates() {
7777 Rate dummyStrike = strike_ == Null<Real>() ? 0.01 : strike_;
7878 capFloor_ = MakeOISCapFloor (capFloorType, tenor_, index_, rateComputationPeriod_, dummyStrike)
7979 .withEffectiveDate (effectiveDate_)
80- .withTelescopicValueDates (true );
80+ .withTelescopicValueDates (true )
81+ .withRule (DateGeneration::Rule::Forward);
8182 capFloorCopy_ = MakeOISCapFloor (capFloorType, tenor_, index_, rateComputationPeriod_, dummyStrike)
8283 .withEffectiveDate (effectiveDate_)
83- .withTelescopicValueDates (true );
84+ .withTelescopicValueDates (true )
85+ .withRule (DateGeneration::Rule::Forward);
8486
8587 QL_REQUIRE (!capFloor_.empty (), " OISCapFloorHelper: got empty leg." );
8688
@@ -108,10 +110,12 @@ void OISCapFloorHelper::setTermStructure(OptionletVolatilityStructure* ovts) {
108110 CapFloor::Type capFloorType = type_ == CapFloorHelper::Cap ? CapFloor::Cap : CapFloor::Floor;
109111 capFloor_ = MakeOISCapFloor (capFloorType, tenor_, index_, rateComputationPeriod_, atm)
110112 .withTelescopicValueDates (true )
111- .withEffectiveDate (effectiveDate_);
113+ .withEffectiveDate (effectiveDate_)
114+ .withRule (DateGeneration::Rule::Forward);
112115 capFloorCopy_ = MakeOISCapFloor (capFloorType, tenor_, index_, rateComputationPeriod_, atm)
113- .withTelescopicValueDates (true )
114- .withEffectiveDate (effectiveDate_);
116+ .withTelescopicValueDates (true )
117+ .withEffectiveDate (effectiveDate_)
118+ .withRule (DateGeneration::Rule::Forward);
115119 } else if (type_ == CapFloorHelper::Automatic && quoteType_ != CapFloorHelper::Premium) {
116120 // If the helper is set to automatically choose the underlying instrument type, do it now based on the ATM rate
117121 Rate atm = CashFlows::atmRate (getOisCapFloorUnderlying (capFloor_), **discountHandle_, false );
@@ -121,7 +125,9 @@ void OISCapFloorHelper::setTermStructure(OptionletVolatilityStructure* ovts) {
121125 .withEffectiveDate (effectiveDate_);
122126 capFloorCopy_ = MakeOISCapFloor (capFloorType, tenor_, index_, rateComputationPeriod_, strike_)
123127 .withTelescopicValueDates (true )
124- .withEffectiveDate (effectiveDate_);
128+ .withEffectiveDate (effectiveDate_)
129+ .withRule (DateGeneration::Rule::Forward);
130+
125131 for (auto const & c : capFloor_) {
126132 auto cpn = QuantLib::ext::dynamic_pointer_cast<Coupon>(c);
127133 }
0 commit comments