#include <qle/termstructures/optionletcurve.hpp>
|
| | InterpolatedOptionletCurve (const std::vector< QuantLib::Date > &dates, const std::vector< QuantLib::Real > &volatilities, QuantLib::BusinessDayConvention bdc, const QuantLib::DayCounter &dayCounter, const QuantLib::Calendar &calendar=QuantLib::Calendar(), QuantLib::VolatilityType volatilityType=QuantLib::Normal, QuantLib::Real displacement=0.0, bool flatFirstPeriod=true, const Interpolator &interpolator=Interpolator()) |
|
QuantLib::Date | maxDate () const override |
|
QuantLib::Rate | minStrike () const override |
|
QuantLib::Rate | maxStrike () const override |
|
|
std::vector< QuantLib::Date > | dates_ |
| | The fixing dates of the index underlying the optionlets.
|
|
QuantLib::VolatilityType | volatilityType () const override |
|
QuantLib::Real | displacement () const override |
| QuantLib::ext::shared_ptr< QuantLib::SmileSection > | smileSectionImpl (QuantLib::Time optionTime) const override |
| QuantLib::Real | volatilityImpl (QuantLib::Time optionTime, QuantLib::Rate strike) const override |
|
|
const std::vector< QuantLib::Time > & | times () const |
|
const std::vector< QuantLib::Date > & | dates () const |
|
const std::vector< QuantLib::Real > & | volatilities () const |
|
const std::vector< QuantLib::Real > & | data () const |
|
std::vector< std::pair< QuantLib::Date, QuantLib::Real > > | nodes () const |
|
| InterpolatedOptionletCurve (QuantLib::BusinessDayConvention bdc, const QuantLib::DayCounter &dayCounter, QuantLib::VolatilityType volatilityType=QuantLib::Normal, QuantLib::Real displacement=0.0, bool flatFirstPeriod=true, const Interpolator &interpolator=Interpolator()) |
|
| InterpolatedOptionletCurve (const QuantLib::Date &referenceDate, const QuantLib::Calendar &calendar, QuantLib::BusinessDayConvention bdc, const QuantLib::DayCounter &dayCounter, QuantLib::VolatilityType volatilityType=QuantLib::Normal, QuantLib::Real displacement=0.0, bool flatFirstPeriod=true, const Interpolator &interpolator=Interpolator()) |
|
| InterpolatedOptionletCurve (QuantLib::Natural settlementDays, const QuantLib::Calendar &calendar, QuantLib::BusinessDayConvention bdc, const QuantLib::DayCounter &dayCounter, QuantLib::VolatilityType volatilityType=QuantLib::Normal, QuantLib::Real displacement=0.0, bool flatFirstPeriod=true, const Interpolator &interpolator=Interpolator()) |
template<class Interpolator>
class QuantExt::InterpolatedOptionletCurve< Interpolator >
OptionletVolatilityStructure based on interpolation of one-dimensional vector of optionlet volatilities
The intended use case for this class is to represent the optionlet volatilities along a strike column of a cap floor volatility surface.
◆ InterpolatedOptionletCurve()
template<class Interpolator>
| InterpolatedOptionletCurve |
( |
const std::vector< QuantLib::Date > & | dates, |
|
|
const std::vector< QuantLib::Real > & | volatilities, |
|
|
QuantLib::BusinessDayConvention | bdc, |
|
|
const QuantLib::DayCounter & | dayCounter, |
|
|
const QuantLib::Calendar & | calendar = QuantLib::Calendar(), |
|
|
QuantLib::VolatilityType | volatilityType = QuantLib::Normal, |
|
|
QuantLib::Real | displacement = 0.0, |
|
|
bool | flatFirstPeriod = true, |
|
|
const Interpolator & | interpolator = Interpolator() ) |
Constructor
- Parameters
-
| dates | The fixing dates of the underlying interest rate index |
| volatilities | The optionlet volatility at each of the dates |
| bdc | Business day convention used when getting an optionlet expiry date from an optionlet expiry tenor |
| dayCounter | The day counter used to convert dates to times |
| calendar | The calendar used when getting an optionlet expiry date from an optionlet expiry tenor and. Also used to advance from today to reference date if necessary. |
| volatilityType | The volatility type of the provided volatilities |
| displacement | The applicable shift size if the volatilityType is ShiftedLognormal |
| flatFirstPeriod | If the volatility between the first date and second date in dates is assumed constant and equal to the second element of volatilities. This means that the first element of volatilities is ignored. |
| interpolator | The interpolation object used to interpolate between the provided dates |
◆ smileSectionImpl()
template<class T>
| QuantLib::ext::shared_ptr< QuantLib::SmileSection > smileSectionImpl |
( |
QuantLib::Time | optionTime | ) |
const |
|
overrideprotected |
Gives a flat SmileSection at the requested optionTime. The flat value is obtained by interpolating the input volatilities at the given optionTime.
◆ volatilityImpl()
template<class T>
| QuantLib::Real volatilityImpl |
( |
QuantLib::Time | optionTime, |
|
|
QuantLib::Rate | strike ) const |
|
overrideprotected |
Gives the interpolated optionlet volatility at the requested optionTime. The strike is ignored.