Commodity forward quote class. More...
#include <ored/marketdata/marketdatum.hpp>
Public Member Functions | |
CommodityForwardQuote () | |
CommodityForwardQuote (QuantLib::Real value, const QuantLib::Date &asofDate, const std::string &name, QuoteType quoteType, const std::string &commodityName, const std::string "eCurrency, const QuantLib::Date &expiryDate) | |
Date based commodity forward constructor. More... | |
CommodityForwardQuote (QuantLib::Real value, const QuantLib::Date &asofDate, const std::string &name, QuoteType quoteType, const std::string &commodityName, const std::string "eCurrency, const QuantLib::Period &tenor, boost::optional< QuantLib::Period > startTenor=boost::none) | |
Tenor based commodity forward constructor. More... | |
QuantLib::ext::shared_ptr< MarketDatum > | clone () override |
Make a copy of the market datum. More... | |
Public Member Functions inherited from MarketDatum | |
MarketDatum () | |
MarketDatum (Real value, Date asofDate, const string &name, QuoteType quoteType, InstrumentType instrumentType) | |
Constructor. More... | |
virtual | ~MarketDatum () |
Default destructor. More... | |
virtual QuantLib::ext::shared_ptr< MarketDatum > | clone () |
Make a copy of the market datum. More... | |
const string & | name () const |
const Handle< Quote > & | quote () const |
Date | asofDate () const |
InstrumentType | instrumentType () const |
QuoteType | quoteType () const |
Inspectors | |
std::string | commodityName_ |
std::string | quoteCurrency_ |
QuantLib::Date | expiryDate_ |
QuantLib::Period | tenor_ |
boost::optional< QuantLib::Period > | startTenor_ |
bool | tenorBased_ |
class | boost::serialization::access |
Serialization. More... | |
const std::string & | commodityName () const |
const std::string & | quoteCurrency () const |
const QuantLib::Date & | expiryDate () const |
The commodity forward's expiry if the quote is date based. More... | |
const QuantLib::Period & | tenor () const |
The commodity forward's tenor if the quote is tenor based. More... | |
const boost::optional< QuantLib::Period > & | startTenor () const |
bool | tenorBased () const |
Returns true if the forward is tenor based and false if forward is date based. More... | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Commodity forward quote class.
This class holds a forward price for a commodity in a given currency
Definition at line 1730 of file marketdatum.hpp.
Definition at line 1732 of file marketdatum.hpp.
CommodityForwardQuote | ( | QuantLib::Real | value, |
const QuantLib::Date & | asofDate, | ||
const std::string & | name, | ||
QuoteType | quoteType, | ||
const std::string & | commodityName, | ||
const std::string & | quoteCurrency, | ||
const QuantLib::Date & | expiryDate | ||
) |
Date based commodity forward constructor.
Definition at line 207 of file marketdatum.cpp.
CommodityForwardQuote | ( | QuantLib::Real | value, |
const QuantLib::Date & | asofDate, | ||
const std::string & | name, | ||
QuoteType | quoteType, | ||
const std::string & | commodityName, | ||
const std::string & | quoteCurrency, | ||
const QuantLib::Period & | tenor, | ||
boost::optional< QuantLib::Period > | startTenor = boost::none |
||
) |
Tenor based commodity forward constructor.
Definition at line 218 of file marketdatum.cpp.
|
overridevirtual |
Make a copy of the market datum.
Reimplemented from MarketDatum.
Definition at line 1744 of file marketdatum.hpp.
const std::string & commodityName | ( | ) | const |
Definition at line 1754 of file marketdatum.hpp.
const std::string & quoteCurrency | ( | ) | const |
Definition at line 1755 of file marketdatum.hpp.
const QuantLib::Date & expiryDate | ( | ) | const |
The commodity forward's expiry if the quote is date based.
Definition at line 1758 of file marketdatum.hpp.
const QuantLib::Period & tenor | ( | ) | const |
The commodity forward's tenor if the quote is tenor based.
Definition at line 1761 of file marketdatum.hpp.
const boost::optional< QuantLib::Period > & startTenor | ( | ) | const |
The period between the as of date and the date from which the forward tenor is applied. This is generally the spot tenor which is indicated by boost::none
but there are special cases:
startTenor
will be 0 * Days
and tenor
will be 1 * Days
startTenor
will be 1 * Days
and tenor
will be 1 * Days
Definition at line 1768 of file marketdatum.hpp.
bool tenorBased | ( | ) | const |
Returns true
if the forward is tenor based and false
if forward is date based.
Definition at line 1771 of file marketdatum.hpp.
|
private |
Definition at line 614 of file marketdatum.cpp.
|
friend |
Serialization.
Definition at line 1782 of file marketdatum.hpp.
|
private |
Definition at line 1775 of file marketdatum.hpp.
|
private |
Definition at line 1776 of file marketdatum.hpp.
|
private |
Definition at line 1777 of file marketdatum.hpp.
|
private |
Definition at line 1778 of file marketdatum.hpp.
|
private |
Definition at line 1779 of file marketdatum.hpp.
|
private |
Definition at line 1780 of file marketdatum.hpp.