23#ifndef quantext_black_variance_surface_sparse_hpp
24#define quantext_black_variance_surface_sparse_hpp
26#include <ql/math/interpolations/linearinterpolation.hpp>
27#include <ql/termstructures/volatility/equityfx/blackvoltermstructure.hpp>
28#include <ql/time/daycounters/actual365fixed.hpp>
40 const std::vector<QuantLib::Date>& dates,
const std::vector<QuantLib::Real>&
strikes,
41 const std::vector<QuantLib::Volatility>& volatilities,
42 const QuantLib::DayCounter&
dayCounter,
bool lowerStrikeConstExtrap =
true,
43 bool upperStrikeConstExtrap =
true,
bool timeFlatExtrapolation =
false);
48 QuantLib::Date
maxDate()
const override {
return QuantLib::Date::maxDate(); }
54 QuantLib::Real
minStrike()
const override {
return 0; }
55 QuantLib::Real
maxStrike()
const override {
return QL_MAX_REAL; }
60 virtual void accept(QuantLib::AcyclicVisitor&)
override;
64 virtual QuantLib::Real
blackVarianceImpl(QuantLib::Time t, QuantLib::Real strike)
const override;
72 QuantLib::Visitor<BlackVarianceSurfaceSparse>* v1 =
73 dynamic_cast<QuantLib::Visitor<BlackVarianceSurfaceSparse>*
>(&v);
77 QuantLib::BlackVarianceTermStructure::accept(v);
virtual QuantLib::Real blackVarianceImpl(QuantLib::Time t, QuantLib::Real strike) const override
virtual void accept(QuantLib::AcyclicVisitor &) override
QuantLib::Real minStrike() const override
QuantLib::DayCounter dayCounter() const override
QuantLib::Real maxStrike() const override
QuantLib::Date maxDate() const override
bool timeFlatExtrapolation_
const QuantLib::Date & referenceDate() const override
std::vector< std::vector< QuantLib::Real > > strikes() const
QuantLib::DayCounter dayCounter() const
const QuantLib::Date & referenceDate() const