21#include <ql/cashflows/simplecashflow.hpp>
28 const Handle<CrossAssetModel>& model,
const Currency& domesticCcy,
const Currency& foreignCcy,
30 const Size calibrationSamples,
const Size pricingSamples,
const Size calibrationSeed,
const Size pricingSeed,
31 const Size polynomOrder,
const LsmBasisSystem::PolynomialType polynomType,
32 const SobolBrownianGenerator::Ordering ordering,
const SobolRsg::DirectionIntegers directionIntegers,
33 const std::vector<Handle<YieldTermStructure>>& discountCurves,
const std::vector<Date>& simulationDates,
34 const std::vector<Size>& externalModelIndices,
const bool minimalObsDate,
const RegressorModel regressorModel,
35 const Real regressionVarianceCutoff)
36 :
McMultiLegBaseEngine(model, calibrationPathGenerator, pricingPathGenerator, calibrationSamples, pricingSamples,
37 calibrationSeed, pricingSeed, polynomOrder, polynomType, ordering, directionIntegers,
38 discountCurves, simulationDates, externalModelIndices, minimalObsDate, regressorModel,
39 regressionVarianceCutoff),
40 domesticCcy_(domesticCcy), foreignCcy_(foreignCcy), npvCcy_(npvCcy) {
42 for (
auto const& h : discountCurves)
48 Leg foreignLeg{QuantLib::ext::make_shared<SimpleCashFlow>(
arguments_.nominal1,
arguments_.payDate)};
49 Leg domesticLeg{QuantLib::ext::make_shared<SimpleCashFlow>(
arguments_.nominal2,
arguments_.payDate)};
51 leg_ = {foreignLeg, domesticLeg};
63 fxSpot =
model_->fxbs(npvCcyIndex - 1)->fxSpotToday()->value();
const Instrument::results * results_
void calculate() const override
const Currency domesticCcy_
McCamFxForwardEngine(const Handle< CrossAssetModel > &model, const Currency &domesticCcy, const Currency &foreignCcy, const Currency &npvCcy, const SequenceType calibrationPathGenerator, const SequenceType pricingPathGenerator, const Size calibrationSamples, const Size pricingSamples, const Size calibrationSeed, const Size pricingSeed, const Size polynomOrder, const LsmBasisSystem::PolynomialType polynomType, const SobolBrownianGenerator::Ordering ordering=SobolBrownianGenerator::Steps, const SobolRsg::DirectionIntegers directionIntegers=SobolRsg::JoeKuoD7, const std::vector< Handle< YieldTermStructure > > &discountCurves=std::vector< Handle< YieldTermStructure > >(), const std::vector< Date > &simulationDates=std::vector< Date >(), const std::vector< Size > &externalModelIndices=std::vector< Size >(), const bool minimalObsDate=true, const RegressorModel regressorModel=RegressorModel::Simple, const Real regressionVarianceCutoff=Null< Real >())
const Currency foreignCcy_
std::vector< Currency > currency_
QuantLib::ext::shared_ptr< Exercise > exercise_
Real resultUnderlyingNpv_
Handle< CrossAssetModel > model_
QuantLib::ext::shared_ptr< AmcCalculator > amcCalculator() const
std::vector< bool > payer_
bool includeSettlementDateFlows_
MC CAM engine for FX Forward instrument.
Swap::arguments * arguments_