Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
EuropeanOptionBarrier Class Reference

#include <ored/portfolio/europeanoptionbarrier.hpp>

+ Inheritance diagram for EuropeanOptionBarrier:
+ Collaboration diagram for EuropeanOptionBarrier:

Public Member Functions

 EuropeanOptionBarrier (const QuantLib::ext::shared_ptr< Conventions > &conventions=nullptr)
 
 EuropeanOptionBarrier (const Envelope &env, const string &quantity, const string &putCall, const string &longShort, const string &strike, const string &premiumAmount, const string &premiumCurrency, const string &premiumDate, const string &optionExpiry, const QuantLib::ext::shared_ptr< Underlying > &optionUnderlying, const QuantLib::ext::shared_ptr< Underlying > &barrierUnderlying, const string &barrierLevel, const string &barrierType, const string &barrierStyle, const string &settlementDate, const string &payCcy, const ScheduleData &barrierSchedule, const QuantLib::ext::shared_ptr< Conventions > &conventions=nullptr)
 
void build (const QuantLib::ext::shared_ptr< EngineFactory > &) override
 
void fromXML (XMLNode *node) override
 
XMLNodetoXML (XMLDocument &doc) const override
 
- Public Member Functions inherited from ScriptedTrade
 ScriptedTrade (const std::string &tradeType="ScriptedTrade", const Envelope &env=Envelope())
 
 ScriptedTrade (const Envelope &env, const std::vector< ScriptedTradeEventData > &events, const std::vector< ScriptedTradeValueTypeData > &numbers, const std::vector< ScriptedTradeValueTypeData > &indices, const std::vector< ScriptedTradeValueTypeData > &currencies, const std::vector< ScriptedTradeValueTypeData > &daycounters, const std::map< std::string, ScriptedTradeScriptData > &script, const std::string &productTag, const std::string &tradeType="ScriptedTrade")
 
 ScriptedTrade (const Envelope &env, const std::vector< ScriptedTradeEventData > &events, const std::vector< ScriptedTradeValueTypeData > &numbers, const std::vector< ScriptedTradeValueTypeData > &indices, const std::vector< ScriptedTradeValueTypeData > &currencies, const std::vector< ScriptedTradeValueTypeData > &daycounters, const std::string &scriptName, const std::string &tradeType="ScriptedTrade")
 
void clear ()
 
void build (const QuantLib::ext::shared_ptr< EngineFactory > &) override
 
QuantLib::Real notional () const override
 Return the current notional in npvCurrency. See individual sub-classes for the precise definition. More...
 
std::string notionalCurrency () const override
 
void fromXML (XMLNode *node) override
 
XMLNodetoXML (ore::data::XMLDocument &doc) const override
 
void build (const QuantLib::ext::shared_ptr< EngineFactory > &engineFactory, const PremiumData &premiumData, const Real premiumMultiplier)
 
std::map< ore::data::AssetClass, std::set< std::string > > underlyingIndices (const QuantLib::ext::shared_ptr< ReferenceDataManager > &referenceDataManager=nullptr) const override
 
virtual void setIsdaTaxonomyFields ()
 
const std::vector< ScriptedTradeEventData > & events () const
 
const std::vector< ScriptedTradeValueTypeData > & numbers () const
 
const std::vector< ScriptedTradeValueTypeData > & indices () const
 
const std::vector< ScriptedTradeValueTypeData > & currencies () const
 
const std::vector< ScriptedTradeValueTypeData > & daycounters () const
 
const std::map< std::string, ScriptedTradeScriptData > & script () const
 
const std::string & productTag () const
 
const std::string & scriptName () const
 
const std::string & simmProductClass () const
 
const std::string & scheduleProductClass () const
 
const ScriptedTradeScriptDatascript (const std::string &purpose, const bool fallBackOnEmptyPurpose=true) const
 
- Public Member Functions inherited from Trade
 Trade ()
 Default constructor. More...
 
 Trade (const string &tradeType, const Envelope &env=Envelope(), const TradeActions &ta=TradeActions())
 Base class constructor. More...
 
