#include <qle/termstructures/strippedyoyinflationoptionletvol.hpp>
|
| StrippedYoYInflationOptionletVol (Natural settlementDays, const Calendar &calendar, BusinessDayConvention bdc, const DayCounter &dc, const Period &observationLag, Frequency frequency, bool indexIsInterpolated, const std::vector< Date > &yoyoptionletDates, const std::vector< Rate > &strikes, const std::vector< std::vector< Handle< Quote > > > &, VolatilityType type=ShiftedLognormal, Real displacement=0.0) |
|
QuantLib::Date | maxDate () const override |
|
void | performCalculations () const override |
|
void | update () override |
|
const std::vector< Rate > & | yoyoptionletStrikes (Size i) const |
|
const std::vector< Volatility > & | yoyoptionletVolatilities (Size i) const |
|
const std::vector< Date > & | yoyoptionletFixingDates () const |
|
const std::vector< Time > & | yoyoptionletFixingTimes () const |
|
DayCounter | dayCounter () const override |
|
Calendar | calendar () const override |
|
Natural | settlementDays () const override |
|
BusinessDayConvention | businessDayConvention () const override |
|
QuantLib::VolatilityType | volatilityType () const override |
|
QuantLib::Real | displacement () const override |
|
|
QuantLib::Rate | minStrike () const override |
|
QuantLib::Rate | maxStrike () const override |
|
QuantLib::Volatility | volatilityImpl (Time length, QuantLib::Rate strike) const override |
|
◆ StrippedYoYInflationOptionletVol()
StrippedYoYInflationOptionletVol |
( |
Natural |
settlementDays, |
|
|
const Calendar & |
calendar, |
|
|
BusinessDayConvention |
bdc, |
|
|
const DayCounter & |
dc, |
|
|
const Period & |
observationLag, |
|
|
Frequency |
frequency, |
|
|
bool |
indexIsInterpolated, |
|
|
const std::vector< Date > & |
yoyoptionletDates, |
|
|
const std::vector< Rate > & |
strikes, |
|
|
const std::vector< std::vector< Handle< Quote > > > & |
, |
|
|
VolatilityType |
type = ShiftedLognormal , |
|
|
Real |
displacement = 0.0 |
|
) |
| |
Definition at line 32 of file strippedyoyinflationoptionletvol.cpp.
43
45 registerWith(Settings::instance().evaluationDate());
47
50}
void registerWithMarketData()
Calendar calendar() const override
std::vector< Date > yoyoptionletDates_
Natural settlementDays() const override
std::vector< Time > yoyoptionletTimes_
QuantLib::Real displacement() const override
std::vector< std::vector< Volatility > > yoyoptionletVolatilities_
std::vector< std::vector< Handle< Quote > > > yoyoptionletVolQuotes_
std::vector< std::vector< Rate > > yoyoptionletStrikes_
BusinessDayConvention businessDayConvention_
◆ maxDate()
◆ performCalculations()
void performCalculations |
( |
| ) |
const |
|
override |
◆ update()
◆ yoyoptionletStrikes()
const vector< Rate > & yoyoptionletStrikes |
( |
Size |
i | ) |
const |
◆ yoyoptionletVolatilities()
const vector< Volatility > & yoyoptionletVolatilities |
( |
Size |
i | ) |
const |
◆ yoyoptionletFixingDates()
const vector< Date > & yoyoptionletFixingDates |
( |
| ) |
const |
◆ yoyoptionletFixingTimes()
const vector< Time > & yoyoptionletFixingTimes |
( |
| ) |
const |
◆ dayCounter()
DayCounter dayCounter |
( |
| ) |
const |
|
override |
◆ calendar()
Calendar calendar |
( |
| ) |
const |
|
override |
◆ settlementDays()
Natural settlementDays |
( |
| ) |
const |
|
override |
◆ businessDayConvention()
BusinessDayConvention businessDayConvention |
( |
| ) |
const |
|
override |
◆ volatilityType()
VolatilityType volatilityType |
( |
| ) |
const |
|
override |
◆ displacement()
Real displacement |
( |
| ) |
const |
|
override |
◆ minStrike()
◆ maxStrike()
◆ volatilityImpl()
Volatility volatilityImpl |
( |
Time |
length, |
|
|
QuantLib::Rate |
strike |
|
) |
| const |
|
overrideprotected |
Definition at line 85 of file strippedyoyinflationoptionletvol.cpp.
85 {
86 calculate();
87
93 QuantLib::ext::shared_ptr<LinearInterpolation> tmp(new LinearInterpolation(
95 vol[i] = tmp->operator()(strike, true);
96 }
97
99 QuantLib::ext::shared_ptr<LinearInterpolation> timeVolInterpolator(
100 new LinearInterpolation(yoyoptionletTimes.begin(), yoyoptionletTimes.end(), vol.begin()));
101 return timeVolInterpolator->operator()(length, true);
102}
const std::vector< Time > & yoyoptionletFixingTimes() const
const std::vector< Volatility > & yoyoptionletVolatilities(Size i) const
◆ checkInputs()
void checkInputs |
( |
| ) |
const |
|
private |
Definition at line 52 of file strippedyoyinflationoptionletvol.cpp.
52 {
53 if (
type_ == Normal) {
54 QL_REQUIRE(
displacement_ == 0.0,
"non-null displacement is not allowed with Normal model");
55 }
56
60 << ") and number of volatility rows ("
66 "non increasing option dates: " << io::ordinal(i) <<
" is " <<
yoyoptionletDates_[i - 1] <<
", "
68
74 "non increasing strikes: " << io::ordinal(j) <<
" is " << io::rate(
yoyoptionletStrikes_[0][j - 1])
75 << ", " << io::ordinal(j + 1) << " is "
77}
◆ registerWithMarketData()
void registerWithMarketData |
( |
| ) |
|
|
private |
◆ calendar_
◆ settlementDays_
◆ businessDayConvention_
BusinessDayConvention businessDayConvention_ |
|
private |
◆ dc_
◆ type_
◆ displacement_
◆ nYoYOptionletDates_
◆ yoyoptionletDates_
std::vector<Date> yoyoptionletDates_ |
|
private |
◆ yoyoptionletTimes_
std::vector<Time> yoyoptionletTimes_ |
|
private |
◆ yoyoptionletStrikes_
std::vector<std::vector<Rate> > yoyoptionletStrikes_ |
|
private |
◆ nStrikes_
◆ yoyoptionletVolQuotes_
std::vector<std::vector<Handle<Quote> > > yoyoptionletVolQuotes_ |
|
private |
◆ yoyoptionletVolatilities_
std::vector<std::vector<Volatility> > yoyoptionletVolatilities_ |
|
mutableprivate |