Skip to content

Commit c14fd40

Browse files
pcaspersjenkins
authored andcommitted
QPR-12298 missing shift implementation
1 parent c4f5466 commit c14fd40

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

QuantExt/qle/termstructures/spreadedswaptionvolatility.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,14 @@ Volatility SpreadedSwaptionVolatility::volatilityImpl(Time optionTime, Time swap
157157
}
158158
}
159159

160+
Real SpreadedSwaptionVolatility::shiftImpl(const Date& optionDate, const Period& swapTenor) const {
161+
return base_->shift(optionDate, swapTenor);
162+
}
163+
164+
Real SpreadedSwaptionVolatility::shiftImpl(Time optionTime, Time swapLength) const {
165+
return base_->shift(optionTime, swapLength);
166+
}
167+
160168
void SpreadedSwaptionVolatility::performCalculations() const {
161169
SwaptionVolatilityDiscrete::performCalculations();
162170
for (Size k = 0; k < strikeSpreads_.size(); ++k) {

QuantExt/qle/termstructures/spreadedswaptionvolatility.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ class SpreadedSwaptionVolatility : public SwaptionVolatilityDiscrete {
7878
private:
7979
boost::shared_ptr<SmileSection> smileSectionImpl(Time optionTime, Time swapLength) const override;
8080
Volatility volatilityImpl(Time optionTime, Time swapLength, Rate strike) const override;
81+
Real shiftImpl(const Date& optionDate, const Period& swapTenor) const override;
82+
Real shiftImpl(Time optionTime, Time swapLength) const override;
8183
void performCalculations() const override;
8284
Real getAtmLevel(const Real optionTime, const Real swapLength, const boost::shared_ptr<SwapIndex> swapIndexBase,
8385
const boost::shared_ptr<SwapIndex> shortSwapIndexBase) const;

0 commit comments

Comments
 (0)