virtual ~Trade ()
 Default destructor. More...
 
virtual void build (const QuantLib::ext::shared_ptr< EngineFactory > &)=0
 
virtual std::map< std::string, RequiredFixings::FixingDatesfixings (const QuantLib::Date &settlementDate=QuantLib::Date()) const
 
const RequiredFixingsrequiredFixings () const
 
virtual std::map< AssetClass, std::set< std::string > > underlyingIndices (const QuantLib::ext::shared_ptr< ReferenceDataManager > &referenceDataManager=nullptr) const
 
void reset ()
 Reset trade, clear all base class data. This does not reset accumulated timings for this trade. More...
 
void resetPricingStats (const std::size_t numberOfPricings=0, const boost::timer::nanosecond_type cumulativePricingTime=0)
 Reset accumulated timings to given values. More...
 
string & id ()
 Set the trade id. More...
 
void setEnvelope (const Envelope &envelope)
 Set the envelope with counterparty and portfolio info. More...
 
void setAdditionalData (const std::map< std::string, boost::any > &additionalData)
 
TradeActionstradeActions ()
 Set the trade actions. More...
 
const string & id () const
 
const string & tradeType () const
 
const Envelopeenvelope () const
 
const set< string > & portfolioIds () const
 
const TradeActionstradeActions () const
 
const QuantLib::ext::shared_ptr< InstrumentWrapper > & instrument () const
 
const std::vector< QuantLib::Leg > & legs () const
 
const std::vector< string > & legCurrencies () const
 
const std::vector< bool > & legPayers () const
 
const string & npvCurrency () const
 
const Date & maturity () const
 
virtual bool isExpired (const Date &d)
 
const string & issuer () const
 
template<typename T >
additionalDatum (const std::string &tag) const
 returns any additional datum. More...
 
virtual const std::map< std::string, boost::any > & additionalData () const
 returns all additional data returned by the trade once built More...
 
const std::string & sensitivityTemplate () const
 
void validate () const
 Utility to validate that everything that needs to be set in this base class is actually set. More...
 
virtual bool hasCashflows () const
 
boost::timer::nanosecond_type getCumulativePricingTime () const
 Get cumulative timing spent on pricing. More...
 
std::size_t getNumberOfPricings () const
 Get number of pricings. More...
 
- Public Member Functions inherited from XMLSerializable
virtual ~XMLSerializable ()
 
virtual void fromXML (XMLNode *node)=0
 
virtual XMLNodetoXML (XMLDocument &doc) const =0
 
void fromFile (const std::string &filename)
 
void toFile (const std::string &filename) const
 
void fromXMLString (const std::string &xml)
 Parse from XML string. More...
 
std::string toXMLString () const
 Parse from XML string. More...
 

Private Member Functions

void initIndices ()
 

Private Attributes

string quantity_
 
string putCall_
 
string longShort_
 
string strike_
 
string premiumAmount_
 
string premiumCurrency_
 
string premiumDate_
 
string optionExpiry_
 
QuantLib::ext::shared_ptr< UnderlyingoptionUnderlying_
 
QuantLib::ext::shared_ptr< UnderlyingbarrierUnderlying_
 
string barrierLevel_
 
string barrierType_
 
string barrierStyle_
 
ScheduleData barrierSchedule_
 
string settlementDate_
 
string payCcy_
 

Additional Inherited Members

- Protected Member Functions inherited from Trade
Date addPremiums (std::vector< QuantLib::ext::shared_ptr< Instrument > > &instruments, std::vector< Real > &multipliers, const Real tradeMultiplier, const PremiumData &premiumData, const Real premiumMultiplier, const Currency &tradeCurrency, const QuantLib::ext::shared_ptr< EngineFactory > &factory, const string &configuration)
 
void setLegBasedAdditionalData (const Size legNo, Size resultLegId=Null< Size >()) const
 
void setSensitivityTemplate (const EngineBuilder &builder)
 
void setSensitivityTemplate (const std::string &id)
 
- Protected Attributes inherited from ScriptedTrade
std::vector< ScriptedTradeEventDataevents_
 
