24#ifndef quantext_swaptionvolcubeconstantspread_hpp
25#define quantext_swaptionvolcubeconstantspread_hpp
27#include <ql/termstructures/volatility/swaption/swaptionvolcube.hpp>
29#include <ql/shared_ptr.hpp>
37 const Handle<SwaptionVolatilityStructure>& cube,
const Real optionTime,
38 const Real swapLength)
39 : SmileSection(optionTime, DayCounter(), atm->volatilityType(),
40 atm->volatilityType() == ShiftedLognormal ? atm->shift(optionTime, swapLength) : 0.0),
48 Rate
atmLevel()
const override {
return Null<Real>(); }
54 const Handle<SwaptionVolatilityStructure>
atm_,
cube_;
56 const QuantLib::ext::shared_ptr<SmileSection>
section_;
72 const Handle<SwaptionVolatilityStructure>&
cube)
73 : SwaptionVolatilityStructure(0, atm->
calendar(), atm->businessDayConvention(), atm->
dayCounter()),
atm_(atm),
75 enableExtrapolation(atm->allowsExtrapolation());
102 const Handle<SwaptionVolatilityStructure>&
atmVol() {
return atm_; }
103 const Handle<SwaptionVolatilityStructure>&
cube() {
return cube_; }
106 QuantLib::ext::shared_ptr<SmileSection>
smileSectionImpl(Time optionTime, Time swapLength)
const override;
108 Volatility
volatilityImpl(Time optionTime, Time swapLength, Rate strike)
const override;
Rate atmLevel() const override
const QuantLib::ext::shared_ptr< SmileSection > section_
const Handle< SwaptionVolatilityStructure > cube_
Rate maxStrike() const override
Rate minStrike() const override
const Handle< SwaptionVolatilityStructure > atm_
Volatility volatilityImpl(Rate strike) const override
ConstantSpreadSmileSection(const Handle< SwaptionVolatilityStructure > &atm, const Handle< SwaptionVolatilityStructure > &cube, const Real optionTime, const Real swapLength)
Swaption cube that combines an ATM matrix and vol spreads from a cube.
Handle< SwaptionVolatilityStructure > cube_
const Handle< SwaptionVolatilityStructure > & cube()
Calendar calendar() const override
Volatility volatilityImpl(Time optionTime, Time swapLength, Rate strike) const override
Rate maxStrike() const override
Rate minStrike() const override
QuantLib::ext::shared_ptr< SmileSection > smileSectionImpl(Time optionTime, Time swapLength) const override
void deepUpdate() override
const Date & referenceDate() const override
VolatilityType volatilityType() const override
Natural settlementDays() const override
DayCounter dayCounter() const override
Handle< SwaptionVolatilityStructure > atm_
Date maxDate() const override
const Handle< SwaptionVolatilityStructure > & atmVol()
const Period & maxSwapTenor() const override
Time maxTime() const override
SwaptionVolatilityConstantSpread(const Handle< SwaptionVolatilityStructure > &atm, const Handle< SwaptionVolatilityStructure > &cube)