26#ifndef quantlib_fd_heston_vanilla_engine_hpp
27#define quantlib_fd_heston_vanilla_engine_hpp
29#include <ql/instruments/dividendvanillaoption.hpp>
30#include <ql/models/equity/hestonmodel.hpp>
31#include <ql/pricingengines/genericmodelengine.hpp>
32#include <ql/methods/finitedifferences/solvers/fdmsolverdesc.hpp>
33#include <ql/methods/finitedifferences/solvers/fdmbackwardsolver.hpp>
34#include <ql/termstructures/volatility/equityfx/localvoltermstructure.hpp>
38 class FdmQuantoHelper;
40 QL_DEPRECATED_DISABLE_WARNING
51 DividendVanillaOption::arguments,
52 DividendVanillaOption::results> {
53 QL_DEPRECATED_ENABLE_WARNING
60 Size dampingSteps = 0,
62 ext::shared_ptr<LocalVolTermStructure> leverageFct = {},
63 Real mixingFactor = 1.0);
70 Size dampingSteps = 0,
72 ext::shared_ptr<LocalVolTermStructure> leverageFct = {},
73 Real mixingFactor = 1.0);
76 ext::shared_ptr<FdmQuantoHelper> quantoHelper,
80 Size dampingSteps = 0,
82 ext::shared_ptr<LocalVolTermStructure> leverageFct = {},
83 Real mixingFactor = 1.0);
87 ext::shared_ptr<FdmQuantoHelper> quantoHelper,
91 Size dampingSteps = 0,
93 ext::shared_ptr<LocalVolTermStructure> leverageFct = {},
94 Real mixingFactor = 1.0);
115 QL_DEPRECATED_DISABLE_WARNING
119 QL_DEPRECATED_ENABLE_WARNING
127 const ext::shared_ptr<FdmQuantoHelper>& quantoHelper);
139 ext::shared_ptr<LocalVolTermStructure>& leverageFct);
142 const std::vector<Date>& dividendDates,
143 const std::vector<Real>& dividendAmounts);
145 operator ext::shared_ptr<PricingEngine>()
const;
Finite-differences Heston vanilla option engine.
FdmSolverDesc getSolverDesc(Real equityScaleFactor) const
std::vector< Real > strikes_
const ext::shared_ptr< FdmQuantoHelper > quantoHelper_
void calculate() const override
const ext::shared_ptr< LocalVolTermStructure > leverageFct_
DividendSchedule dividends_
QL_DEPRECATED_DISABLE_WARNING std::vector< std::pair< DividendVanillaOption::arguments, DividendVanillaOption::results > > cachedArgs2results_
void enableMultipleStrikesCaching(const std::vector< Real > &strikes)
const FdmSchemeDesc schemeDesc_
Base class for some pricing engine on a particular model.
ext::shared_ptr< HestonModel > hestonModel_
MakeFdHestonVanillaEngine & withDampingSteps(Size dampingSteps)
MakeFdHestonVanillaEngine & withQuantoHelper(const ext::shared_ptr< FdmQuantoHelper > &quantoHelper)
MakeFdHestonVanillaEngine & withTGrid(Size tGrid)
MakeFdHestonVanillaEngine & withCashDividends(const std::vector< Date > ÷ndDates, const std::vector< Real > ÷ndAmounts)
DividendSchedule dividends_
ext::shared_ptr< FdmQuantoHelper > quantoHelper_
MakeFdHestonVanillaEngine & withVGrid(Size vGrid)
ext::shared_ptr< FdmSchemeDesc > schemeDesc_
MakeFdHestonVanillaEngine & withFdmSchemeDesc(const FdmSchemeDesc &schemeDesc)
MakeFdHestonVanillaEngine & withLeverageFunction(ext::shared_ptr< LocalVolTermStructure > &leverageFct)
MakeFdHestonVanillaEngine & withXGrid(Size xGrid)
ext::shared_ptr< LocalVolTermStructure > leverageFct_
std::size_t Size
size of a container
std::vector< ext::shared_ptr< Dividend > > DividendSchedule
static FdmSchemeDesc Hundsdorfer()