std::vector< ScriptedTradeValueTypeDatanumbers_
 
std::vector< ScriptedTradeValueTypeDataindices_
 
std::vector< ScriptedTradeValueTypeDatacurrencies_
 
std::vector< ScriptedTradeValueTypeDatadaycounters_
 
std::map< std::string, ScriptedTradeScriptDatascript_
 
std::string productTag_
 
std::string scriptName_
 
std::string simmProductClass_
 
std::string scheduleProductClass_
 
- Protected Attributes inherited from Trade
string tradeType_
 
QuantLib::ext::shared_ptr< InstrumentWrapperinstrument_
 
std::vector< QuantLib::Leg > legs_
 
std::vector< string > legCurrencies_
 
std::vector< boollegPayers_
 
string npvCurrency_
 
QuantLib::Real notional_
 
string notionalCurrency_
 
Date maturity_
 
string issuer_
 
string sensitivityTemplate_
 
bool sensitivityTemplateSet_ = false
 
std::size_t savedNumberOfPricings_ = 0
 
boost::timer::nanosecond_type savedCumulativePricingTime_ = 0
 
RequiredFixings requiredFixings_
 
std::map< std::string, boost::any > additionalData_
 

Detailed Description

Definition at line 34 of file europeanoptionbarrier.hpp.

Constructor & Destructor Documentation

◆ EuropeanOptionBarrier() [1/2]

EuropeanOptionBarrier ( const QuantLib::ext::shared_ptr< Conventions > &  conventions = nullptr)
explicit

Definition at line 36 of file europeanoptionbarrier.hpp.

37 : ScriptedTrade("EuropeanOptionBarrier") {}
ScriptedTrade(const std::string &tradeType="ScriptedTrade", const Envelope &env=Envelope())

◆ EuropeanOptionBarrier() [2/2]

EuropeanOptionBarrier ( const Envelope env,
const string &  quantity,
const string &  putCall,
const string &  longShort,
const string &  strike,
const string &  premiumAmount,
const string &  premiumCurrency,
const string &  premiumDate,
const string &  optionExpiry,
const QuantLib::ext::shared_ptr< Underlying > &  optionUnderlying,
const QuantLib::ext::shared_ptr< Underlying > &  barrierUnderlying,
const string &  barrierLevel,
const string &  barrierType,
const string &  barrierStyle,
const string &  settlementDate,
const string &  payCcy,
const ScheduleData barrierSchedule,
const QuantLib::ext::shared_ptr< Conventions > &  conventions = nullptr 
)

Definition at line 38 of file europeanoptionbarrier.hpp.

46 : ScriptedTrade("EuropeanOptionBarrier", env), quantity_(quantity), putCall_(putCall), longShort_(longShort),
47 strike_(strike), premiumAmount_(premiumAmount), premiumCurrency_(premiumCurrency), premiumDate_(premiumDate),
48 optionExpiry_(optionExpiry), optionUnderlying_(optionUnderlying), barrierUnderlying_(barrierUnderlying),
49 barrierLevel_(barrierLevel), barrierType_(barrierType), barrierStyle_(barrierStyle),
50 barrierSchedule_(barrierSchedule), settlementDate_(settlementDate), payCcy_(payCcy) {
52 }
QuantLib::ext::shared_ptr< Underlying > barrierUnderlying_
QuantLib::ext::shared_ptr< Underlying > optionUnderlying_
+ Here is the call graph for this function:

Member Function Documentation

◆ build()

void build ( const QuantLib::ext::shared_ptr< EngineFactory > &  )
overridevirtual

Build QuantLib/QuantExt instrument, link pricing engine. If build() is called multiple times, reset() should be called between these calls.

Implements Trade.

Definition at line 26 of file europeanoptionbarrier.cpp.

