@@ -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
@@ -107,21 +109,26 @@ void OISCapFloorHelper::setTermStructure(OptionletVolatilityStructure* ovts) {
107109 Rate atm = CashFlows::atmRate (getOisCapFloorUnderlying (capFloor_), **discountHandle_, false );
108110 CapFloor::Type capFloorType = type_ == CapFloorHelper::Cap ? CapFloor::Cap : CapFloor::Floor;
109111 capFloor_ = MakeOISCapFloor (capFloorType, tenor_, index_, rateComputationPeriod_, atm)
112+ .withEffectiveDate (effectiveDate_)
110113 .withTelescopicValueDates (true )
111- .withEffectiveDate (effectiveDate_ );
114+ .withRule (DateGeneration::Rule::Forward );
112115 capFloorCopy_ = MakeOISCapFloor (capFloorType, tenor_, index_, rateComputationPeriod_, atm)
116+ .withEffectiveDate (effectiveDate_)
113117 .withTelescopicValueDates (true )
114- . 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 );
118122 CapFloor::Type capFloorType = atm > strike_ ? CapFloor::Floor : CapFloor::Cap;
119123 capFloor_ = MakeOISCapFloor (capFloorType, tenor_, index_, rateComputationPeriod_, strike_)
124+ .withEffectiveDate (effectiveDate_)
120125 .withTelescopicValueDates (true )
121- .withEffectiveDate (effectiveDate_ );
126+ .withRule (DateGeneration::Rule::Forward );
122127 capFloorCopy_ = MakeOISCapFloor (capFloorType, tenor_, index_, rateComputationPeriod_, strike_)
123- .withTelescopicValueDates (true )
124- .withEffectiveDate (effectiveDate_);
128+ .withEffectiveDate (effectiveDate_)
129+ .withTelescopicValueDates (true )
130+ .withRule (DateGeneration::Rule::Forward);
131+
125132 for (auto const & c : capFloor_) {
126133 auto cpn = QuantLib::ext::dynamic_pointer_cast<Coupon>(c);
127134 }
0 commit comments