25#include <ql/instruments/nonstandardswaption.hpp>
26#include <ql/instruments/swaption.hpp>
27#include <ql/methods/finitedifferences/solvers/fdmbackwardsolver.hpp>
28#include <ql/pricingengines/genericmodelengine.hpp>
35 const Handle<YieldTermStructure>& discountCurve = Handle<YieldTermStructure>(),
36 const Size americanExerciseTimeStepsPerYear = 24);
41 static bool instrumentIsHandled(
const std::vector<Leg>& legs,
const std::vector<bool>& payer,
42 const std::vector<Currency>& currency,
const QuantLib::ext::shared_ptr<Exercise>& exercise,
43 const Settlement::Type& settlementType,
const Settlement::Method& settlementMethod,
44 std::vector<std::string>& messages);
53 const Handle<YieldTermStructure>& discountCurve)
const;
60 const Handle<YieldTermStructure>&)>
69 QuantLib::ext::shared_ptr<LgmBackwardSolver>
solver_;
77 mutable QuantLib::ext::shared_ptr<Exercise>
exercise_;
87 :
public QuantLib::GenericEngine<MultiLegOption::arguments, MultiLegOption::results>,
91 const Real
sx,
const Size nx,
92 const Handle<YieldTermStructure>& discountCurve = Handle<YieldTermStructure>(),
93 const Size americanExerciseTimeStepsPerYear = 24);
96 const QuantLib::FdmSchemeDesc scheme = QuantLib::FdmSchemeDesc::Douglas(),
97 const Size stateGridPoints = 64,
const Size timeStepsPerYear = 24,
98 const Real mesherEpsilon = 1E-4,
99 const Handle<YieldTermStructure>& discountCurve = Handle<YieldTermStructure>(),
100 const Size americanExerciseTimeStepsPerYear = 24);
109 const Real
sx,
const Size nx,
110 const Handle<YieldTermStructure>& discountCurve = Handle<YieldTermStructure>(),
111 const Size americanExerciseTimeStepsPerYear = 24);
114 const QuantLib::FdmSchemeDesc scheme = QuantLib::FdmSchemeDesc::Douglas(),
115 const Size stateGridPoints = 64,
const Size timeStepsPerYear = 24,
116 const Real mesherEpsilon = 1E-4,
117 const Handle<YieldTermStructure>& discountCurve = Handle<YieldTermStructure>(),
118 const Size americanExerciseTimeStepsPerYear = 24);
124 :
public QuantLib::GenericEngine<NonstandardSwaption::arguments, NonstandardSwaption::results>,
128 const Size ny,
const Real
sx,
const Size nx,
129 const Handle<YieldTermStructure>& discountCurve = Handle<YieldTermStructure>(),
130 const Size americanExerciseTimeStepsPerYear = 24);
133 const Real maxTime = 50.0,
134 const QuantLib::FdmSchemeDesc scheme = QuantLib::FdmSchemeDesc::Douglas(),
135 const Size stateGridPoints = 64,
const Size timeStepsPerYear = 24,
136 const Real mesherEpsilon = 1E-4,
137 const Handle<YieldTermStructure>& discountCurve = Handle<YieldTermStructure>(),
138 const Size americanExerciseTimeStepsPerYear = 24);
QuantLib::ext::shared_ptr< LgmBackwardSolver > solver_
Handle< YieldTermStructure > discountCurve_
std::vector< Currency > currency_
CashflowInfo buildCashflowInfo(const Size i, const Size j) const
QuantLib::ext::shared_ptr< Exercise > exercise_
std::map< std::string, boost::any > additionalResults_
Size americanExerciseTimeStepsPerYear_
static bool instrumentIsHandled(const MultiLegOption &m, std::vector< std::string > &messages)
std::vector< bool > payer_
Settlement::Method settlementMethod_
Settlement::Type settlementType_
void calculate() const override
void calculate() const override
void calculate() const override
interface for LGM1F backward solver
vectorised lgm model calculations
multi leg option instrument
JY INF index sigma component.
Real couponRatio(const Real time) const
bool isPartOfUnderlying(const Real optionTime) const
Real belongsToUnderlyingMaxTime_
Real exactEstimationTime_
std::function< RandomVariable(const LgmVectorised &, const Real, const RandomVariable &, const Handle< YieldTermStructure > &)> calculator_
bool mustBeEstimated(const Real optionTime) const
bool canBeEstimated(const Real optionTime) const
Real requiredSimulationTime() const
RandomVariable pv(const LgmVectorised &lgm, const Real t, const RandomVariable &state, const Handle< YieldTermStructure > &discountCurve) const