26 {
27
28 // set script parameters
29
30 clear();
32
33 events_.emplace_back("PremiumDate", premiumDate_);
34 events_.emplace_back("OptionExpiry", optionExpiry_);
35 events_.emplace_back("SettlementDate", settlementDate_);
36 if (barrierStyle_ == "American")
37 events_.emplace_back("BarrierSchedule", barrierSchedule_);
38 else
39 events_.emplace_back("BarrierSchedule", optionExpiry_);
40
41 numbers_.emplace_back("Number", "Quantity", quantity_);
42 numbers_.emplace_back("Number", "Strike", strike_);
43 numbers_.emplace_back("Number", "PremiumAmount", premiumAmount_);
44 numbers_.emplace_back("Number", "BarrierLevel", barrierLevel_);
45
46 Barrier::Type barrierType = parseBarrierType(barrierType_);
47 string barrierTypeVal;
48 if (barrierType == Barrier::Type::DownIn)
49 barrierTypeVal = "1";
50 else if (barrierType == Barrier::Type::UpIn)
51 barrierTypeVal = "2";
52 else if (barrierType == Barrier::Type::DownOut)
53 barrierTypeVal = "3";
54 else if (barrierType == Barrier::Type::UpOut)
55 barrierTypeVal = "4";
56 else
57 QL_FAIL("Unknown Barrier Type: " << barrierType);
58 numbers_.emplace_back("Number", "BarrierType", barrierTypeVal);
59
60 numbers_.emplace_back("Number", "BarrierStyle", barrierStyle_ == "American" ? "1" : "-1");
61
62 Option::Type putCall = parseOptionType(putCall_);
63 numbers_.emplace_back("Number", "PutCall", putCall == Option::Call ? "1" : "-1");
64
65 Position::Type longShort = parsePositionType(longShort_);
66 numbers_.emplace_back("Number", "LongShort", longShort == Position::Long ? "1" : "-1");
67
68 currencies_.emplace_back("Currency", "PremiumCurrency", premiumCurrency_);
69 currencies_.emplace_back("Currency", "PayCcy", payCcy_);
70
71 // check underlying types
72 QL_REQUIRE(optionUnderlying_->type() == "Equity" || optionUnderlying_->type() == "Commodity" ||
73 optionUnderlying_->type() == "FX" || optionUnderlying_->type() == "InterestRate",
74 "Underlying type " << optionUnderlying_->type() << " not supported");
75 QL_REQUIRE(barrierUnderlying_->type() == "Equity" || barrierUnderlying_->type() == "Commodity" ||
76 barrierUnderlying_->type() == "FX" || barrierUnderlying_->type() == "InterestRate",
77 "Underlying type " << barrierUnderlying_->type() << " not supported");
78
79 // set product tag accordingly
80 if (optionUnderlying_->type() == "InterestRate" && barrierUnderlying_->type() == "InterestRate")
81 productTag_ = "MultiUnderlyingIrOption";
82 else if (optionUnderlying_->type() == "InterestRate" || barrierUnderlying_->type() == "InterestRate")
83 productTag_ = "IrHybrid({AssetClass})";
84 else
85 productTag_ = "MultiAssetOption({AssetClass})";
86
87 LOG("ProductTag=" << productTag_);
88
89 // set script
90 script_ = {
91 {"",
92 ScriptedTradeScriptData(
93 " REQUIRE Quantity >= 0;\n"
94 " REQUIRE PremiumDate <= SettlementDate;\n"
95 " REQUIRE OptionExpiry <= SettlementDate;\n"
96 "\n"
97 " NUMBER barrierFixing, finalPrice, exercisePayoff, premium;\n"
98 " NUMBER notKnocked, factor, currentNotional, exerciseProbability;\n"
99 "\n"
100 " notKnocked = 1;\n"
101 "\n"
102 " IF BarrierStyle == -1 THEN\n"
103 " barrierFixing = BarrierUnderlying(OptionExpiry);\n"
104 " finalPrice = OptionUnderlying(OptionExpiry);\n"
105 "\n"
106 " IF {BarrierType == 1 AND barrierFixing <= BarrierLevel}\n"
107 " OR {BarrierType == 2 AND barrierFixing >= BarrierLevel}\n"
108 " OR {BarrierType == 3 AND barrierFixing > BarrierLevel}\n"
109 " OR {BarrierType == 4 AND barrierFixing < BarrierLevel} THEN\n"
110 " exercisePayoff = LOGPAY(LongShort * Quantity * max(0, PutCall * (finalPrice - Strike)),\n"
111 " OptionExpiry, SettlementDate, PayCcy, 1, ExercisePayoff);\n"
112 " END;\n"
113 "\n"
114 " ELSE\n"
115 " NUMBER d;\n"
116 " FOR d IN (2, SIZE(BarrierSchedule), 1) DO\n"
117 " IF BarrierType == 1 OR BarrierType == 3 THEN\n"
118 " notKnocked = notKnocked * (1 - BELOWPROB(BarrierUnderlying, BarrierSchedule[d-1],\n"
119 " BarrierSchedule[d], BarrierLevel));\n"
120 " ELSE\n"
121 " notKnocked = notKnocked * (1 - ABOVEPROB(BarrierUnderlying, BarrierSchedule[d-1],\n"
122 " BarrierSchedule[d], BarrierLevel));\n"
123 " END;\n"
124 " END;\n"
125 "\n"
126 " IF BarrierType == 1 OR BarrierType == 2 THEN\n"
127 " factor = 1 - notKnocked;\n"
128 " ELSE\n"
129 " factor = notKnocked;\n"
130 " END;\n"
131 "\n"
132 " finalPrice = OptionUnderlying(OptionExpiry);\n"
133 " exercisePayoff = LOGPAY(Quantity * factor * max(0, PutCall * (finalPrice - Strike)),\n"
134 " OptionExpiry, SettlementDate, PayCcy, 1, ExercisePayoff);\n"
135 " END;\n"
136 "\n"
137 " premium = LOGPAY(Quantity * PremiumAmount, PremiumDate,\n"
138 " PremiumDate, PremiumCurrency, 0, Premium);\n"
139 "\n"
140 " IF exercisePayoff != 0 THEN\n"
141 " exerciseProbability = 1;\n"
142 " END;\n"
143 "\n"
144 " currentNotional = Quantity * Strike;"
145 " Option = LongShort * (exercisePayoff - premium);\n",
146 //
147 "Option",
148 {{"ExerciseProbability", "exerciseProbability"},
149 {"currentNotional", "currentNotional"},
150 {"notionalCurrency", "PayCcy"}},
151 {})}};
152
153 // build trade
154
155 ScriptedTrade::build(factory);
156}
std::vector< ScriptedTradeEventData > events_
std::vector< ScriptedTradeValueTypeData > currencies_
std::vector< ScriptedTradeValueTypeData > numbers_
std::map< std::string, ScriptedTradeScriptData > script_
void build(const QuantLib::ext::shared_ptr< EngineFactory > &) override
Position::Type parsePositionType(const std::string &s)
Convert text to QuantLib::Position::Type.
Definition: parsers.cpp:404
Barrier::Type parseBarrierType(const std::string &s)
Convert std::string to QuantLib::BarrierType.
Definition: parsers.cpp:1042
Option::Type parseOptionType(const std::string &s)
Convert text to QuantLib::Option::Type.
Definition: parsers.cpp:481
#define LOG(text)
Logging Macro (Level = Notice)
Definition: log.hpp:552
+ Here is the call graph for this function:

