27#ifndef quantlib_swaption_volatility_matrix_hpp
28#define quantlib_swaption_volatility_matrix_hpp
61 bool flatExtrapolation =
false,
63 const std::vector<std::vector<Real> >& shifts = std::vector<std::vector<Real> >());
73 bool flatExtrapolation =
false,
75 const std::vector<std::vector<Real> >& shifts = std::vector<std::vector<Real> >());
81 const Matrix& volatilities,
83 bool flatExtrapolation =
false,
92 const Matrix& volatilities,
94 bool flatExtrapolation =
false,
103 const Matrix& volatilities,
105 bool flatExtrapolation =
false,
138 const Period& swapTenor)
const {
164 Size shiftsColumns)
const;
203 Time swapLength)
const {
Shared handle to an observable.
base class for 2-D interpolations.
Size locateY(Real y) const
Size locateX(Real x) const
virtual void calculate() const
Matrix used in linear algebra.
std::vector< Date > optionDates_
std::vector< Period > swapTenors_
const std::vector< Period > & swapTenors() const
const std::vector< Period > & optionTenors() const
const std::vector< Date > & optionDates() const
At-the-money swaption-volatility matrix.
void registerWithMarketData()
void performCalculations() const override
std::pair< Size, Size > locate(Time optionTime, Time swapLength) const
returns the lower indexes of surrounding volatility matrix corners
Volatility volatilityImpl(Time optionTime, Time swapLength, Rate strike) const override
std::vector< std::vector< Handle< Quote > > > volHandles_
Rate maxStrike() const override
the maximum strike for which the term structure can return vols
~SwaptionVolatilityMatrix() override=default
Rate minStrike() const override
the minimum strike for which the term structure can return vols
ext::shared_ptr< SmileSection > smileSectionImpl(Time, Time) const override
Interpolation2D interpolation_
std::pair< Size, Size > locate(const Date &optionDate, const Period &swapTenor) const
returns the lower indexes of surrounding volatility matrix corners
SwaptionVolatilityMatrix(SwaptionVolatilityMatrix &&)=delete
Real shiftImpl(Time optionTime, Time swapLength) const override
Interpolation2D interpolationShifts_
SwaptionVolatilityMatrix(const SwaptionVolatilityMatrix &)=delete
VolatilityType volatilityType() const override
volatility type
void checkInputs(Size volRows, Size volsColumns, Size shiftRows, Size shiftsColumns) const
Date maxDate() const override
the latest date for which the curve can return values
std::vector< std::vector< Real > > shiftValues_
SwaptionVolatilityMatrix & operator=(const SwaptionVolatilityMatrix &)=delete
const Period & maxSwapTenor() const override
the largest length for which the term structure can return vols
SwaptionVolatilityMatrix & operator=(SwaptionVolatilityMatrix &&)=delete
VolatilityType volatilityType_
Time swapLength(const Period &swapTenor) const
implements the conversion between swap tenor and swap (time) length
virtual const Date & referenceDate() const
the date at which discount = 1.0 and/or variance = 0.0
virtual Calendar calendar() const
the calendar used for reference and/or option date calculation
Time timeFromReference(const Date &date) const
date/time conversion
virtual DayCounter dayCounter() const
the day counter used for date/time conversion
BusinessDayConvention
Business Day conventions.
Real Time
continuous quantity with 1-year units
Real Volatility
volatility
std::size_t Size
size of a container
abstract base classes for 2-D interpolations
matrix used in linear algebra.
Discretized swaption volatility.