Interpolated cap floor term volatility curve. More...
#include <qle/termstructures/capfloortermvolcurve.hpp>
Public Member Functions | |
InterpolatedCapFloorTermVolCurve (QuantLib::Natural settlementDays, const QuantLib::Calendar &calendar, QuantLib::BusinessDayConvention bdc, const std::vector< QuantLib::Period > &optionTenors, const std::vector< QuantLib::Handle< QuantLib::Quote > > &volatilities, const QuantLib::DayCounter &dayCounter=QuantLib::Actual365Fixed(), bool flatFirstPeriod=true, const Interpolator &interpolator=Interpolator()) | |
InterpolatedCapFloorTermVolCurve (const QuantLib::Date &settlementDate, const QuantLib::Calendar &calendar, QuantLib::BusinessDayConvention bdc, const std::vector< QuantLib::Period > &optionTenors, const std::vector< QuantLib::Handle< QuantLib::Quote > > &volatilities, const QuantLib::DayCounter &dayCounter=QuantLib::Actual365Fixed(), 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 |
LazyObject interface | |
void | update () override |
void | performCalculations () const override |
CapFloorTermVolCurve interface | |
std::vector< QuantLib::Period > | optionTenors () const override |
Return the tenors used in the CapFloorTermVolCurve. More... | |
Inspectors | |
const std::vector< QuantLib::Date > & | optionDates () const |
const std::vector< QuantLib::Time > & | optionTimes () const |
Public Member Functions inherited from CapFloorTermVolCurve | |
CapFloorTermVolCurve (QuantLib::BusinessDayConvention bdc, const QuantLib::DayCounter &dc=QuantLib::DayCounter()) | |
CapFloorTermVolCurve (const QuantLib::Date &referenceDate, const QuantLib::Calendar &cal, QuantLib::BusinessDayConvention bdc, const QuantLib::DayCounter &dc=QuantLib::DayCounter()) | |
CapFloorTermVolCurve (QuantLib::Natural settlementDays, const QuantLib::Calendar &cal, QuantLib::BusinessDayConvention bdc, const QuantLib::DayCounter &dc=QuantLib::DayCounter()) | |
calculate the reference date based on the global evaluation date More... | |
CapFloorTermVolatilityStructure interface | |
QuantLib::Size | nOptionTenors_ |
Number of underlying cap floor instruments. More... | |
std::vector< QuantLib::Period > | optionTenors_ |
Underlying cap floor tenors. More... | |
std::vector< QuantLib::Date > | optionDates_ |
std::vector< QuantLib::Time > | optionTimes_ |
std::vector< QuantLib::Handle< QuantLib::Quote > > | volatilities_ |
Cap floor term volatility quotes. More... | |
bool | flatFirstPeriod_ |
True for flat volatility from time zero to the first cap floor date. More... | |
QuantLib::Volatility | volatilityImpl (QuantLib::Time length, QuantLib::Rate) const override |
void | checkInputs () const |
Check the constructor arguments for consistency. More... | |
void | registerWithMarketData () |
Register this curve with the volatility quotes. More... | |
Interpolated cap floor term volatility curve.
Class that interpolates a vector of cap floor volatilities.
Based on the class QuantLib::CapFloorTermVolCurve with changes:
Definition at line 70 of file capfloortermvolcurve.hpp.
InterpolatedCapFloorTermVolCurve | ( | QuantLib::Natural | settlementDays, |
const QuantLib::Calendar & | calendar, | ||
QuantLib::BusinessDayConvention | bdc, | ||
const std::vector< QuantLib::Period > & | optionTenors, | ||
const std::vector< QuantLib::Handle< QuantLib::Quote > > & | volatilities, | ||
const QuantLib::DayCounter & | dayCounter = QuantLib::Actual365Fixed() , |
||
bool | flatFirstPeriod = true , |
||
const Interpolator & | interpolator = Interpolator() |
||
) |
Constructor with floating reference date
settlementDays | Number of days from evaluation date to curve reference date. |
calendar | The calendar used to derive cap floor maturity dates from optionTenors . Also used to advance from today to reference date if necessary. |
bdc | The business day convention used to derive cap floor maturity dates from optionTenors . |
optionTenors | The cap floor tenors. The first tenor must be positive. |
volatilities | The cap floor volatility quotes. |
dayCounter | The day counter used to convert from dates to times. |
flatFirstPeriod | Set to true to use the first element of volatilities between time zero and the first element of optionTenors . If this is false , the volatility at time zero is set to zero and interpolation between time and the first element of optionTenors is used. |
interpolator | An instance of the interpolator to use. Allows for specification of Interpolator instances that use a constructor that takes arguments. |
Definition at line 184 of file capfloortermvolcurve.hpp.
InterpolatedCapFloorTermVolCurve | ( | const QuantLib::Date & | settlementDate, |
const QuantLib::Calendar & | calendar, | ||
QuantLib::BusinessDayConvention | bdc, | ||
const std::vector< QuantLib::Period > & | optionTenors, | ||
const std::vector< QuantLib::Handle< QuantLib::Quote > > & | volatilities, | ||
const QuantLib::DayCounter & | dayCounter = QuantLib::Actual365Fixed() , |
||
bool | flatFirstPeriod = true , |
||
const Interpolator & | interpolator = Interpolator() |
||
) |
Constructor with fixed reference date
settlementDate | The curve reference date. |
calendar | The calendar used to derive cap floor maturity dates from optionTenors . Also used to advance from today to reference date if necessary. |
bdc | The business day convention used to derive cap floor maturity dates from optionTenors . |
optionTenors | The cap floor tenors. The first tenor must be positive. |
volatilities | The cap floor volatility quotes. |
dayCounter | The day counter used to convert from dates to times. |
flatFirstPeriod | Set to true to use the first element of volatilities between time zero and the first element of optionTenors . If this is false , the volatility at time zero is set to zero and interpolation between time and the first element of optionTenors is used. |
interpolator | An instance of the interpolator to use. Allows for specification of Interpolator instances that use a constructor that takes arguments. |
Definition at line 199 of file capfloortermvolcurve.hpp.
|
override |
Definition at line 213 of file capfloortermvolcurve.hpp.
|
override |
Definition at line 218 of file capfloortermvolcurve.hpp.
|
override |
Definition at line 222 of file capfloortermvolcurve.hpp.
|
override |
Definition at line 226 of file capfloortermvolcurve.hpp.
|
override |
Definition at line 231 of file capfloortermvolcurve.hpp.
|
overridevirtual |
Return the tenors used in the CapFloorTermVolCurve.
Implements CapFloorTermVolCurve.
Definition at line 251 of file capfloortermvolcurve.hpp.
const std::vector< QuantLib::Date > & optionDates |
Definition at line 257 of file capfloortermvolcurve.hpp.
const std::vector< QuantLib::Time > & optionTimes |
Definition at line 263 of file capfloortermvolcurve.hpp.
|
overrideprotected |
Definition at line 269 of file capfloortermvolcurve.hpp.
|
private |
Check the constructor arguments for consistency.
Definition at line 280 of file capfloortermvolcurve.hpp.
|
private |
Register this curve with the volatility quotes.
Definition at line 294 of file capfloortermvolcurve.hpp.
|
private |
Number of underlying cap floor instruments.
Definition at line 161 of file capfloortermvolcurve.hpp.
|
private |
Underlying cap floor tenors.
Definition at line 164 of file capfloortermvolcurve.hpp.
|
mutableprivate |
Underlying cap floor maturity dates. Mutable since if the curve is moving
, the dates need to be updated from const
method.
Definition at line 169 of file capfloortermvolcurve.hpp.
|
mutableprivate |
Time to maturity of underlying cap floor instruments. Mutable since if the curve is moving
, the times need to be updated from const
method.
Definition at line 174 of file capfloortermvolcurve.hpp.
|
private |
Cap floor term volatility quotes.
Definition at line 177 of file capfloortermvolcurve.hpp.
|
private |
True for flat volatility from time zero to the first cap floor date.
Definition at line 180 of file capfloortermvolcurve.hpp.