|
QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
|
Commodity term structure. More...
#include <ql/experimental/commodities/commoditycurve.hpp>
Public Member Functions | |
| CommodityCurve (std::string name, CommodityType commodityType, Currency currency, UnitOfMeasure unitOfMeasure, const Calendar &calendar, const std::vector< Date > &dates, std::vector< Real > prices, const DayCounter &dayCounter=Actual365Fixed()) | |
| CommodityCurve (std::string name, CommodityType commodityType, Currency currency, UnitOfMeasure unitOfMeasure, const Calendar &calendar, const DayCounter &dayCounter=Actual365Fixed()) | |
| Public Member Functions inherited from TermStructure | |
| TermStructure (DayCounter dc=DayCounter()) | |
| default constructor | |
| TermStructure (const Date &referenceDate, Calendar calendar=Calendar(), DayCounter dc=DayCounter()) | |
| initialize with a fixed reference date | |
| TermStructure (Natural settlementDays, Calendar, DayCounter dc=DayCounter()) | |
| calculate the reference date based on the global evaluation date | |
| virtual DayCounter | dayCounter () const |
| the day counter used for date/time conversion | |
| Time | timeFromReference (const Date &date) const |
| date/time conversion | |
| virtual Time | maxTime () const |
| the latest time for which the curve can return values | |
| virtual const Date & | referenceDate () const |
| the date at which discount = 1.0 and/or variance = 0.0 | |
| virtual Calendar | calendar () const |
| the calendar used for reference and/or option date calculation | |
| virtual Natural | settlementDays () const |
| the settlementDays used for reference date calculation | |
| void | update () override |
| Public Member Functions inherited from Observer | |
| Observer (const Observer &) | |
| Observer & | operator= (const Observer &) |
| std::pair< iterator, bool > | registerWith (const ext::shared_ptr< Observable > &) |
| void | registerWithObservables (const ext::shared_ptr< Observer > &) |
| Size | unregisterWith (const ext::shared_ptr< Observable > &) |
| void | unregisterWithAll () |
| virtual void | deepUpdate () |
| Public Member Functions inherited from Observable | |
| Observable (const Observable &) | |
| Observable & | operator= (const Observable &) |
| Observable (Observable &&)=delete | |
| Observable & | operator= (Observable &&)=delete |
| void | notifyObservers () |
| Public Member Functions inherited from Extrapolator | |
| void | enableExtrapolation (bool b=true) |
| enable extrapolation in subsequent calls | |
| void | disableExtrapolation (bool b=true) |
| disable extrapolation in subsequent calls | |
| bool | allowsExtrapolation () const |
| tells whether extrapolation is enabled | |
Friends | |
| class | CommodityIndex |
Inspectors | |
| std::ostream & | operator<< (std::ostream &out, const CommodityCurve &curve) |
| std::string | name_ |
| CommodityType | commodityType_ |
| UnitOfMeasure | unitOfMeasure_ |
| Currency | currency_ |
| std::vector< Date > | dates_ |
| std::vector< Time > | times_ |
| std::vector< Real > | data_ |
| Interpolation | interpolation_ |
| ForwardFlat | interpolator_ |
| ext::shared_ptr< CommodityCurve > | basisOfCurve_ |
| Real | basisOfCurveUomConversionFactor_ |
| const std::string & | name () const |
| const CommodityType & | commodityType () const |
| const UnitOfMeasure & | unitOfMeasure () const |
| const Currency & | currency () const |
| Date | maxDate () const override |
| the latest date for which the curve can return values | |
| const std::vector< Time > & | times () const |
| const std::vector< Date > & | dates () const |
| const std::vector< Real > & | prices () const |
| std::vector< std::pair< Date, Real > > | nodes () const |
| bool | empty () const |
| void | setPrices (std::map< Date, Real > &prices) |
| void | setBasisOfCurve (const ext::shared_ptr< CommodityCurve > &basisOfCurve) |
| Real | price (const Date &d, const ext::shared_ptr< ExchangeContracts > &exchangeContracts, Integer nearbyOffset) const |
| Real | basisOfPrice (const Date &d) const |
| Date | underlyingPriceDate (const Date &date, const ext::shared_ptr< ExchangeContracts > &exchangeContracts, Integer nearbyOffset) const |
| const ext::shared_ptr< CommodityCurve > & | basisOfCurve () const |
| Real | basisOfPriceImpl (Time t) const |
| Real | priceImpl (Time t) const |
Additional Inherited Members | |
| Public Types inherited from Observer | |
| typedef set_type::iterator | iterator |
| void | checkRange (const Date &d, bool extrapolate) const |
| date-range check | |
| void | checkRange (Time t, bool extrapolate) const |
| time-range check | |
| bool | moving_ = false |
| bool | updated_ = true |
| Calendar | calendar_ |
Commodity term structure.
|
overridevirtual |
the latest date for which the curve can return values
Implements TermStructure.