Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
List of all members
CommodityForward Class Reference

#include <ored/portfolio/commodityforward.hpp>

+ Inheritance diagram for CommodityForward:
+ Collaboration diagram for CommodityForward:

Public Member Functions

Constructors
 CommodityForward ()
 Default constructor. More...
 
 CommodityForward (const Envelope &envelope, const std::string &position, const std::string &commodityName, const std::string &currency, QuantLib::Real quantity, const std::string &maturityDate, QuantLib::Real strike)
 Detailed constructor with explicit future expiry date. More...
 
 CommodityForward (const Envelope &envelope, const std::string &position, const std::string &commodityName, const std::string &currency, QuantLib::Real quantity, const std::string &maturityDate, QuantLib::Real strike, const QuantLib::Date &futureExpiryDate, const boost::optional< bool > &physicallySettled=true, const Date &paymentDate=Date())
 Detailed constructor with explicit future expiry date. More...
 
 CommodityForward (const Envelope &envelope, const std::string &position, const std::string &commodityName, const std::string &currency, QuantLib::Real quantity, const std::string &maturityDate, QuantLib::Real strike, const QuantLib::Period &futureExpiryOffset, const QuantLib::Calendar &offsetCalendar, const boost::optional< bool > &physicallySettled=true, const Date &paymentDate=Date())
 Detailed constructor with explicit future expiry offset and calendar. More...
 
Inspectors
std::string position ()
 
std::string commodityName ()
 
std::string currency ()
 
QuantLib::Real quantity ()
 
std::string maturityDate ()
 
QuantLib::Real strike ()
 
const boost::optional< bool > & isFuturePrice () const
 
const QuantLib::Date & futureExpiryDate () const
 
const QuantLib::Period & futureExpiryOffset () const
 
const QuantLib::Calendar & offsetCalendar () const
 
const boost::optional< bool > & physicallySettled () const
 
const QuantLib::Date & paymentDate () const
 
Trade interface
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::map< AssetClass, std::set< std::string > > underlyingIndices (const QuantLib::ext::shared_ptr< ReferenceDataManager > &referenceDataManager=nullptr) const override
 Add underlying Commodity names. More...
 
- 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
 
virtual string notionalCurrency () 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...
 

Serialisation

std::string position_
 
std::string commodityName_
 
std::string currency_
 
QuantLib::Real quantity_
 
std::string maturityDate_
 
QuantLib::Real strike_
 
boost::optional< boolisFuturePrice_
 
QuantLib::Date futureExpiryDate_
 
QuantLib::Period futureExpiryOffset_
 Future expiry offset and calendar. More...
 
QuantLib::Calendar offsetCalendar_
 
boost::optional< boolphysicallySettled_
 
QuantLib::Date paymentDate_
 
QuantLib::Date fixingDate_
 NDF currency, index and fixing date. More...
 
std::string fxIndex_
 
std::string payCcy_
 
virtual void fromXML (XMLNode *node) override
 
virtual XMLNodetoXML (XMLDocument &doc) const override
 

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 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

Serializable Commodity forward contract

Definition at line 34 of file commodityforward.hpp.

Constructor & Destructor Documentation

◆ CommodityForward() [1/4]

Default constructor.

Definition at line 39 of file commodityforward.cpp.

39: Trade("CommodityForward"), quantity_(0.0), strike_(0.0) {}
Trade()
Default constructor.
Definition: trade.hpp:59

◆ CommodityForward() [2/4]

CommodityForward ( const Envelope envelope,
const std::string &  position,
const std::string &  commodityName,
const std::string &  currency,
QuantLib::Real  quantity,
const std::string &  maturityDate,
QuantLib::Real  strike 
)

Detailed constructor with explicit future expiry date.

◆ CommodityForward() [3/4]

CommodityForward ( const Envelope envelope,
const std::string &  position,
const std::string &  commodityName,
const std::string &  currency,
QuantLib::Real  quantity,
const std::string &  maturityDate,
QuantLib::Real  strike,
const QuantLib::Date &  futureExpiryDate,
const boost::optional< bool > &  physicallySettled = true,
const Date &  paymentDate = Date() 
)

Detailed constructor with explicit future expiry date.

◆ CommodityForward() [4/4]

CommodityForward ( const Envelope envelope,
const std::string &  position,
const std::string &  commodityName,
const std::string &  currency,
QuantLib::Real  quantity,
const std::string &  maturityDate,
QuantLib::Real  strike,
const QuantLib::Period &  futureExpiryOffset,
const QuantLib::Calendar &  offsetCalendar,
const boost::optional< bool > &  physicallySettled = true,
const Date &  paymentDate = Date() 
)

