Skip to content

Commit c9743e7

Browse files
Merge branch 'QPR-11657' into 'master'
QPR-11587 ensure atm rates are not requested for overnight index Closes QPR-11587 See merge request qs/quantlib!51
2 parents aee657c + 39fe6af commit c9743e7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

ql/termstructures/volatility/optionlet/strippedoptionlet.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,12 @@ namespace QuantLib {
160160

161161
const vector<Time>& StrippedOptionlet::atmOptionletRates() const {
162162
calculate();
163-
for (Size i=0; i<nOptionletDates_; ++i)
163+
QL_REQUIRE(boost::dynamic_pointer_cast<OvernightIndex>(iborIndex_) == nullptr,
164+
"StrippedOptionlet::atmOptionletRates() not implemented for overnight index "
165+
<< iborIndex_->name());
166+
for (Size i=0; i<nOptionletDates_; ++i) {
164167
optionletAtmRates_[i] = iborIndex_->fixing(optionletDates_[i], true);
168+
}
165169
return optionletAtmRates_;
166170
}
167171

0 commit comments

Comments
 (0)