24#ifndef quantlib_swaption_gaussian1d_swaption_volatility_hpp
25#define quantlib_swaption_gaussian1d_swaption_volatility_hpp
27#include <ql/termstructures/volatility/swaption/swaptionvolstructure.hpp>
28#include <ql/time/period.hpp>
29#include <ql/indexes/swapindex.hpp>
30#include <ql/models/shortrate/onefactormodels/gaussian1dmodel.hpp>
31#include <ql/pricingengines/swaption/gaussian1dswaptionengine.hpp>
41 ext::shared_ptr<SwapIndex> indexBase,
42 const ext::shared_ptr<Gaussian1dModel>& model,
44 ext::shared_ptr<Gaussian1dSwaptionEngine> swaptionEngine =
45 ext::shared_ptr<Gaussian1dSwaptionEngine>());
66 ext::shared_ptr<Gaussian1dModel>
model_;
67 ext::shared_ptr<Gaussian1dSwaptionEngine>
engine_;
79 return h * t2 + (1.0 - h) * t1;
83 return (
operator()(date + 1E-6) -
operator()(date)) * 1E6;
std::int_fast32_t serial_type
serial number type
static Date maxDate()
latest allowed date
const TermStructure & ts_
Real operator()(Real date) const
DateHelper(const TermStructure &ts, const Time t)
Real derivative(Real date) const
ext::shared_ptr< Gaussian1dSwaptionEngine > engine_
Real minStrike() const override
the minimum strike for which the term structure can return vols
ext::shared_ptr< SmileSection > smileSectionImpl(const Date &, const Period &) const override
Volatility volatilityImpl(const Date &, const Period &, Rate) const override
const Period maxSwapTenor_
Date maxDate() const override
the latest date for which the curve can return values
ext::shared_ptr< Gaussian1dModel > model_
ext::shared_ptr< SwapIndex > indexBase_
Real maxStrike() const override
the maximum strike for which the term structure can return vols
const Period & maxSwapTenor() const override
the largest length for which the term structure can return vols
Swaption-volatility structure
Basic term-structure functionality.
Time timeFromReference(const Date &date) const
date/time conversion
BusinessDayConvention
Business Day conventions.
Real Time
continuous quantity with 1-year units
Real Volatility
volatility