31#include <ql/instruments/vanillaoption.hpp>
84 void build(
const QuantLib::ext::shared_ptr<ore::data::EngineFactory>&)
override;
87 std::map<AssetClass, std::set<std::string>>
88 underlyingIndices(
const QuantLib::ext::shared_ptr<ReferenceDataManager>& referenceDataManager =
nullptr)
const override;
93 const std::vector<QuantLib::ext::shared_ptr<QuantLib::VanillaOption>>&
options()
const {
return options_; }
112 std::vector<QuantLib::ext::shared_ptr<QuantLib::VanillaOption>>
options_;
113 std::vector<QuantLib::ext::shared_ptr<QuantExt::GenericIndex>>
indices_;
129 const std::vector<QuantLib::ext::shared_ptr<QuantLib::VanillaOption>>& options,
130 const std::vector<Real>& positions,
131 const std::vector<Real>& weights,
132 const std::vector<Handle<Quote>>& fxConversion = {});
140 void fetchResults(
const QuantLib::PricingEngine::results*)
const override;
145 std::vector<QuantLib::ext::shared_ptr<QuantLib::VanillaOption>>
options_;
155 std::vector<QuantLib::ext::shared_ptr<QuantLib::VanillaOption>>
options_;
169 :
public QuantLib::GenericEngine<EquityOptionPositionInstrumentWrapper::arguments,
170 EquityOptionPositionInstrumentWrapper::results> {};
Serializable object holding generic trade data, reporting dimensions.
Serializable Equity Option Position Data.
const std::vector< EquityOptionUnderlyingData > & underlyings() const
EquityOptionPositionData(const Real quantity, const std::vector< EquityOptionUnderlyingData > &underlyings)
void fromXML(XMLNode *node) override
XMLNode * toXML(XMLDocument &doc) const override
std::vector< EquityOptionUnderlyingData > underlyings_
EquityOptionPositionData()
Serializable Equity Option Position.
const std::vector< QuantLib::ext::shared_ptr< QuantExt::GenericIndex > > historicalPriceIndices()
std::vector< QuantLib::ext::shared_ptr< QuantLib::VanillaOption > > options_
const std::vector< std::string > & currencies() const
std::vector< Real > positions_
std::vector< QuantLib::ext::shared_ptr< QuantExt::GenericIndex > > indices_
std::map< AssetClass, std::set< std::string > > underlyingIndices(const QuantLib::ext::shared_ptr< ReferenceDataManager > &referenceDataManager=nullptr) const override
EquityOptionPosition(const Envelope &env, const EquityOptionPositionData &data)
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 > & positions() const
const std::vector< QuantLib::ext::shared_ptr< QuantLib::VanillaOption > > & options() const
const std::vector< Real > & weights() const
std::vector< Real > weights_
void build(const QuantLib::ext::shared_ptr< ore::data::EngineFactory > &) override
bool isSingleCurrency() const
EquityOptionPositionData data_
const EquityOptionPositionData & data() const
std::vector< std::string > currencies_
std::vector< QuantLib::ext::shared_ptr< QuantLib::VanillaOption > > options_
std::vector< Real > positions_
std::vector< Handle< Quote > > fxConversion_
std::vector< Real > weights_
Handle< Quote > npvCcyConversion_
void validate() const override
void calculate() const override
Equity Option Position instrument wrapper.
void fetchResults(const QuantLib::PricingEngine::results *) const override
std::vector< QuantLib::ext::shared_ptr< QuantLib::VanillaOption > > options_
std::vector< Real > positions_
bool isExpired() const override
std::vector< Handle< Quote > > fxConversion_
std::vector< Real > weights_
Handle< Quote > npvCcyConversion_
void setupArguments(QuantLib::PricingEngine::arguments *) const override
void setNpvCurrencyConversion(const Handle< Quote > &npvCcyConversion)
Serializable Equity Option Underlying Data, this represents one underlying in EquityOptionPositionDat...
EquityOptionUnderlyingData()
const EquityUnderlying & underlying() const
void fromXML(XMLNode *node) override
XMLNode * toXML(XMLDocument &doc) const override
EquityUnderlying underlying_
EquityOptionUnderlyingData(const EquityUnderlying &underlying, const OptionData &optionData, const Real strike)
const OptionData & optionData() const
Serializable object holding option data.
Small XML Document wrapper class.
Base class for all serializable classes.
Serializable Credit Default Swap.
trade option data model and serialization
base trade data model and serialization