◆ fromXML()

void fromXML ( XMLNode node)
overridevirtual

Reimplemented from Trade.

Definition at line 163 of file europeanoptionbarrier.cpp.

163 {
164 Trade::fromXML(node);
165 XMLNode* tradeDataNode = XMLUtils::getChildNode(node, "EuropeanOptionBarrierData");
166 QL_REQUIRE(tradeDataNode, "EuropeanOptionBarrierData node not found");
167 quantity_ = XMLUtils::getChildValue(tradeDataNode, "Quantity", true);
168 putCall_ = XMLUtils::getChildValue(tradeDataNode, "PutCall", true);
169 longShort_ = XMLUtils::getChildValue(tradeDataNode, "LongShort", true);
170 strike_ = XMLUtils::getChildValue(tradeDataNode, "Strike", true);
171 premiumAmount_ = XMLUtils::getChildValue(tradeDataNode, "PremiumAmount", true);
172 premiumCurrency_ = XMLUtils::getChildValue(tradeDataNode, "PremiumCurrency", true);
173 premiumDate_ = XMLUtils::getChildValue(tradeDataNode, "PremiumDate", true);
174 optionExpiry_ = XMLUtils::getChildValue(tradeDataNode, "OptionExpiry", true);
175
176 XMLNode* tmp = XMLUtils::getChildNode(tradeDataNode, "OptionUnderlying");
177 if (!tmp)
178 tmp = XMLUtils::getChildNode(tradeDataNode, "Name");
179 UnderlyingBuilder optionUnderlyingBuilder("OptionUnderlying", "Name");
180 optionUnderlyingBuilder.fromXML(tmp);
181 optionUnderlying_ = optionUnderlyingBuilder.underlying();
182
183 tmp = XMLUtils::getChildNode(tradeDataNode, "BarrierUnderlying");
184 if (!tmp)
185 tmp = XMLUtils::getChildNode(tradeDataNode, "Name");
186 UnderlyingBuilder barrierUnderlyingBuilder("BarrierUnderlying", "Name");
187 barrierUnderlyingBuilder.fromXML(tmp);
188 barrierUnderlying_ = barrierUnderlyingBuilder.underlying();
189
190 barrierLevel_ = XMLUtils::getChildValue(tradeDataNode, "BarrierLevel", true);
191 barrierType_ = XMLUtils::getChildValue(tradeDataNode, "BarrierType", true);
192
193 barrierStyle_ = XMLUtils::getChildValue(tradeDataNode, "BarrierStyle", true);
194 QL_REQUIRE(barrierStyle_ == "American" || barrierStyle_ == "European",
195 "Barrier style " << barrierStyle_ << " not supported");
196 if (barrierStyle_ == "American") {
197 QL_REQUIRE(XMLUtils::getChildNode(tradeDataNode, "BarrierSchedule"), "Missing BarrierSchedule node.");
198 barrierSchedule_.fromXML(XMLUtils::getChildNode(tradeDataNode, "BarrierSchedule"));
199 }
200
201 settlementDate_ = XMLUtils::getChildValue(tradeDataNode, "SettlementDate", true);
202 payCcy_ = XMLUtils::getChildValue(tradeDataNode, "PayCcy", true);
203
204 initIndices();
205}
virtual void fromXML(XMLNode *node) override
Definition: schedule.cpp:179
virtual void fromXML(XMLNode *node) override
Definition: trade.cpp:34
static string getChildValue(XMLNode *node, const string &name, bool mandatory=false, const string &defaultValue=string())
Definition: xmlutils.cpp:277
static XMLNode * getChildNode(XMLNode *n, const string &name="")
Definition: xmlutils.cpp:387
rapidxml::xml_node< char > XMLNode
Definition: xmlutils.hpp:60
+ Here is the call graph for this function:

