24#include <ql/instruments/payoffs.hpp>
25#include <ql/methods/finitedifferences/meshers/fdmmesher.hpp>
26#include <ql/methods/finitedifferences/utilities/fdmshoutloginnervaluecalculator.hpp>
27#include <ql/pricingengines/blackformula.hpp>
28#include <ql/termstructures/volatility/equityfx/blackvoltermstructure.hpp>
36 ext::shared_ptr<EscrowedDividendAdjustment> escrowedDividendAdj,
38 ext::shared_ptr<PlainVanillaPayoff> payoff,
39 ext::shared_ptr<FdmMesher> mesher,
41 : blackVolatility_(
std::move(blackVolatility)),
42 escrowedDividendAdj_(
std::move(escrowedDividendAdj)),
43 maturity_(maturity), payoff_(
std::move(payoff)),
44 mesher_(
std::move(mesher)), direction_(direction) {}
60 const Real fwd = s_t*qf/df;
65 payoff_->optionType(), s_t, fwd, stdDev, df);
72 return std::max(0.0, npv + intrinsic*df);
Real innerValue(const FdmLinearOpIterator &iter, Time t) override
FdmShoutLogInnerValueCalculator(Handle< BlackVolTermStructure > blackVolatility, ext::shared_ptr< EscrowedDividendAdjustment > escrowedDividendAdj, Time maturity, ext::shared_ptr< PlainVanillaPayoff > payoff, ext::shared_ptr< FdmMesher > mesher, Size direction)
Real avgInnerValue(const FdmLinearOpIterator &iter, Time t) override
const ext::shared_ptr< PlainVanillaPayoff > payoff_
const ext::shared_ptr< FdmMesher > mesher_
const ext::shared_ptr< EscrowedDividendAdjustment > escrowedDividendAdj_
const Handle< BlackVolTermStructure > blackVolatility_
Shared handle to an observable.
Real Time
continuous quantity with 1-year units
Real DiscountFactor
discount factor between dates
Real Volatility
volatility
std::size_t Size
size of a container
Real blackFormula(Option::Type optionType, Real strike, Real forward, Real stdDev, Real discount, Real displacement)