31#include <ql/instruments/barriertype.hpp>
46 const std::string&
calendar = std::string())
52 void build(
const QuantLib::ext::shared_ptr<ore::data::EngineFactory>&)
override;
58 virtual QuantLib::ext::shared_ptr<QuantLib::Index>
getIndex() = 0;
61 virtual const QuantLib::Real
strike() = 0;
65 virtual QuantLib::ext::shared_ptr<QuantLib::PricingEngine>
67 const QuantLib::Date& paymentDate) = 0;
68 virtual QuantLib::ext::shared_ptr<QuantLib::PricingEngine>
70 const QuantLib::Date& paymentDate) = 0;
71 virtual const QuantLib::Handle<QuantLib::Quote>&
spotQuote() = 0;
111 std::string fxIndex = std::string())
123 void build(
const QuantLib::ext::shared_ptr<ore::data::EngineFactory>& ef)
override;
130 QuantLib::ext::shared_ptr<QuantLib::Index>
getIndex()
override {
return QuantLib::ext::dynamic_pointer_cast<Index>(
fxIndex_); }
142 QuantLib::ext::shared_ptr<QuantExt::FxIndex>
fxIndex_;
168 void build(
const QuantLib::ext::shared_ptr<ore::data::EngineFactory>& ef)
override;
175 QuantLib::ext::shared_ptr<QuantLib::Index>
getIndex()
override {
return QuantLib::ext::dynamic_pointer_cast<Index>(
eqIndex_); }
179 const QuantLib::Handle<QuantLib::Quote>&
spotQuote()
override {
return eqIndex_->equitySpot(); }
186 QuantLib::ext::shared_ptr<QuantExt::EquityIndex2>
eqIndex_;
Serializable obejct holding barrier data.
Serializable FX Barrier Option.
virtual QuantLib::ext::shared_ptr< QuantLib::PricingEngine > vanillaPricingEngine(const QuantLib::ext::shared_ptr< EngineFactory > &ef, const QuantLib::Date &expiryDate, const QuantLib::Date &paymentDate)=0
const BarrierData & barrier() const
virtual std::string indexFixingName()=0
const QuantLib::Date & startDate() const
virtual QuantLib::Real tradeMultiplier()=0
const ore::data::OptionData & option() const
virtual Currency tradeCurrency()=0
ore::data::OptionData option_
void fromXML(ore::data::XMLNode *node) override
virtual void checkBarriers()=0
check validity of barriers
const QuantLib::Calendar & calendar() const
virtual void additionalToXml(ore::data::XMLDocument &doc, ore::data::XMLNode *node) const =0
QuantLib::Calendar calendar_
ore::data::XMLNode * toXML(ore::data::XMLDocument &doc) const override
virtual QuantLib::ext::shared_ptr< QuantLib::PricingEngine > barrierPricingEngine(const QuantLib::ext::shared_ptr< EngineFactory > &ef, const QuantLib::Date &expiryDate, const QuantLib::Date &paymentDate)=0
virtual void additionalFromXml(ore::data::XMLNode *node)=0
void build(const QuantLib::ext::shared_ptr< ore::data::EngineFactory > &) override
Build QuantLib/QuantExt instrument, link pricing engine.
virtual const QuantLib::Handle< QuantLib::Quote > & spotQuote()=0
QuantLib::Date startDate_
virtual const QuantLib::Real strike()=0
BarrierOption(ore::data::OptionData option, BarrierData barrier, QuantLib::Date startDate=QuantLib::Date(), const std::string &calendar=std::string())
virtual QuantLib::ext::shared_ptr< QuantLib::Index > getIndex()=0
BarrierOption()
Constructor.
Serializable object holding generic trade data, reporting dimensions.
void build(const QuantLib::ext::shared_ptr< ore::data::EngineFactory > &ef) override
Currency tradeCurrency() override
void additionalFromXml(ore::data::XMLNode *node) override
void fromXML(ore::data::XMLNode *node) override
QuantLib::Currency currency_
ore::data::XMLNode * toXML(ore::data::XMLDocument &doc) const override
QuantLib::ext::shared_ptr< QuantLib::Index > getIndex() override
void additionalToXml(ore::data::XMLDocument &doc, ore::data::XMLNode *node) const override
EquityOptionWithBarrier(const std::string &tradeType)
Default constructor.
const QuantLib::Real strike() override
QuantLib::Real tradeMultiplier() override
EquityOptionWithBarrier(const std::string &tradeType, ore::data::Envelope &env, ore::data::OptionData option, BarrierData barrier, QuantLib::Date startDate, std::string calendar, const EquityUnderlying &equity, QuantLib::Currency currency, QuantLib::Real quantity, TradeStrike strike)
Constructor.
QuantLib::ext::shared_ptr< QuantExt::EquityIndex2 > eqIndex_
QuantLib::Real quantity() const
const QuantLib::Handle< QuantLib::Quote > & spotQuote() override
std::string indexFixingName() override
Base class for all single asset Equity Derivaties.
void build(const QuantLib::ext::shared_ptr< ore::data::EngineFactory > &ef) override
Currency tradeCurrency() override
QuantLib::Real soldAmount_
QuantLib::ext::shared_ptr< QuantExt::FxIndex > fxIndex_
void additionalFromXml(ore::data::XMLNode *node) override
QuantLib::Real boughtAmount() const
QuantLib::Real boughtAmount_
FxOptionWithBarrier(const std::string &tradeType, ore::data::Envelope &env, ore::data::OptionData option, BarrierData barrier, QuantLib::Date startDate, std::string calendar, std::string boughtCurrency, QuantLib::Real boughtAmount, std::string soldCurrency, QuantLib::Real soldAmount, std::string fxIndex=std::string())
Constructor.
QuantLib::Real soldAmount() const
void fromXML(ore::data::XMLNode *node) override
ore::data::XMLNode * toXML(ore::data::XMLDocument &doc) const override
QuantLib::ext::shared_ptr< QuantLib::Index > getIndex() override
void additionalToXml(ore::data::XMLDocument &doc, ore::data::XMLNode *node) const override
FxOptionWithBarrier(const std::string &tradeType)
Default constructor.
const QuantLib::Real strike() override
QuantLib::Real tradeMultiplier() override
QuantLib::Handle< QuantLib::Quote > spotQuote_
const QuantLib::Handle< QuantLib::Quote > & spotQuote() override
std::string indexFixingName() override
Base class for all single asset FX Derivaties.
std::string soldCurrency_
const std::string & soldCurrency() const
const std::string & boughtCurrency() const
Serializable object holding option data.
const string & tradeType() const
QuantLib::Real value() const
Small XML Document wrapper class.
Calendar parseCalendar(const string &s)
Convert text to QuantLib::Calendar.
Currency parseCurrency(const string &s)
Convert text to QuantLib::Currency.
Serializable Credit Default Swap.
trade option data model and serialization
base trade data model and serialization