◆ toXML()

XMLNode * toXML ( XMLDocument doc) const
overridevirtual

Reimplemented from Trade.

Definition at line 207 of file europeanoptionbarrier.cpp.

207 {
208 XMLNode* node = Trade::toXML(doc);
209 XMLNode* tradeNode = doc.allocNode("EuropeanOptionBarrierData");
210 XMLUtils::appendNode(node, tradeNode);
211 XMLUtils::addChild(doc, tradeNode, "Quantity", quantity_);
212 XMLUtils::addChild(doc, tradeNode, "PutCall", putCall_);
213 XMLUtils::addChild(doc, tradeNode, "LongShort", longShort_);
214 XMLUtils::addChild(doc, tradeNode, "Strike", strike_);
215 XMLUtils::addChild(doc, tradeNode, "PremiumAmount", premiumAmount_);
216 XMLUtils::addChild(doc, tradeNode, "PremiumCurrency", premiumCurrency_);
217 XMLUtils::addChild(doc, tradeNode, "PremiumDate", premiumDate_);
218 XMLUtils::addChild(doc, tradeNode, "OptionExpiry", optionExpiry_);
219 XMLUtils::appendNode(tradeNode, optionUnderlying_->toXML(doc));
220 XMLUtils::appendNode(tradeNode, barrierUnderlying_->toXML(doc));
221 XMLUtils::addChild(doc, tradeNode, "BarrierLevel", barrierLevel_);
222 XMLUtils::addChild(doc, tradeNode, "BarrierType", barrierType_);
223 XMLUtils::addChild(doc, tradeNode, "BarrierStyle", barrierStyle_);
224 if (barrierStyle_ == "American") {
225 XMLNode* tmp = barrierSchedule_.toXML(doc);
226 XMLUtils::setNodeName(doc, tmp, "BarrierSchedule");
227 XMLUtils::appendNode(tradeNode, tmp);
228 }
229 XMLUtils::addChild(doc, tradeNode, "SettlementDate", settlementDate_);
230 XMLUtils::addChild(doc, tradeNode, "PayCcy", payCcy_);
231 return node;
232}
virtual XMLNode * toXML(XMLDocument &doc) const override
Definition: schedule.cpp:198
virtual XMLNode * toXML(XMLDocument &doc) const override
Definition: trade.cpp:46
static void setNodeName(XMLDocument &doc, XMLNode *node, const string &name)
Definition: xmlutils.cpp:478
static XMLNode * addChild(XMLDocument &doc, XMLNode *n, const string &name)
Definition: xmlutils.cpp:181
static void appendNode(XMLNode *parent, XMLNode *child)
Definition: xmlutils.cpp:406
+ Here is the call graph for this function:

