26#include <boost/make_shared.hpp>
45 virtual string keyImpl(
const Currency& forCcy,
const Currency& domCcy)
override {
46 return forCcy.code() + domCcy.code();
59 virtual QuantLib::ext::shared_ptr<PricingEngine>
engineImpl(
const Currency& forCcy,
const Currency& domCcy)
override {
60 string pair =
keyImpl(forCcy, domCcy);
61 string tmp =
engineParameter(
"includeSettlementDateFlows", {},
false,
"");
62 bool includeSettlementDateFlows = tmp ==
"" ? false :
parseBool(tmp);
63 return QuantLib::ext::make_shared<QuantExt::DiscountingFxForwardEngine>(
67 includeSettlementDateFlows);
76 const std::vector<Date>& simulationDates)
80 virtual QuantLib::ext::shared_ptr<PricingEngine>
engineImpl(
const Currency& forCcy,
const Currency& domCcy)
override;
83 const QuantLib::ext::shared_ptr<QuantExt::CrossAssetModel>
cam_;
Abstract template engine builder class.
Abstract template EngineBuilder class that can cache engines and coupon pricers.
FX forward engine builder for external cam, with additional simulation dates (AMC)
const std::vector< Date > simulationDates_
virtual QuantLib::ext::shared_ptr< PricingEngine > engineImpl(const Currency &forCcy, const Currency &domCcy) override
const QuantLib::ext::shared_ptr< QuantExt::CrossAssetModel > cam_
CamAmcFxForwardEngineBuilder(const QuantLib::ext::shared_ptr< QuantExt::CrossAssetModel > &cam, const std::vector< Date > &simulationDates)
QuantLib::ext::shared_ptr< Market > market_
const string & engine() const
Return the engine name.
const string & model() const
Return the model name.
std::string engineParameter(const std::string &p, const std::vector< std::string > &qualifiers={}, const bool mandatory=true, const std::string &defaultValue="") const
const string & configuration(const MarketContext &key)
Return a configuration (or the default one if key not found)
Engine Builder base class for FX Forwards.
FxForwardEngineBuilderBase(const std::string &model, const std::string &engine)
virtual string keyImpl(const Currency &forCcy, const Currency &domCcy) override
Engine Builder for FX Forwards.
virtual QuantLib::ext::shared_ptr< PricingEngine > engineImpl(const Currency &forCcy, const Currency &domCcy) override
bool parseBool(const string &s)
Convert text to bool.
Serializable Credit Default Swap.