19#include <boost/make_shared.hpp>
26#include <ql/errors.hpp>
34 const QuantLib::ext::shared_ptr<ore::data::Underlying>& underlying,
TradeStrike strike,
35 QuantLib::Date forwardDate,
const QuantLib::ext::shared_ptr<QuantLib::Index>& index,
36 const std::string& indexName)
39 underlying_(underlying) {
44 QL_REQUIRE(
quantity_ > 0,
"Equity futures option requires a positive quantity");
55 QL_REQUIRE(exerciseType == Exercise::European,
"only european option currently supported");
63 QL_REQUIRE(eqNode,
"No EquityFutureOptionData Node");
97std::map<AssetClass, std::set<std::string>>
Serializable object holding generic trade data, reporting dimensions.
QuantLib::ext::shared_ptr< ore::data::Underlying > underlying_
const std::string & name() const
std::map< AssetClass, std::set< std::string > > underlyingIndices(const QuantLib::ext::shared_ptr< ReferenceDataManager > &referenceDataManager=nullptr) const override
Add underlying Equity names.
virtual void fromXML(XMLNode *node) override
virtual XMLNode * toXML(XMLDocument &doc) const override
EquityFutureOption()
Default constructor.
void build(const QuantLib::ext::shared_ptr< EngineFactory > &) override
Build QuantLib/QuantExt instrument, link pricing engine.
Serializable object holding option data.
void setAutomaticExercise(bool automaticExercise)
const string & style() const
virtual void fromXML(XMLNode *node) override
virtual XMLNode * toXML(XMLDocument &doc) const override
virtual void fromXML(XMLNode *node) override
virtual XMLNode * toXML(XMLDocument &doc) const override
XMLNode * toXML(XMLDocument &doc) const
void fromXML(XMLNode *node, const bool isRequired=true, const bool allowYieldStrike=false)
const QuantLib::ext::shared_ptr< Underlying > & underlying()
void fromXML(XMLNode *node) override
Serializable Vanilla Option.
QuantLib::Date forwardDate_
Store the (optional) forward date.
void build(const QuantLib::ext::shared_ptr< EngineFactory > &) override
Build QuantLib/QuantExt instrument, link pricing engine.
Small XML Document wrapper class.
XMLNode * allocNode(const string &nodeName)
util functions that wrap rapidxml
static Real getChildValueAsDouble(XMLNode *node, const string &name, bool mandatory=false, double defaultValue=0.0)
static string getChildValue(XMLNode *node, const string &name, bool mandatory=false, const string &defaultValue=string())
static XMLNode * getChildNode(XMLNode *n, const string &name="")
static XMLNode * addChild(XMLDocument &doc, XMLNode *n, const string &name)
static void appendNode(XMLNode *parent, XMLNode *child)
EQ Futures Option data model and serialization.
Exercise::Type parseExerciseType(const std::string &s)
Convert text to QuantLib::Exercise::Type.
Date parseDate(const string &s)
Convert std::string to QuantLib::Date.
Map text representations to QuantLib/QuantExt types.
Classes and functions for log message handling.
std::string to_string(const LocationInfo &l)
Serializable Credit Default Swap.
Map text representations to QuantLib/QuantExt types.
string conversion utilities