Off peak power index. More...
#include <qle/indexes/offpeakpowerindex.hpp>
Public Member Functions | |
OffPeakPowerIndex (const std::string &underlyingName, const QuantLib::Date &expiryDate, const QuantLib::ext::shared_ptr< CommodityFuturesIndex > &offPeakIndex, const QuantLib::ext::shared_ptr< CommodityFuturesIndex > &peakIndex, QuantLib::Real offPeakHours, const QuantLib::Calendar &peakCalendar, const Handle< QuantExt::PriceTermStructure > &priceCurve=Handle< QuantExt::PriceTermStructure >()) | |
Constructor. More... | |
Inspectors | |
const QuantLib::ext::shared_ptr< CommodityFuturesIndex > & | offPeakIndex () const |
const QuantLib::ext::shared_ptr< CommodityFuturesIndex > & | peakIndex () const |
QuantLib::Real | offPeakHours () const |
const QuantLib::Calendar & | peakCalendar () const |
QuantLib::ext::shared_ptr< CommodityIndex > | clone (const QuantLib::Date &expiryDate, const boost::optional< QuantLib::Handle< PriceTermStructure > > &ts=boost::none) const override |
Implement the base clone. More... | |
Public Member Functions inherited from CommodityFuturesIndex | |
CommodityFuturesIndex (const std::string &underlyingName, const Date &expiryDate, const Calendar &fixingCalendar, const Handle< QuantExt::PriceTermStructure > &priceCurve=Handle< QuantExt::PriceTermStructure >()) | |
CommodityFuturesIndex (const std::string &underlyingName, const Date &expiryDate, const Calendar &fixingCalendar, bool keepDays, const Handle< QuantExt::PriceTermStructure > &priceCurve=Handle< QuantExt::PriceTermStructure >()) | |
QuantLib::ext::shared_ptr< CommodityIndex > | clone (const QuantLib::Date &expiryDate=QuantLib::Date(), const boost::optional< QuantLib::Handle< PriceTermStructure > > &ts=boost::none) const override |
Implement the base clone. More... | |
Public Member Functions inherited from CommodityIndex | |
CommodityIndex (const std::string &underlyingName, const QuantLib::Date &expiryDate, const Calendar &fixingCalendar, const Handle< QuantExt::PriceTermStructure > &priceCurve=Handle< QuantExt::PriceTermStructure >()) | |
CommodityIndex (const std::string &underlyingName, const QuantLib::Date &expiryDate, const Calendar &fixingCalendar, bool keepDays, const Handle< QuantExt::PriceTermStructure > &priceCurve=Handle< QuantExt::PriceTermStructure >()) | |
std::string | name () const override |
Calendar | fixingCalendar () const override |
bool | isValidFixingDate (const Date &fixingDate) const override |
Real | fixing (const Date &fixingDate, bool forecastTodaysFixing=false) const override |
void | update () override |
std::string | underlyingName () const |
const Handle< QuantExt::PriceTermStructure > & | priceCurve () const |
bool | isFuturesIndex () const |
const QuantLib::Date & | expiryDate () const |
bool | keepDays () const |
virtual Real | forecastFixing (const Date &fixingDate) const |
virtual Real | forecastFixing (const Time &fixingTime) const override |
returns the fixing at the given time More... | |
Public Member Functions inherited from EqFxIndexBase | |
virtual | ~EqFxIndexBase () |
virtual Real | forecastFixing (const Time &fixingTime) const =0 |
returns the fixing at the given time More... | |
virtual Real | pastFixing (const Date &fixingDate) const =0 |
returns a past fixing at the given date More... | |
CommodityIndex interface | |
QuantLib::ext::shared_ptr< CommodityFuturesIndex > | offPeakIndex_ |
QuantLib::ext::shared_ptr< CommodityFuturesIndex > | peakIndex_ |
QuantLib::Real | offPeakHours_ |
QuantLib::Calendar | peakCalendar_ |
Real | pastFixing (const Date &fixingDate) const override |
returns a past fixing at the given date More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CommodityIndex | |
void | init () |
Protected Attributes inherited from CommodityIndex | |
std::string | underlyingName_ |
Date | expiryDate_ |
Calendar | fixingCalendar_ |
Handle< QuantExt::PriceTermStructure > | curve_ |
std::string | name_ |
bool | isFuturesIndex_ |
bool | keepDays_ |
Off peak power index.
A commodity index to represent daily off-peak power prices.
In general, when used in derivatives the off-peak power value for a given date will be:
There are generally two types of daily futures in the power markets:
This off peak power index uses the prices of both of these daily future contracts to construct the index that is used in derivatives that reference off-peak power prices. The off-peak future is used directly on peak calendar business days. On peak calendar holidays, the weighted average of the daily off-peak future price and daily peak future price is used where the weights are the number of off-peak hours and peak hours respectively divided by 24.
Definition at line 50 of file offpeakpowerindex.hpp.
OffPeakPowerIndex | ( | const std::string & | underlyingName, |
const QuantLib::Date & | expiryDate, | ||
const QuantLib::ext::shared_ptr< CommodityFuturesIndex > & | offPeakIndex, | ||
const QuantLib::ext::shared_ptr< CommodityFuturesIndex > & | peakIndex, | ||
QuantLib::Real | offPeakHours, | ||
const QuantLib::Calendar & | peakCalendar, | ||
const Handle< QuantExt::PriceTermStructure > & | priceCurve = Handle<QuantExt::PriceTermStructure>() |
||
) |
Constructor.
Definition at line 30 of file offpeakpowerindex.cpp.
const QuantLib::ext::shared_ptr< CommodityFuturesIndex > & offPeakIndex | ( | ) | const |
const QuantLib::ext::shared_ptr< CommodityFuturesIndex > & peakIndex | ( | ) | const |
Real offPeakHours | ( | ) | const |
Definition at line 60 of file offpeakpowerindex.cpp.
const Calendar & peakCalendar | ( | ) | const |
Definition at line 64 of file offpeakpowerindex.cpp.
|
overridevirtual |
Implement the base clone.
Reimplemented from CommodityFuturesIndex.
Definition at line 68 of file offpeakpowerindex.cpp.
|
overrideprotectedvirtual |
returns a past fixing at the given date
the date passed as arguments must be the actual calendar date of the fixing; no settlement days must be used.
Reimplemented from CommodityIndex.
Definition at line 78 of file offpeakpowerindex.cpp.
|
private |
Definition at line 80 of file offpeakpowerindex.hpp.
|
private |
Definition at line 81 of file offpeakpowerindex.hpp.
|
private |
Definition at line 82 of file offpeakpowerindex.hpp.
|
private |
Definition at line 83 of file offpeakpowerindex.hpp.