◆ initIndices()

void initIndices ( )
private

Definition at line 158 of file europeanoptionbarrier.cpp.

158 {
159 indices_.emplace_back("Index", "OptionUnderlying", scriptedIndexName(optionUnderlying_));
160 indices_.emplace_back("Index", "BarrierUnderlying", scriptedIndexName(barrierUnderlying_));
161}
std::vector< ScriptedTradeValueTypeData > indices_
QL_DEPRECATED_ENABLE_WARNING std::string scriptedIndexName(const QuantLib::ext::shared_ptr< Underlying > &underlying)
Definition: utilities.cpp:614
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ quantity_

string quantity_
private

Definition at line 59 of file europeanoptionbarrier.hpp.

◆ putCall_

string putCall_
private

Definition at line 59 of file europeanoptionbarrier.hpp.

◆ longShort_

string longShort_
private

Definition at line 59 of file europeanoptionbarrier.hpp.

◆ strike_

string strike_
private

Definition at line 59 of file europeanoptionbarrier.hpp.

◆ premiumAmount_

string premiumAmount_
private

Definition at line 59 of file europeanoptionbarrier.hpp.

◆ premiumCurrency_

string premiumCurrency_
private

Definition at line 59 of file europeanoptionbarrier.hpp.

◆ premiumDate_

string premiumDate_
private

Definition at line 59 of file europeanoptionbarrier.hpp.

◆ optionExpiry_

string optionExpiry_
private

Definition at line 59 of file europeanoptionbarrier.hpp.

◆ optionUnderlying_

QuantLib::ext::shared_ptr<Underlying> optionUnderlying_
private

Definition at line 60 of file europeanoptionbarrier.hpp.

◆ barrierUnderlying_

QuantLib::ext::shared_ptr<Underlying> barrierUnderlying_
private

Definition at line 60 of file europeanoptionbarrier.hpp.

◆ barrierLevel_

string barrierLevel_
private

Definition at line 61 of file europeanoptionbarrier.hpp.

◆ barrierType_

string barrierType_
private

Definition at line 61 of file europeanoptionbarrier.hpp.

◆ barrierStyle_

string barrierStyle_
private

Definition at line 61 of file europeanoptionbarrier.hpp.

◆ barrierSchedule_

ScheduleData barrierSchedule_
private

Definition at line 62 of file europeanoptionbarrier.hpp.

◆ settlementDate_

string settlementDate_
private

Definition at line 63 of file europeanoptionbarrier.hpp.

◆ payCcy_

string payCcy_
private

Definition at line 63 of file europeanoptionbarrier.hpp.