26#ifndef quantlib_fd_black_scholes_vanilla_engine_hpp
27#define quantlib_fd_black_scholes_vanilla_engine_hpp
29#include <ql/pricingengine.hpp>
30#include <ql/instruments/dividendvanillaoption.hpp>
31#include <ql/methods/finitedifferences/solvers/fdmbackwardsolver.hpp>
35 class FdmQuantoHelper;
36 class GeneralizedBlackScholesProcess;
38 QL_DEPRECATED_DISABLE_WARNING
48 QL_DEPRECATED_ENABLE_WARNING
53 ext::shared_ptr<GeneralizedBlackScholesProcess>,
56 Size dampingSteps = 0,
58 bool localVol =
false,
63 ext::shared_ptr<GeneralizedBlackScholesProcess>,
67 Size dampingSteps = 0,
69 bool localVol =
false,
74 ext::shared_ptr<GeneralizedBlackScholesProcess>,
75 ext::shared_ptr<FdmQuantoHelper> quantoHelper,
78 Size dampingSteps = 0,
80 bool localVol =
false,
85 ext::shared_ptr<GeneralizedBlackScholesProcess>,
87 ext::shared_ptr<FdmQuantoHelper> quantoHelper,
90 Size dampingSteps = 0,
92 bool localVol =
false,
99 ext::shared_ptr<GeneralizedBlackScholesProcess>
process_;
114 ext::shared_ptr<GeneralizedBlackScholesProcess> process);
117 const ext::shared_ptr<FdmQuantoHelper>& quantoHelper);
129 Real illegalLocalVolOverwrite);
132 const std::vector<Date>& dividendDates,
133 const std::vector<Real>& dividendAmounts);
138 operator ext::shared_ptr<PricingEngine>()
const;
140 ext::shared_ptr<GeneralizedBlackScholesProcess>
process_;
Finite-differences Black Scholes vanilla option engine.
Real illegalLocalVolOverwrite_
FdmSchemeDesc schemeDesc_
void calculate() const override
DividendSchedule dividends_
ext::shared_ptr< GeneralizedBlackScholesProcess > process_
ext::shared_ptr< FdmQuantoHelper > quantoHelper_
CashDividendModel cashDividendModel_
MakeFdBlackScholesVanillaEngine & withIllegalLocalVolOverwrite(Real illegalLocalVolOverwrite)
MakeFdBlackScholesVanillaEngine & withLocalVol(bool localVol)
MakeFdBlackScholesVanillaEngine & withCashDividendModel(FdBlackScholesVanillaEngine::CashDividendModel cashDividendModel)
Real illegalLocalVolOverwrite_
MakeFdBlackScholesVanillaEngine & withTGrid(Size tGrid)
FdBlackScholesVanillaEngine::CashDividendModel cashDividendModel_
MakeFdBlackScholesVanillaEngine & withDampingSteps(Size dampingSteps)
MakeFdBlackScholesVanillaEngine & withQuantoHelper(const ext::shared_ptr< FdmQuantoHelper > &quantoHelper)
MakeFdBlackScholesVanillaEngine & withXGrid(Size xGrid)
MakeFdBlackScholesVanillaEngine & withCashDividends(const std::vector< Date > ÷ndDates, const std::vector< Real > ÷ndAmounts)
DividendSchedule dividends_
ext::shared_ptr< GeneralizedBlackScholesProcess > process_
ext::shared_ptr< FdmQuantoHelper > quantoHelper_
MakeFdBlackScholesVanillaEngine & withFdmSchemeDesc(const FdmSchemeDesc &schemeDesc)
ext::shared_ptr< FdmSchemeDesc > schemeDesc_
template class providing a null value for a given type.
std::size_t Size
size of a container
std::vector< ext::shared_ptr< Dividend > > DividendSchedule
static FdmSchemeDesc Douglas()