Detailed constructor with explicit future expiry offset and calendar.

Member Function Documentation

◆ position()

std::string position ( )

Definition at line 64 of file commodityforward.hpp.

64{ return position_; }
QuantLib::Position::Type position_

◆ commodityName()

std::string commodityName ( )

Definition at line 65 of file commodityforward.hpp.

65{ return commodityName_; }

◆ currency()

std::string currency ( )

Definition at line 66 of file commodityforward.hpp.

66{ return currency_; }
QuantLib::Currency currency_

◆ quantity()

QuantLib::Real quantity ( )

Definition at line 67 of file commodityforward.hpp.

67{ return quantity_; }

◆ maturityDate()

std::string maturityDate ( )

Definition at line 68 of file commodityforward.hpp.

68{ return maturityDate_; }
QuantLib::Date maturityDate_

◆ strike()

QuantLib::Real strike ( )

Definition at line 69 of file commodityforward.hpp.

69{ return strike_; }

◆ isFuturePrice()

const boost::optional< bool > & isFuturePrice ( ) const

Definition at line 70 of file commodityforward.hpp.

70{ return isFuturePrice_; }
boost::optional< bool > isFuturePrice_

◆ futureExpiryDate()

const QuantLib::Date & futureExpiryDate ( ) const

Definition at line 71 of file commodityforward.hpp.

71{ return futureExpiryDate_; }

◆ futureExpiryOffset()

const QuantLib::Period & futureExpiryOffset ( ) const

Definition at line 72 of file commodityforward.hpp.

72{ return futureExpiryOffset_; }
QuantLib::Period futureExpiryOffset_
Future expiry offset and calendar.

◆ offsetCalendar()

const QuantLib::Calendar & offsetCalendar ( ) const

Definition at line 73 of file commodityforward.hpp.

73{ return offsetCalendar_; }
QuantLib::Calendar offsetCalendar_

◆ physicallySettled()

const boost::optional< bool > & physicallySettled ( ) const

Definition at line 74 of file commodityforward.hpp.

◆ paymentDate()

const QuantLib::Date & paymentDate ( ) const

Definition at line 75 of file commodityforward.hpp.

75{ return paymentDate_; }
QuantLib::Date paymentDate_

◆ 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 67 of file commodityforward.cpp.

