58 void build(
const QuantLib::ext::shared_ptr<ore::data::EngineFactory>&)
override;
61 std::map<AssetClass, std::set<std::string>>
62 underlyingIndices(
const QuantLib::ext::shared_ptr<ReferenceDataManager>& referenceDataManager =
nullptr)
const override;
66 const std::vector<QuantLib::ext::shared_ptr<QuantExt::CommodityIndex>>&
indices()
const {
return indices_; }
77 std::vector<QuantLib::ext::shared_ptr<QuantExt::CommodityIndex>>
indices_;
91 const std::vector<QuantLib::ext::shared_ptr<QuantExt::CommodityIndex>>& commodities,
92 const std::vector<Real>& weights,
93 const std::vector<Handle<Quote>>& fxConversion = {});
98 void fetchResults(
const QuantLib::PricingEngine::results*)
const override;
106 std::vector<QuantLib::ext::shared_ptr<QuantExt::CommodityIndex>>
commodities_;
115 std::vector<QuantLib::ext::shared_ptr<QuantExt::CommodityIndex>>
commodities_;
128 :
public QuantLib::GenericEngine<CommodityPositionInstrumentWrapper::arguments,
129 CommodityPositionInstrumentWrapper::results> {};
Serializable Commodity Position Data.
const std::vector< CommodityUnderlying > & underlyings() const
void fromXML(XMLNode *node) override
XMLNode * toXML(XMLDocument &doc) const override
std::vector< CommodityUnderlying > underlyings_
CommodityPositionData(const Real quantity, const std::vector< CommodityUnderlying > &underlyings)
Serializable Commodity Position.
std::vector< QuantLib::ext::shared_ptr< QuantExt::CommodityIndex > > indices_
const std::vector< QuantLib::ext::shared_ptr< QuantExt::CommodityIndex > > & indices() const
const CommodityPositionData & data() const
std::map< AssetClass, std::set< std::string > > underlyingIndices(const QuantLib::ext::shared_ptr< ReferenceDataManager > &referenceDataManager=nullptr) const override
void fromXML(XMLNode *node) override
std::vector< Handle< Quote > > fxConversion_
void setNpvCurrencyConversion(const std::string &ccy, const Handle< Quote > &conversion)
XMLNode * toXML(XMLDocument &doc) const override
const std::vector< Real > & weights() const
CommodityPosition(const Envelope &env, const CommodityPositionData &data)
std::vector< Real > weights_
void build(const QuantLib::ext::shared_ptr< ore::data::EngineFactory > &) override
bool isSingleCurrency() const
CommodityPositionData data_
std::vector< QuantLib::ext::shared_ptr< QuantExt::CommodityIndex > > commodities_
std::vector< Handle< Quote > > fxConversion_
std::vector< Real > weights_
Handle< Quote > npvCcyConversion_
void validate() const override
void calculate() const override
Commodity Position instrument wrapper.
void fetchResults(const QuantLib::PricingEngine::results *) const override
bool isExpired() const override
std::vector< QuantLib::ext::shared_ptr< QuantExt::CommodityIndex > > commodities_
std::vector< Handle< Quote > > fxConversion_
std::vector< Real > weights_
Handle< Quote > npvCcyConversion_
void setupExpired() const override
void setupArguments(QuantLib::PricingEngine::arguments *) const override
void setNpvCurrencyConversion(const Handle< Quote > &npvCcyConversion)
Serializable object holding generic trade data, reporting dimensions.
Small XML Document wrapper class.
Base class for all serializable classes.
Serializable Credit Default Swap.
base trade data model and serialization