Skip to content

Commit ae55ce8

Browse files
committed
QPR-13359 avoid invalid fixing date
1 parent 8dfd803 commit ae55ce8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ql/termstructures/volatility/swaption/swaptionvolcube.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,11 @@ namespace QuantLib {
8989
Rate SwaptionVolatilityCube::atmStrike(const Date& optionD,
9090
const Period& swapTenor) const {
9191
if (swapTenor > shortSwapIndexBase_->tenor()) {
92-
return swapIndexBase_->clone(swapTenor)->fixing(optionD);
92+
return swapIndexBase_->clone(swapTenor)->fixing(
93+
swapIndexBase_->fixingCalendar().adjust(optionD));
9394
} else {
94-
return shortSwapIndexBase_->clone(swapTenor)->fixing(optionD);
95+
return shortSwapIndexBase_->clone(swapTenor)->fixing(
96+
swapIndexBase_->fixingCalendar().adjust(optionD));
9597
}
9698
}
9799

0 commit comments

Comments
 (0)