67 {
68
69 // ISDA taxonomy
70 additionalData_["isdaAssetClass"] = string("Commodity");
71 additionalData_["isdaBaseProduct"] = string("Forward");
72 additionalData_["isdaSubProduct"] = string("Price Return Basic Performance");
73 // skip the transaction level mapping for now
74 additionalData_["isdaTransaction"] = string("");
75
76 // Create the underlying commodity index for the forward
77 const QuantLib::ext::shared_ptr<Market>& market = engineFactory->market();
78 QuantLib::ext::shared_ptr<QuantExt::FxIndex> fxIndex = nullptr;
79
81
82 // notional_ = strike_ * quantity_;
85
86 additionalData_["quantity"] = quantity_;
87 additionalData_["strike"] = strike_;
88 additionalData_["strikeCurrency"] = currency_;
89 if (fixingDate_ != Date()) {
90 additionalData_["settlementCurrency"] = payCcy_;
91 additionalData_["fixingDate"] = fixingDate_;
92 additionalData_["fxIndex"] = fxIndex;
93 }
94
96 auto index = *market->commodityIndex(commodityName_, engineFactory->configuration(MarketContext::pricing));
97 bool isFutureAccordingToConventions = InstrumentConventions::instance().conventions()->has(commodityName_, Convention::Type::CommodityFuture);
98
99 // adjust the maturity date if not a valid fixing date for the index
100 maturity_ = index->fixingCalendar().adjust(maturity_, Preceding);
101
102 if ((isFuturePrice_ && *isFuturePrice_) || isFutureAccordingToConventions) {
103
104 // Get the commodity index from the market.
105 index = *market->commodityIndex(commodityName_, engineFactory->configuration(MarketContext::pricing));
106
107 // May have been given an explicit future expiry date or an offset and calendar or neither.
108 Date expiryDate = maturity_;
109 if (futureExpiryDate_ != Date()) {
110 expiryDate = futureExpiryDate_;
111 } else if (futureExpiryOffset_ != Period()) {
112 Calendar cal = offsetCalendar_.empty() ? NullCalendar() : offsetCalendar_;
113 expiryDate = cal.advance(maturity_, futureExpiryOffset_);
114 }
115
116 // Clone the index with the relevant expiry date.
117 index = index->clone(expiryDate);
118 }
119
121 bool physicallySettled = true;
123 // If cash settled and given a payment date that is not greater than the maturity date, set it equal to the
124 // maturity date and log a warning to continue processing.
125 physicallySettled = false;
126 if (paymentDate_ != Date() && paymentDate_ < maturity_) {
127 WLOG("Commodity forward " << id() << " has payment date (" << io::iso_date(paymentDate_) <<
128 ") before the maturity date (" << io::iso_date(maturity_) << "). Setting payment date" <<
129 " equal to the maturity date.");
131 }
132 } else {
133 // If physically settled and given a payment date, log a warning that it is ignored.
134 if (paymentDate_ != Date()) {
135 WLOG("Commodity forward " << id() << " supplies a payment date (" << io::iso_date(paymentDate_) <<
136 ") but is physically settled. The payment date is ignored.");
137 paymentDate = Date();
138 }
139 }
140
141 // add required commodity fixing
142 DLOG("commodity forward " << id() << " paymentDate is " << paymentDate);
143 requiredFixings_.addFixingDate(maturity_, index->name(),
144 paymentDate == Date() ? maturity_ : paymentDate);
145
146 // Create the commodity forward instrument
147 Currency currency = parseCurrency(currency_);
148 Position::Type position = parsePositionType(position_);
149 auto payCcy = Currency();
150 if(!fxIndex_.empty()){
153 fxIndex = buildFxIndex(fxIndex_, currency.code(), payCcy.code(), engineFactory->market(),
154 engineFactory->configuration(MarketContext::pricing));
156 }
157 QuantLib::ext::shared_ptr<Instrument> commodityForward = QuantLib::ext::make_shared<QuantExt::CommodityForward>(
160
161 // Pricing engine
162 QuantLib::ext::shared_ptr<EngineBuilder> builder = engineFactory->builder(tradeType_);
163 QL_REQUIRE(builder, "No builder found for " << tradeType_);
164 QuantLib::ext::shared_ptr<CommodityForwardEngineBuilder> commodityForwardEngineBuilder =
165 QuantLib::ext::dynamic_pointer_cast<CommodityForwardEngineBuilder>(builder);
166 commodityForward->setPricingEngine(commodityForwardEngineBuilder->engine(currency)); // the engine accounts for NDF if settlement data are present
167 setSensitivityTemplate(*commodityForwardEngineBuilder);
168
169 // set up other Trade details
170 instrument_ = QuantLib::ext::make_shared<VanillaInstrument>(commodityForward);
171}
const boost::shared_ptr< CommodityIndex > & index() const
QuantLib::Position::Type position() const
boost::shared_ptr< QuantExt::FxIndex > fxIndex() const
const QuantLib::Currency & currency() const
const QuantLib::Date & paymentDate() const
boost::shared_ptr< FxIndex > fxIndex_
Currency payCcy() const
bool physicallySettled() const
void addFixingDate(const QuantLib::Date &fixingDate, const std::string &indexName, const QuantLib::Date &payDate=Date::maxDate(), const bool alwaysAddIfPaysOnSettlement=false, const bool mandatoryFixing=true)
string npvCurrency_
Definition: trade.hpp:201
QuantLib::Real notional_
Definition: trade.hpp:202
void setSensitivityTemplate(const EngineBuilder &builder)
Definition: trade.cpp:295
RequiredFixings requiredFixings_
Definition: trade.hpp:223
QuantLib::ext::shared_ptr< InstrumentWrapper > instrument_
Definition: trade.hpp:197
string notionalCurrency_
Definition: trade.hpp:203
std::map< std::string, boost::any > additionalData_
Definition: trade.hpp:224
Date parseDate(const string &s)
Convert std::string to QuantLib::Date.
Definition: parsers.cpp:51
Currency parseCurrency(const string &s)
Convert text to QuantLib::Currency.
Definition: parsers.cpp:290
Position::Type parsePositionType(const std::string &s)
Convert text to QuantLib::Position::Type.
Definition: parsers.cpp:404
#define DLOG(text)
Logging Macro (Level = Debug)
Definition: log.hpp:554
#define WLOG(text)
Logging Macro (Level = Warning)
Definition: log.hpp:550
QuantLib::ext::shared_ptr< QuantExt::FxIndex > buildFxIndex(const string &fxIndex, const string &domestic, const string &foreign, const QuantLib::ext::shared_ptr< Market > &market, const string &configuration, bool useXbsCurves)
Definition: marketdata.cpp:137
+ Here is the call graph for this function:

