Skip to content

Commit 39946e8

Browse files
pcaspersjenkins
authored andcommitted
QPR-12491 fix
1 parent d212b2c commit 39946e8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

QuantExt/qle/termstructures/sabrstrippedoptionletadapter.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,11 @@ inline void SabrStrippedOptionletAdapter<TimeInterpolator>::performCalculations(
205205

206206
std::vector<ParametricVolatility::MarketSmile> marketSmiles;
207207
std::map<std::pair<QuantLib::Real, QuantLib::Real>, std::vector<std::pair<Real, bool>>> modelParameters;
208-
QL_REQUIRE(initialModelParameters_.empty() ||
208+
QL_REQUIRE(initialModelParameters_.empty() || initialModelParameters_.size() == 1 ||
209209
initialModelParameters_.size() == this->optionletBase()->optionletFixingTimes().size(),
210210
"SabrStrippedOptionletAdapter: initial model parameters must be empty or their size ("
211-
<< initialModelParameters_.size() << " must match the number of optionlet fixing times ("
211+
<< initialModelParameters_.size()
212+
<< ") must be 1 or it must match the number of optionlet fixing times ("
212213
<< this->optionletBase()->optionletFixingTimes().size() << ")");
213214
for (Size i = 0; i < this->optionletBase()->optionletFixingTimes().size(); ++i) {
214215
Real forward = atmInterpolation_->operator()(this->optionletBase()->optionletFixingTimes()[i]);

0 commit comments

Comments
 (0)