24#ifndef quantext_swaption_sabrcube_h
25#define quantext_swaption_sabrcube_h
30#include <ql/termstructures/volatility/swaption/swaptionvolcube.hpp>
38 const Handle<SwaptionVolatilityStructure>& atmVolStructure,
const std::vector<Period>& optionTenors,
39 const std::vector<Period>& swapTenors,
const std::vector<Period>& atmOptionTenors,
40 const std::vector<Period>& atmSwapLengths,
const std::vector<Spread>& strikeSpreads,
41 const std::vector<std::vector<Handle<Quote>>>& volSpreads,
42 const QuantLib::ext::shared_ptr<SwapIndex>& swapIndexBase,
43 const QuantLib::ext::shared_ptr<SwapIndex>& shortSwapIndexBase,
45 const boost::optional<QuantLib::VolatilityType> outputVolatilityType = boost::none,
46 const std::map<std::pair<Period, Period>, std::vector<std::pair<Real, bool>>>& initialModelParameters = {},
47 const QuantLib::Size maxCalibrationAttempts = 10,
const QuantLib::Real exitEarlyErrorThreshold = 0.005,
48 const QuantLib::Real maxAcceptableError = 0.05);
50 QuantLib::ext::shared_ptr<SmileSection>
smileSectionImpl(Time optionTime, Time swapLength)
const override;
55 mutable std::map<std::pair<Real, Real>, QuantLib::ext::shared_ptr<ParametricVolatilitySmileSection>>
cache_;
void performCalculations() const override
std::map< std::pair< QuantLib::Period, QuantLib::Period >, std::vector< std::pair< Real, bool > > > initialModelParameters_
boost::optional< QuantLib::VolatilityType > outputVolatilityType_
QuantLib::Real exitEarlyErrorThreshold_
QuantExt::SabrParametricVolatility::ModelVariant modelVariant_
QuantLib::Real maxAcceptableError_
std::map< std::pair< Real, Real >, QuantLib::ext::shared_ptr< ParametricVolatilitySmileSection > > cache_
std::vector< Period > atmSwapTenors_
QuantLib::ext::shared_ptr< ParametricVolatility > parametricVolatility_
QuantLib::ext::shared_ptr< SmileSection > smileSectionImpl(Time optionTime, Time swapLength) const override
QuantLib::Size maxCalibrationAttempts_
QuantLib::ext::shared_ptr< ParametricVolatility > parametricVolatility() const
std::vector< Period > atmOptionTenors_
sabr volatility structure