33 const std::vector<Period>& optionTenors,
34 const std::vector<Period>& swapTenors,
35 const std::vector<Spread>& strikeSpreads,
37 const ext::shared_ptr<SwapIndex>& swapIndexBase,
38 const ext::shared_ptr<SwapIndex>& shortSwapIndexBase,
39 bool vegaWeightedSmileFit)
41 strikeSpreads, volSpreads, swapIndexBase,
43 vegaWeightedSmileFit),
44 volSpreadsInterpolator_(nStrikes_),
45 volSpreadsMatrix_(nStrikes_,
Matrix(optionTenors.size(), swapTenors.size(), 0.0)) {
68 ext::shared_ptr<SmileSection>
70 Time swapLength)
const {
85 ext::shared_ptr<SmileSection>
87 const Period& swapTenor)
const {
94 Real exerciseTimeSqrt = std::sqrt(optionTime);
95 std::vector<Real> strikes, stdDevs;
101 stdDevs.push_back(exerciseTimeSqrt*(
105 return ext::shared_ptr<SmileSection>(
new
bilinear interpolation between discrete points
Actual/365 (Fixed) day count convention.
bilinear interpolation between discrete points
Shared handle to an observable.
void performCalculations() const override
std::vector< Matrix > volSpreadsMatrix_
ext::shared_ptr< SmileSection > smileSectionImpl(const Date &optionDate, const Period &swapTenor) const override
std::vector< Interpolation2D > volSpreadsInterpolator_
InterpolatedSwaptionVolatilityCube(const Handle< SwaptionVolatilityStructure > &atmVolStructure, const std::vector< Period > &optionTenors, const std::vector< Period > &swapTenors, const std::vector< Spread > &strikeSpreads, const std::vector< std::vector< Handle< Quote > > > &volSpreads, const ext::shared_ptr< SwapIndex > &swapIndexBase, const ext::shared_ptr< SwapIndex > &shortSwapIndexBase, bool vegaWeightedSmileFit)
virtual void calculate() const
Linear-interpolation factory and traits
Matrix used in linear algebra.
Rate atmStrike(const Date &optionDate, const Period &swapTenor) const
void performCalculations() const override
ext::shared_ptr< SwapIndex > swapIndexBase_
std::vector< Spread > strikeSpreads_
Handle< SwaptionVolatilityStructure > atmVol() const
Handle< SwaptionVolatilityStructure > atmVol_
ext::shared_ptr< SwapIndex > shortSwapIndexBase_
VolatilityType volatilityType() const override
volatility type
std::vector< std::vector< Handle< Quote > > > volSpreads_
std::vector< Time > swapLengths_
std::vector< Time > optionTimes_
Date optionDateFromTime(Time optionTime) const
additional inspectors
Real shift(const Period &optionTenor, const Period &swapTenor, bool extrapolate=false) const
returns the shift for a given option tenor and swap tenor
Time swapLength(const Period &swapTenor) const
implements the conversion between swap tenor and swap (time) length
Time timeFromReference(const Date &date) const
date/time conversion
Real Time
continuous quantity with 1-year units
Real Volatility
volatility
QL_INTEGER Integer
integer number
std::size_t Size
size of a container
Interpolated smile section class.
Swaption volatility cube, fit-later-interpolate-early approach.