◆ notional()

Real notional ( ) const
overridevirtual

Return the current notional in npvCurrency. See individual sub-classes for the precise definition.

Reimplemented from Trade.

Definition at line 173 of file commodityforward.cpp.

173{ return notional_; }

◆ underlyingIndices()

std::map< AssetClass, std::set< std::string > > underlyingIndices ( const QuantLib::ext::shared_ptr< ReferenceDataManager > &  referenceDataManager = nullptr) const
overridevirtual

Add underlying Commodity names.

Reimplemented from Trade.

Definition at line 176 of file commodityforward.cpp.

176 {
177 return {{AssetClass::COM, std::set<std::string>({commodityName_})}};
178}

◆ fromXML()

void fromXML ( XMLNode node)
overridevirtual

Reimplemented from Trade.

Definition at line 180 of file commodityforward.cpp.

180 {
181
182 Trade::fromXML(node);
183 XMLNode* commodityDataNode = XMLUtils::getChildNode(node, "CommodityForwardData");
184
185 position_ = XMLUtils::getChildValue(commodityDataNode, "Position", true);
186 commodityName_ = XMLUtils::getChildValue(commodityDataNode, "Name", true);
187 currency_ = XMLUtils::getChildValue(commodityDataNode, "Currency", true);
188 quantity_ = XMLUtils::getChildValueAsDouble(commodityDataNode, "Quantity", true);
189 maturityDate_ = XMLUtils::getChildValue(commodityDataNode, "Maturity", true);
190 strike_ = XMLUtils::getChildValueAsDouble(commodityDataNode, "Strike", true);
191
192 isFuturePrice_ = boost::none;
193 if (XMLNode* n = XMLUtils::getChildNode(commodityDataNode, "IsFuturePrice"))
194 isFuturePrice_ = parseBool(XMLUtils::getNodeValue(n));
195
196 futureExpiryDate_ = Date();
197 if (XMLNode* n = XMLUtils::getChildNode(commodityDataNode, "FutureExpiryDate"))
198 futureExpiryDate_ = parseDate(XMLUtils::getNodeValue(n));
199
200 // If not given an explicit future expiry date, check for offset and calendar.
201 if (futureExpiryDate_ == Date()) {
202 futureExpiryOffset_ = Period();
203 if (XMLNode* n = XMLUtils::getChildNode(commodityDataNode, "FutureExpiryOffset"))
204 futureExpiryOffset_ = parsePeriod(XMLUtils::getNodeValue(n));
205
206 offsetCalendar_ = Calendar();
207 if (XMLNode* n = XMLUtils::getChildNode(commodityDataNode, "FutureExpiryOffsetCalendar"))
208 offsetCalendar_ = parseCalendar(XMLUtils::getNodeValue(n));
209 }
210
211 physicallySettled_ = boost::none;
212 if (XMLNode* n = XMLUtils::getChildNode(commodityDataNode, "PhysicallySettled"))
213 physicallySettled_ = parseBool(XMLUtils::getNodeValue(n));
214
215 paymentDate_ = Date();
216 if (XMLNode* n = XMLUtils::getChildNode(commodityDataNode, "PaymentDate"))
217 paymentDate_ = parseDate(XMLUtils::getNodeValue(n));
218
219 if (XMLNode* settlementDataNode = XMLUtils::getChildNode(commodityDataNode, "SettlementData")) {
220 // this node is used to provide data for NDF. This includes a fixing date, a settlement currency and the
221 // quote/settlement fx index.
222 payCcy_ = XMLUtils::getChildValue(settlementDataNode, "PayCurrency", true);
223 fxIndex_ = XMLUtils::getChildValue(settlementDataNode, "FXIndex", true);
224 fixingDate_ = parseDate(XMLUtils::getChildValue(settlementDataNode, "FixingDate", true));
225 }
226}
Calendar parseCalendar(const string &s)
Convert text to QuantLib::Calendar.
Definition: parsers.cpp:157
Period parsePeriod(const string &s)
Convert text to QuantLib::Period.
Definition: parsers.cpp:171
bool parseBool(const string &s)
Convert text to bool.
Definition: parsers.cpp:144
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 228 of file commodityforward.cpp.

