25#ifndef quantext_black_variance_surface_delta_hpp
26#define quantext_black_variance_surface_delta_hpp
28#include <ql/experimental/fx/deltavolquote.hpp>
29#include <ql/math/interpolation.hpp>
30#include <ql/math/matrix.hpp>
31#include <ql/termstructures/volatility/equityfx/blackvariancecurve.hpp>
32#include <ql/termstructures/volatility/equityfx/blackvoltermstructure.hpp>
33#include <ql/termstructures/yieldtermstructure.hpp>
34#include <ql/time/calendar.hpp>
35#include <ql/time/daycounter.hpp>
49 bool flatExtrapolation =
false);
51 Volatility
volatility(Real strike)
const override;
87 const std::vector<Real>& callDeltas,
bool hasAtm,
const Matrix& blackVolMatrix,
88 const DayCounter& dayCounter,
const Calendar& cal,
const Handle<Quote>& spot,
89 const Handle<YieldTermStructure>& domesticTS,
90 const Handle<YieldTermStructure>& foreignTS,
91 DeltaVolQuote::DeltaType dt = DeltaVolQuote::DeltaType::Spot,
92 DeltaVolQuote::AtmType at = DeltaVolQuote::AtmType::AtmDeltaNeutral,
93 boost::optional<QuantLib::DeltaVolQuote::DeltaType> atmDeltaType = boost::none,
94 const Period& switchTenor = 0 * Days,
95 DeltaVolQuote::DeltaType ltdt = DeltaVolQuote::DeltaType::Fwd,
96 DeltaVolQuote::AtmType ltat = DeltaVolQuote::AtmType::AtmDeltaNeutral,
97 boost::optional<QuantLib::DeltaVolQuote::DeltaType> longTermAtmDeltaType = boost::none,
100 bool flatExtrapolation =
true);
104 Date
maxDate()
const override {
return Date::maxDate(); }
113 virtual void accept(AcyclicVisitor&)
override;
118 const std::vector<QuantLib::Date>&
dates()
const {
return dates_; }
127 QuantLib::ext::shared_ptr<FxSmileSection>
blackVolSmile(Time t)
const;
129 QuantLib::ext::shared_ptr<FxSmileSection>
blackVolSmile(
const QuantLib::Date& d)
const;
132 virtual Volatility
blackVolImpl(Time t, Real strike)
const override;
147 DeltaVolQuote::DeltaType
dt_;
148 DeltaVolQuote::AtmType
at_;
167 Visitor<BlackVolatilitySurfaceDelta>* v1 =
dynamic_cast<Visitor<BlackVolatilitySurfaceDelta>*
>(&v);
171 BlackVolatilityTermStructure::accept(v);
QuantLib::ext::shared_ptr< FxSmileSection > blackVolSmile(const QuantLib::Date &d) const
boost::optional< QuantLib::DeltaVolQuote::DeltaType > atmDeltaType_
DeltaVolQuote::DeltaType dt_
std::vector< Date > dates_
std::vector< Real > putDeltas_
DeltaVolQuote::DeltaType ltdt_
std::vector< QuantLib::ext::shared_ptr< BlackVarianceCurve > > interpolators_
Handle< YieldTermStructure > foreignTS_
Real minStrike() const override
std::vector< Time > times_
virtual void accept(AcyclicVisitor &) override
std::vector< Real > callDeltas_
Handle< YieldTermStructure > domesticTS_
QuantLib::ext::shared_ptr< FxSmileSection > blackVolSmile(Time t) const
Return an FxSmile for the time t.
Date maxDate() const override
boost::optional< QuantLib::DeltaVolQuote::DeltaType > longTermAtmDeltaType_
InterpolatedSmileSection::InterpolationMethod interpolationMethod_
virtual Volatility blackVolImpl(Time t, Real strike) const override
const std::vector< QuantLib::Date > & dates() const
DeltaVolQuote::AtmType at_
Real maxStrike() const override
Real forward(Time t) const
DeltaVolQuote::AtmType ltat_
const Volatility volatility() const
Volatility volatility(Real strike) const override
ConstantSmileSection(const Volatility vol)
ctor
std::vector< Real > strikes_
Volatility volatility(Real strike) const override
const std::vector< Real > & strikes() const
InterpolationMethod
Supported interpolation methods.
std::vector< Volatility > vols_
const std::vector< Volatility > & volatilities() const
Interpolation interpolator_
FX smile section assuming a strike/volatility space.