32 ext::shared_ptr<CommodityCurve> forwardCurve,
33 ext::shared_ptr<ExchangeContracts> exchangeContracts,
35 : name_(
std::move(indexName)), commodityType_(
std::move(commodityType)),
36 unitOfMeasure_(
std::move(unitOfMeasure)), currency_(
std::move(currency)),
37 calendar_(
std::move(calendar)), lotQuantity_(lotQuantity),
38 forwardCurve_(
std::move(forwardCurve)), exchangeContracts_(
std::move(exchangeContracts)),
39 nearbyOffset_(nearbyOffset) {
53 out <<
"[" << index.
name_ <<
"] ("
base class for commodity indexes
UnitOfMeasure unitOfMeasure_
Real forwardCurveUomConversionFactor_
CommodityType commodityType_
CommodityIndex(std::string name, CommodityType commodityType, Currency currency, UnitOfMeasure unitOfMeasure, Calendar calendar, Real lotQuantity, ext::shared_ptr< CommodityCurve > forwardCurve, ext::shared_ptr< ExchangeContracts > exchangeContracts, int nearbyOffset)
ext::shared_ptr< CommodityCurve > forwardCurve_
static Real calculateUomConversionFactor(const CommodityType &commodityType, const UnitOfMeasure &fromUnitOfMeasure, const UnitOfMeasure &toUnitOfMeasure)
const std::string & code() const
ISO 4217 three-letter code, e.g, "USD".
ext::shared_ptr< Observable > notifier() const
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
static Settings & instance()
access to the unique instance
Unit of measure specification
const std::string & code() const
code, e.g, "BBL", "MT"
Commodity pricing helpers.
std::ostream & operator<<(std::ostream &out, GFunctionFactory::YieldCurveModel type)