@@ -89,14 +89,11 @@ void CapFloor::build(const boost::shared_ptr<EngineFactory>& engineFactory) {
8989
9090 bool isBmaIndex = boost::dynamic_pointer_cast<QuantExt::BMAIndexWrapper>(index) != nullptr ;
9191
92- if (!isBmaIndex && ! floatData->hasSubPeriods ()) {
92+ if (!floatData->hasSubPeriods ()) {
9393 // For the cases where we support caps and floors in the regular way, we build a floating leg with
9494 // the nakedOption flag set to true, this avoids maintaining all features in legs with associated
9595 // coupon pricers and at the same time in the QuaantLib::CapFloor instrument and pricing engine.
96- // Supported cases are
97- // - Ibor coupon without sub periods (hasSubPeriods = false)
98- // - compounded ON coupon, averaged ON coupon
99- // The other cases are handled below.
96+ // The only remaining unsupported case are ibor coupons with sub periods
10097 LegData tmpLegData = legData_;
10198 boost::shared_ptr<FloatingLegData> tmpFloatData = boost::make_shared<FloatingLegData>(*floatData);
10299 tmpFloatData->floors () = floors_;
@@ -124,12 +121,11 @@ void CapFloor::build(const boost::shared_ptr<EngineFactory>& engineFactory) {
124121 maturity_ = CashFlows::maturityDate (legs_.front ());
125122 } else {
126123 // For the cases where we don't have regular cap / floor support we treat the index approximately as an Ibor
127- // index and build an QuantLib::CapFloor with associated pricing engine. These cases comprise:
128- // - BMA coupons
129- // - Ibor coupons with sub periods (hasSubPeriods = true)
124+ // index and build an QuantLib::CapFloor with associated pricing engine. The only remaining case where this
125+ // is done are Ibor subperiod coupons
130126
131- ALOG (" CapFloor trade " << id () << " on a) BMA or b) sub periods Ibor (index = '" << underlyingIndex
132- << " ') built, will treat the index approximately as an ibor index " );
127+ ALOG (" CapFloor trade " << id () << " on sub periods Ibor (index = '" << underlyingIndex
128+ << " ') built, will ignore sub periods feature " );
133129 builder = engineFactory->builder (tradeType_);
134130 legs_.push_back (makeIborLeg (legData_, index, engineFactory));
135131
0 commit comments