Logo
Reference manual - version ored_version
CommodityFixedLegData Class Reference
Inheritance diagram for CommodityFixedLegData:

Public Member Functions

 CommodityFixedLegData ()
 Default constructor.
 CommodityFixedLegData (const std::vector< QuantLib::Real > &quantities, const std::vector< std::string > &quantityDates, const std::vector< QuantLib::Real > &prices, const std::vector< std::string > &priceDates, CommodityPayRelativeTo commodityPayRelativeTo, const std::string &tag=std::string())
 Detailed constructor.
Inspectors
const std::vector< QuantLib::Real > & quantities () const
const std::vector< std::string > & quantityDates () const
const std::vector< QuantLib::Real > & prices () const
const std::vector< std::string > & priceDates () const
CommodityPayRelativeTo commodityPayRelativeTo () const
const std::string & foreignCurrency () const
const std::string & tag () const
void setQuantities (const std::vector< QuantLib::Real > &quantities)
 Set the fixed leg data quantities.
void setForeignCurrency (const std::string foreignCurrency)
Public Member Functions inherited from LegAdditionalData
 LegAdditionalData (const LegType &legType, const string &legNodeName, bool isSimmPlainVanillaIrLeg)
 LegAdditionalData (const LegType &legType, bool isSimmPlainVanillaIrLeg)
 LegAdditionalData (const string &, const char *)=delete
const LegType & legType () const
const stringlegNodeName () const
const std::set< std::string > & indices () const
const bool isSimmPlainVanillaIrLeg () const
 check if a x-ccy swap with the leg qualifies for the isda simm exemption treatment
Public Member Functions inherited from XMLSerializable
void fromFile (const std::string &filename)
void toFile (const std::string &filename) const
void fromXMLString (const std::string &xml)
 Parse from XML string.
std::string toXMLString () const
 Parse from XML string.
std::string toXMLStringUnformatted () const

Serialisation

void fromXML (ore::data::XMLNode *node) override
ore::data::XMLNode * toXML (ore::data::XMLDocument &doc) const override

Additional Inherited Members

Protected Attributes inherited from LegAdditionalData
std::set< std::string > indices_

Member Function Documentation

◆ setQuantities()

void setQuantities ( const std::vector< QuantLib::Real > & quantities)

Set the fixed leg data quantities.

For commodity swaps, there can be a number of conventions provided with the floating leg data quantities that when taken together can be used to calculate the commodity quantity for the full calculation period. Instead of duplicating that data here, we allow the fixed leg data quantities to be set using this method before being passed to the commodity fixed leg builder. The idea is that the quantities will be set by referencing the quantities from the corresponding floating leg of the swap after that leg has been built.

◆ fromXML()

void fromXML ( ore::data::XMLNode * node)
overridevirtual

Implements XMLSerializable.

◆ toXML()

ore::data::XMLNode * toXML ( ore::data::XMLDocument & doc) const
overridevirtual

Implements XMLSerializable.