21#include <ql/math/interpolations/bilinearinterpolation.hpp>
22#include <ql/math/interpolations/flatextrapolation2d.hpp>
23#include <ql/termstructures/inflationtermstructure.hpp>
29 const std::vector<Date>& optionDates,
30 const std::vector<Real>&
strikes,
31 const std::vector<std::vector<Handle<Quote>>>& volSpreads)
33 baseVol->dayCounter(), baseVol->observationLag(), baseVol->frequency(),
34 baseVol->indexIsInterpolated(), baseVol->capFloorStartDate(),
35 baseVol->volatilityType(), baseVol->displacement()),
36 baseVol_(baseVol), optionDates_(optionDates), strikes_(
strikes), volSpreads_(volSpreads) {
40 for (
auto const& v : volSpreads)
41 for (
auto const& q : v)
60 for (Size k = 0; k <
strikes_.size(); ++k) {
71 CPIVolatilitySurface::update();
81 const QuantLib::Period& obsLag)
const {
83 return baseVol_->atmStrike(maturity, obsLag);
virtual double fixingTime(const QuantLib::Date &maturityDate) const
Computes the expiry time from the capFloorStartDate()
std::vector< Date > optionDates_
Handle< QuantExt::CPIVolatilitySurface > baseVol_
void performCalculations() const override
Rate maxStrike() const override
SpreadedCPIVolatilitySurface(const Handle< QuantExt::CPIVolatilitySurface > &baseVol, const std::vector< Date > &optionDates, const std::vector< Real > &strikes, const std::vector< std::vector< Handle< Quote > > > &volSpreads)
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_
Time maxTime() const override
QuantLib::Real atmStrike(const QuantLib::Date &maturity, const QuantLib::Period &obsLag=QuantLib::Period(-1, QuantLib::Days)) const override
some inflation related utilities.