Commodity curve configuration. More...
#include <ored/configuration/commoditycurveconfig.hpp>
Public Types | |
enum class | Type { Direct , CrossCurrency , Basis , Piecewise } |
Public Member Functions | |
Constructors | |
CommodityCurveConfig () | |
Default constructor. More... | |
CommodityCurveConfig (const std::string &curveId, const std::string &curveDescription, const std::string ¤cy, const std::vector< std::string > "es, const std::string &commoditySpotQuote="", const std::string &dayCountId="A365", const std::string &interpolationMethod="Linear", bool extrapolation=true, const std::string &conventionsId="") | |
Detailed constructor for Direct commodity curve configuration. More... | |
CommodityCurveConfig (const std::string &curveId, const std::string &curveDescription, const std::string ¤cy, const std::string &basePriceCurveId, const std::string &baseYieldCurveId, const std::string &yieldCurveId, bool extrapolation=true) | |
Detailed constructor for CrossCurrency commodity curve configuration. More... | |
CommodityCurveConfig (const std::string &curveId, const std::string &curveDescription, const std::string ¤cy, const std::string &basePriceCurveId, const std::string &baseConventionsId, const std::vector< std::string > &basisQuotes, const std::string &basisConventionsId, const std::string &dayCountId="A365", const std::string &interpolationMethod="Linear", bool extrapolation=true, bool addBasis=true, QuantLib::Natural monthOffset=0, bool averageBase=true) | |
Detailed constructor for Basis commodity curve configuration. More... | |
CommodityCurveConfig (const std::string &curveId, const std::string &curveDescription, const std::string ¤cy, const std::vector< PriceSegment > &priceSegments, const std::string &dayCountId="A365", const std::string &interpolationMethod="Linear", bool extrapolation=true, const boost::optional< BootstrapConfig > &bootstrapConfig=boost::none) | |
Detailed constructor for Piecewise commodity curve configuration. More... | |
Serialisation | |
void | fromXML (XMLNode *node) override |
XMLNode * | toXML (XMLDocument &doc) const override |
Inspectors | |
const Type & | type () const |
const std::string & | currency () const |
const std::string & | commoditySpotQuoteId () const |
const std::string & | dayCountId () const |
const std::string & | interpolationMethod () const |
const std::string & | basePriceCurveId () const |
const std::string & | baseYieldCurveId () const |
const std::string & | yieldCurveId () const |
bool | extrapolation () const |
const vector< string > & | fwdQuotes () const |
const std::string & | conventionsId () const |
const std::string & | baseConventionsId () const |
bool | addBasis () const |
QuantLib::Natural | monthOffset () const |
bool | averageBase () const |
bool | priceAsHistFixing () const |
const std::map< unsigned short, PriceSegment > & | priceSegments () const |
const boost::optional< BootstrapConfig > & | bootstrapConfig () const |
Public Member Functions inherited from CurveConfig | |
CurveConfig (const string &curveID, const string &curveDescription, const vector< string > "es=vector< string >()) | |
Detailed constructor. More... | |
CurveConfig () | |
Default constructor. More... | |
const string & | curveID () const |
const string & | curveDescription () const |
const set< string > & | requiredCurveIds (const CurveSpec::CurveType &curveType) const |
const map< CurveSpec::CurveType, set< string > > & | requiredCurveIds () const |
string & | curveID () |
string & | curveDescription () |
set< string > & | requiredCurveIds (const CurveSpec::CurveType &curveType) |
map< CurveSpec::CurveType, set< string > > & | requiredCurveIds () |
virtual const vector< string > & | quotes () |
Return all the market quotes required for this config. More... | |
Public Member Functions inherited from XMLSerializable | |
virtual | ~XMLSerializable () |
virtual void | fromXML (XMLNode *node)=0 |
virtual XMLNode * | toXML (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... | |
Additional Inherited Members | |
Protected Attributes inherited from CurveConfig | |
string | curveID_ |
string | curveDescription_ |
vector< string > | quotes_ |
map< CurveSpec::CurveType, set< string > > | requiredCurveIds_ |
Commodity curve configuration.
Definition at line 115 of file commoditycurveconfig.hpp.
|
strong |
The type of commodity curve that has been configured:
Enumerator | |
---|---|
Direct | |
CrossCurrency | |
Basis | |
Piecewise |
Definition at line 123 of file commoditycurveconfig.hpp.
Default constructor.
Definition at line 128 of file commoditycurveconfig.hpp.
CommodityCurveConfig | ( | const std::string & | curveId, |
const std::string & | curveDescription, | ||
const std::string & | currency, | ||
const std::vector< std::string > & | quotes, | ||
const std::string & | commoditySpotQuote = "" , |
||
const std::string & | dayCountId = "A365" , |
||
const std::string & | interpolationMethod = "Linear" , |
||
bool | extrapolation = true , |
||
const std::string & | conventionsId = "" |
||
) |
Detailed constructor for Direct commodity curve configuration.
Definition at line 155 of file commoditycurveconfig.cpp.
CommodityCurveConfig | ( | const std::string & | curveId, |
const std::string & | curveDescription, | ||
const std::string & | currency, | ||
const std::string & | basePriceCurveId, | ||
const std::string & | baseYieldCurveId, | ||
const std::string & | yieldCurveId, | ||
bool | extrapolation = true |
||
) |
Detailed constructor for CrossCurrency commodity curve configuration.
Definition at line 171 of file commoditycurveconfig.cpp.
CommodityCurveConfig | ( | const std::string & | curveId, |
const std::string & | curveDescription, | ||
const std::string & | currency, | ||
const std::string & | basePriceCurveId, | ||
const std::string & | baseConventionsId, | ||
const std::vector< std::string > & | basisQuotes, | ||
const std::string & | basisConventionsId, | ||
const std::string & | dayCountId = "A365" , |
||
const std::string & | interpolationMethod = "Linear" , |
||
bool | extrapolation = true , |
||
bool | addBasis = true , |
||
QuantLib::Natural | monthOffset = 0 , |
||
bool | averageBase = true |
||
) |
Detailed constructor for Basis commodity curve configuration.
Definition at line 181 of file commoditycurveconfig.cpp.
CommodityCurveConfig | ( | const std::string & | curveId, |
const std::string & | curveDescription, | ||
const std::string & | currency, | ||
const std::vector< PriceSegment > & | priceSegments, | ||
const std::string & | dayCountId = "A365" , |
||
const std::string & | interpolationMethod = "Linear" , |
||
bool | extrapolation = true , |
||
const boost::optional< BootstrapConfig > & | bootstrapConfig = boost::none |
||
) |
Detailed constructor for Piecewise commodity curve configuration.
Definition at line 194 of file commoditycurveconfig.cpp.
|
overridevirtual |
Implements XMLSerializable.
Definition at line 204 of file commoditycurveconfig.cpp.
|
overridevirtual |
Implements XMLSerializable.
Definition at line 270 of file commoditycurveconfig.cpp.
const Type & type | ( | ) | const |
Definition at line 165 of file commoditycurveconfig.hpp.
const std::string & currency | ( | ) | const |
Definition at line 166 of file commoditycurveconfig.hpp.
const std::string & commoditySpotQuoteId | ( | ) | const |
Definition at line 167 of file commoditycurveconfig.hpp.
const std::string & dayCountId | ( | ) | const |
Definition at line 168 of file commoditycurveconfig.hpp.
const std::string & interpolationMethod | ( | ) | const |
Definition at line 169 of file commoditycurveconfig.hpp.
const std::string & basePriceCurveId | ( | ) | const |
Definition at line 170 of file commoditycurveconfig.hpp.
const std::string & baseYieldCurveId | ( | ) | const |
Definition at line 171 of file commoditycurveconfig.hpp.
const std::string & yieldCurveId | ( | ) | const |
Definition at line 172 of file commoditycurveconfig.hpp.
bool extrapolation | ( | ) | const |
Definition at line 173 of file commoditycurveconfig.hpp.
const vector< string > & fwdQuotes | ( | ) | const |
Definition at line 174 of file commoditycurveconfig.hpp.
const std::string & conventionsId | ( | ) | const |
Definition at line 175 of file commoditycurveconfig.hpp.
const std::string & baseConventionsId | ( | ) | const |
Definition at line 176 of file commoditycurveconfig.hpp.
bool addBasis | ( | ) | const |
Definition at line 177 of file commoditycurveconfig.hpp.
QuantLib::Natural monthOffset | ( | ) | const |
Definition at line 178 of file commoditycurveconfig.hpp.
bool averageBase | ( | ) | const |
Definition at line 179 of file commoditycurveconfig.hpp.
bool priceAsHistFixing | ( | ) | const |
Definition at line 180 of file commoditycurveconfig.hpp.
const std::map< unsigned short, PriceSegment > & priceSegments | ( | ) | const |
Definition at line 181 of file commoditycurveconfig.hpp.
const boost::optional< BootstrapConfig > & bootstrapConfig | ( | ) | const |
Definition at line 182 of file commoditycurveconfig.hpp.
Type & type | ( | ) |
Definition at line 187 of file commoditycurveconfig.hpp.
std::string & currency | ( | ) |
Definition at line 188 of file commoditycurveconfig.hpp.
std::string & commoditySpotQuoteId | ( | ) |
Definition at line 189 of file commoditycurveconfig.hpp.
std::string & dayCountId | ( | ) |
Definition at line 190 of file commoditycurveconfig.hpp.
std::string & interpolationMethod | ( | ) |
Definition at line 191 of file commoditycurveconfig.hpp.
std::string & basePriceCurveId | ( | ) |
Definition at line 192 of file commoditycurveconfig.hpp.
std::string & baseYieldCurveId | ( | ) |
Definition at line 193 of file commoditycurveconfig.hpp.
std::string & yieldCurveId | ( | ) |
Definition at line 194 of file commoditycurveconfig.hpp.
bool & extrapolation | ( | ) |
Definition at line 195 of file commoditycurveconfig.hpp.
std::string & conventionsId | ( | ) |
Definition at line 196 of file commoditycurveconfig.hpp.
std::string & baseConventionsId | ( | ) |
Definition at line 197 of file commoditycurveconfig.hpp.
bool & addBasis | ( | ) |
Definition at line 198 of file commoditycurveconfig.hpp.
QuantLib::Natural & monthOffset | ( | ) |
Definition at line 199 of file commoditycurveconfig.hpp.
bool & averageBase | ( | ) |
Definition at line 200 of file commoditycurveconfig.hpp.
bool & priceAsHistFixing | ( | ) |
Definition at line 201 of file commoditycurveconfig.hpp.
void setPriceSegments | ( | const std::map< unsigned short, PriceSegment > & | priceSegments | ) |
void setBootstrapConfig | ( | const BootstrapConfig & | bootstrapConfig | ) |
|
private |
Populate any dependent curve IDs.
Definition at line 328 of file commoditycurveconfig.cpp.
|
private |
Process price segments when configuring a Piecewise curve.
Definition at line 337 of file commoditycurveconfig.cpp.
|
private |
Definition at line 215 of file commoditycurveconfig.hpp.
|
private |
Definition at line 216 of file commoditycurveconfig.hpp.
|
private |
Definition at line 217 of file commoditycurveconfig.hpp.
|
private |
Definition at line 218 of file commoditycurveconfig.hpp.
|
private |
Definition at line 219 of file commoditycurveconfig.hpp.
|
private |
Definition at line 220 of file commoditycurveconfig.hpp.
|
private |
Definition at line 221 of file commoditycurveconfig.hpp.
|
private |
Definition at line 222 of file commoditycurveconfig.hpp.
|
private |
Definition at line 223 of file commoditycurveconfig.hpp.
|
private |
Definition at line 224 of file commoditycurveconfig.hpp.
|
private |
Definition at line 225 of file commoditycurveconfig.hpp.
|
private |
Definition at line 226 of file commoditycurveconfig.hpp.
|
private |
Definition at line 227 of file commoditycurveconfig.hpp.
|
private |
Definition at line 228 of file commoditycurveconfig.hpp.
|
private |
Definition at line 229 of file commoditycurveconfig.hpp.
|
private |
Definition at line 230 of file commoditycurveconfig.hpp.
|
private |
The map key is the internal priority of the price segment and does not necessarily map the PriceSegment's priority member value. We are allowing here for the priority to be unspecified in the PriceSegment during configuration.
Definition at line 235 of file commoditycurveconfig.hpp.
|
private |
Definition at line 236 of file commoditycurveconfig.hpp.