21#include <ql/methods/montecarlo/lsmbasissystem.hpp>
35 const Handle<YieldTermStructure>& discountCurve,
36 const std::vector<Date>& simulationDates,
37 const std::vector<Size>& externalModelIndices) {
39 return QuantLib::ext::make_shared<QuantExt::McLgmSwapEngine>(
53 const std::string& discountCurveName,
54 const std::string& securitySpread) {
55 DLOG(
"Building AMC Swap engine for ccy " << ccy <<
" (from externally given CAM)");
57 QL_REQUIRE(
cam_ !=
nullptr,
"LgmAmcSwapEngineBuilder::engineImpl: cam is null");
58 Size currIdx =
cam_->ccyIndex(ccy);
59 auto lgm =
cam_->lgm(currIdx);
60 std::vector<Size> modelIndex(1,
cam_->pIdx(CrossAssetModel::AssetType::IR, currIdx));
63 Handle<YieldTermStructure> discountCurve;
Engine builder for Swaps.
const std::vector< Date > simulationDates_
const QuantLib::ext::shared_ptr< QuantExt::CrossAssetModel > cam_
virtual QuantLib::ext::shared_ptr< PricingEngine > engineImpl(const Currency &ccy, const std::string &discountCurve, const std::string &securitySpread) override
QuantLib::ext::shared_ptr< PricingEngine > buildMcEngine(const QuantLib::ext::shared_ptr< QuantExt::LGM > &lgm, const Handle< YieldTermStructure > &discountCurve, const std::vector< Date > &simulationDates, const std::vector< Size > &externalModelIndices)
std::string engineParameter(const std::string &p, const std::vector< std::string > &qualifiers={}, const bool mandatory=true, const std::string &defaultValue="") const
SequenceType parseSequenceType(const std::string &s)
Convert string to sequence type.
QuantLib::LsmBasisSystem::PolynomialType parsePolynomType(const std::string &s)
Convert text to QuantLib::LsmBasisSystem::PolynomialType.
bool parseBool(const string &s)
Convert text to bool.
SobolRsg::DirectionIntegers parseSobolRsgDirectionIntegers(const std::string &s)
Convert text to QuantLib::SobolRsg::DirectionIntegers.
Real parseRealOrNull(const string &s)
Convert text to Real, empty string to Null<Real>()
QuantExt::McMultiLegBaseEngine::RegressorModel parseRegressorModel(const std::string &s)
Convert text to QuantExt::McMultiLegBaseEngine::RegressorModel.
SobolBrownianGenerator::Ordering parseSobolBrownianGeneratorOrdering(const std::string &s)
Convert text to QuantLib::SobolBrownianGenerator::Ordering.
Integer parseInteger(const string &s)
Convert text to QuantLib::Integer.
#define DLOG(text)
Logging Macro (Level = Debug)
Serializable Credit Default Swap.