24#ifndef quantext_black_inverted_vol_termstructure_hpp
25#define quantext_black_inverted_vol_termstructure_hpp
27#include <ql/termstructures/volatility/equityfx/blackvoltermstructure.hpp>
59 void update()
override { notifyObservers(); }
65 if (
min == QL_MIN_REAL ||
min == 0)
68 return 1 /
vol_->maxStrike();
72 if (
min == QL_MIN_REAL ||
min == 0)
80 virtual void accept(AcyclicVisitor&)
override;
84 Real
invertedStrike(Real strike)
const {
return (strike == 0.0 || strike == Null<Real>()) ? strike : 1.0 / strike; }
89 Handle<BlackVolTermStructure>
vol_;
94 Visitor<BlackInvertedVolTermStructure>* v1 =
dynamic_cast<Visitor<BlackInvertedVolTermStructure>*
>(&v);
Black volatility surface that inverts an existing surface.
Real invertedStrike(Real strike) const
Calendar calendar() const override
const Handle< BlackVolTermStructure > & underlyingVol() const
return the underlying vol surface
Handle< BlackVolTermStructure > vol_
const Date & referenceDate() const override
Real minStrike() const override
BlackInvertedVolTermStructure(const Handle< BlackVolTermStructure > &vol)
Constructor takes a BlackVolTermStructure and takes everything from that.
virtual void accept(AcyclicVisitor &) override
virtual Volatility blackVolImpl(Time t, Real strike) const override
Natural settlementDays() const override
Date maxDate() const override
virtual Real blackVarianceImpl(Time t, Real strike) const override
Real maxStrike() const override
CompiledFormula min(CompiledFormula x, const CompiledFormula &y)