228 {
229
230 XMLNode* node = Trade::toXML(doc);
231 XMLNode* commodityDataNode = doc.allocNode("CommodityForwardData");
232 XMLUtils::appendNode(node, commodityDataNode);
233
234 XMLUtils::addChild(doc, commodityDataNode, "Position", position_);
235 XMLUtils::addChild(doc, commodityDataNode, "Maturity", maturityDate_);
236 XMLUtils::addChild(doc, commodityDataNode, "Name", commodityName_);
237 XMLUtils::addChild(doc, commodityDataNode, "Currency", currency_);
238 XMLUtils::addChild(doc, commodityDataNode, "Strike", strike_);
239 XMLUtils::addChild(doc, commodityDataNode, "Quantity", quantity_);
240
241 if (isFuturePrice_)
242 XMLUtils::addChild(doc, commodityDataNode, "IsFuturePrice", *isFuturePrice_);
243
244 if (futureExpiryDate_ != Date())
245 XMLUtils::addChild(doc, commodityDataNode, "FutureExpiryDate", to_string(futureExpiryDate_));
246
247 if (futureExpiryOffset_ != Period())
248 XMLUtils::addChild(doc, commodityDataNode, "FutureExpiryOffset", to_string(futureExpiryOffset_));
249
250 if (offsetCalendar_ != Calendar())
251 XMLUtils::addChild(doc, commodityDataNode, "FutureExpiryOffsetCalendar", to_string(offsetCalendar_));
252
254 XMLUtils::addChild(doc, commodityDataNode, "PhysicallySettled", *physicallySettled_);
255
256 if (paymentDate_ != Date())
257 XMLUtils::addChild(doc, commodityDataNode, "PaymentDate", to_string(paymentDate_));
258
259 if(fixingDate_!=Date()){ //NDF
260 XMLNode* settlementDataNode = doc.allocNode("SettlementData");
261 XMLUtils::appendNode(commodityDataNode, settlementDataNode);
262 XMLUtils::addChild(doc, settlementDataNode, "PayCurrency", payCcy_);
263 XMLUtils::addChild(doc, settlementDataNode, "FXIndex", fxIndex_);
264 XMLUtils::addChild(doc, settlementDataNode, "FixingDate", to_string(fixingDate_));
265 }
266
267 return node;
268}
std::string to_string(const LocationInfo &l)
Definition: ast.cpp:28
+ Here is the call graph for this function:

Member Data Documentation

◆ position_

std::string position_
private

Definition at line 95 of file commodityforward.hpp.

◆ commodityName_

std::string commodityName_
private

Definition at line 96 of file commodityforward.hpp.

◆ currency_

std::string currency_
private

Definition at line 97 of file commodityforward.hpp.

◆ quantity_

QuantLib::Real quantity_
private

Definition at line 98 of file commodityforward.hpp.

◆ maturityDate_

std::string maturityDate_
private

Definition at line 99 of file commodityforward.hpp.

◆ strike_

QuantLib::Real strike_
private

Definition at line 100 of file commodityforward.hpp.

◆ isFuturePrice_

boost::optional<bool> isFuturePrice_
private

Indicates if the forward underlying is a commodity future settlement price, true, or a spot price false. If not explicitly set, it is assumed to be false.

Definition at line 105 of file commodityforward.hpp.

◆ futureExpiryDate_

QuantLib::Date futureExpiryDate_
private

An explicit expiry date for the underlying future contract. This can be used if the trade references a future contract settlement price and the forward's maturity date does not match the future contract expiry date.

Definition at line 111 of file commodityforward.hpp.

◆ futureExpiryOffset_

QuantLib::Period futureExpiryOffset_
private

Future expiry offset and calendar.

Definition at line 114 of file commodityforward.hpp.

◆ offsetCalendar_

QuantLib::Calendar offsetCalendar_
private

Definition at line 115 of file commodityforward.hpp.

◆ physicallySettled_

boost::optional<bool> physicallySettled_
private

Definition at line 117 of file commodityforward.hpp.

◆ paymentDate_

QuantLib::Date paymentDate_
private

Definition at line 118 of file commodityforward.hpp.

◆ fixingDate_

QuantLib::Date fixingDate_
private

NDF currency, index and fixing date.

Definition at line 121 of file commodityforward.hpp.

◆ fxIndex_

std::string fxIndex_
private

Definition at line 122 of file commodityforward.hpp.

◆ payCcy_

std::string payCcy_
private

Definition at line 123 of file commodityforward.hpp.