21#include <ql/math/interpolations/bilinearinterpolation.hpp>
22#include <ql/math/interpolations/flatextrapolation2d.hpp>
23#include <ql/termstructures/inflationtermstructure.hpp>
28 const std::vector<Date>& optionDates,
29 const std::vector<Real>&
strikes,
30 const std::vector<std::vector<Handle<Quote>>>& volSpreads)
31 : YoYOptionletVolatilitySurface(baseVol->settlementDays(), baseVol->calendar(), baseVol->businessDayConvention(),
32 baseVol->dayCounter(), baseVol->observationLag(), baseVol->frequency(),
33 baseVol->indexIsInterpolated(), baseVol->volatilityType(), baseVol->displacement()),
34 baseVol_(baseVol), optionDates_(optionDates), strikes_(
strikes), volSpreads_(volSpreads) {
38 for (
auto const& v : volSpreads)
39 for (
auto const& q : v)
57 if (indexIsInterpolated())
62 for (Size k = 0; k <
strikes_.size(); ++k) {
73 YoYOptionletVolatilitySurface::update();
Handle< YoYOptionletVolatilitySurface > baseVol_
std::vector< Date > optionDates_
void performCalculations() const override
Rate maxStrike() const override
Rate minStrike() const override
std::vector< Real > strikes_
void deepUpdate() override
const Date & referenceDate() const override
Interpolation2D volSpreadInterpolation_
std::vector< Real > optionTimes_
Volatility volatilityImpl(Time length, Rate strike) const override
Date maxDate() const override
std::vector< std::vector< Handle< Quote > > > volSpreads_
SpreadedYoYVolatilitySurface(const Handle< YoYOptionletVolatilitySurface > &baseVol, const std::vector< Date > &optionDates, const std::vector< Real > &strikes, const std::vector< std::vector< Handle< Quote > > > &volSpreads)
Time maxTime() const override