@@ -109,24 +109,25 @@ void OISCapFloorHelper::setTermStructure(OptionletVolatilityStructure* ovts) {
109109 Rate atm = CashFlows::atmRate (getOisCapFloorUnderlying (capFloor_), **discountHandle_, false );
110110 CapFloor::Type capFloorType = type_ == CapFloorHelper::Cap ? CapFloor::Cap : CapFloor::Floor;
111111 capFloor_ = MakeOISCapFloor (capFloorType, tenor_, index_, rateComputationPeriod_, atm)
112- .withTelescopicValueDates (true )
113112 .withEffectiveDate (effectiveDate_)
113+ .withTelescopicValueDates (true )
114114 .withRule (DateGeneration::Rule::Forward);
115115 capFloorCopy_ = MakeOISCapFloor (capFloorType, tenor_, index_, rateComputationPeriod_, atm)
116- . withTelescopicValueDates ( true )
117- . withEffectiveDate (effectiveDate_ )
118- .withRule (DateGeneration::Rule::Forward);
116+ . withEffectiveDate (effectiveDate_ )
117+ . withTelescopicValueDates ( true )
118+ .withRule (DateGeneration::Rule::Forward);
119119 } else if (type_ == CapFloorHelper::Automatic && quoteType_ != CapFloorHelper::Premium) {
120120 // If the helper is set to automatically choose the underlying instrument type, do it now based on the ATM rate
121121 Rate atm = CashFlows::atmRate (getOisCapFloorUnderlying (capFloor_), **discountHandle_, false );
122122 CapFloor::Type capFloorType = atm > strike_ ? CapFloor::Floor : CapFloor::Cap;
123123 capFloor_ = MakeOISCapFloor (capFloorType, tenor_, index_, rateComputationPeriod_, strike_)
124+ .withEffectiveDate (effectiveDate_)
124125 .withTelescopicValueDates (true )
125- .withEffectiveDate (effectiveDate_ );
126+ .withRule (DateGeneration::Rule::Forward );
126127 capFloorCopy_ = MakeOISCapFloor (capFloorType, tenor_, index_, rateComputationPeriod_, strike_)
127- . withTelescopicValueDates ( true )
128- . withEffectiveDate (effectiveDate_ )
129- .withRule (DateGeneration::Rule::Forward);
128+ . withEffectiveDate (effectiveDate_ )
129+ . withTelescopicValueDates ( true )
130+ .withRule (DateGeneration::Rule::Forward);
130131
131132 for (auto const & c : capFloor_) {
132133 auto cpn = QuantLib::ext::dynamic_pointer_cast<Coupon>(c);
0 commit comments