Logo
Reference manual - version qle_version
InterpolatedOptionletCurve< Interpolator > Class Template Reference

#include <qle/termstructures/optionletcurve.hpp>

Inheritance diagram for InterpolatedOptionletCurve< Interpolator >:

Public Member Functions

 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())
TermStructure interface
QuantLib::Date maxDate () const override
VolatilityTermStructure interface
QuantLib::Rate minStrike () const override
QuantLib::Rate maxStrike () const override

OptionletVolatilityStructure interface

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

Other inspectors

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())

Detailed Description

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.

Constructor & Destructor Documentation

◆ 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
datesThe fixing dates of the underlying interest rate index
volatilitiesThe optionlet volatility at each of the dates
bdcBusiness day convention used when getting an optionlet expiry date from an optionlet expiry tenor
dayCounterThe day counter used to convert dates to times
calendarThe 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.
volatilityTypeThe volatility type of the provided volatilities
displacementThe applicable shift size if the volatilityType is ShiftedLognormal
flatFirstPeriodIf 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.
interpolatorThe interpolation object used to interpolate between the provided dates

Member Function Documentation

◆ 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.