Logo
Reference manual - version qle_version
List of all members
InterpolatedPriceCurve< Interpolator > Class Template Reference

Interpolated price curve. More...

#include <qle/termstructures/pricecurve.hpp>

+ Inheritance diagram for InterpolatedPriceCurve< Interpolator >:

Public Member Functions

Constructors
 InterpolatedPriceCurve (const std::vector< QuantLib::Period > &tenors, const std::vector< QuantLib::Real > &prices, const QuantLib::DayCounter &dc, const QuantLib::Currency &currency, const Interpolator &interpolator=Interpolator())
 Curve constructed from periods and prices. No conventions are applied in getting to a date from a period.
 
 InterpolatedPriceCurve (const std::vector< QuantLib::Period > &tenors, const std::vector< QuantLib::Handle< QuantLib::Quote > > &quotes, const QuantLib::DayCounter &dc, const QuantLib::Currency &currency, const Interpolator &interpolator=Interpolator())
 Curve constructed from periods and quotes. No conventions are applied in getting to a date from a period.
 
 InterpolatedPriceCurve (const QuantLib::Date &referenceDate, const std::vector< QuantLib::Date > &dates, const std::vector< QuantLib::Real > &prices, const QuantLib::DayCounter &dc, const QuantLib::Currency &currency, const Interpolator &interpolator=Interpolator())
 Curve constructed from dates and prices.
 
 InterpolatedPriceCurve (const QuantLib::Date &referenceDate, const std::vector< QuantLib::Date > &dates, const std::vector< QuantLib::Handle< QuantLib::Quote > > &quotes, const QuantLib::DayCounter &dc, const QuantLib::Currency &currency, const Interpolator &interpolator=Interpolator())
 Curve constructed from dates and quotes.
 
Observer interface
void update () override
 
TermStructure interface
QuantLib::Date maxDate () const override
 
QuantLib::Time maxTime () const override
 
PriceTermStructure interface
QuantLib::Time minTime () const override
 The minimum time for which the curve can return values.
 
std::vector< QuantLib::Date > pillarDates () const override
 The pillar dates for the PriceTermStructure.
 
const QuantLib::Currency & currency () const override
 The currency in which prices are expressed.
 
- Public Member Functions inherited from PriceTermStructure
 PriceTermStructure (const QuantLib::DayCounter &dc=QuantLib::DayCounter())
 
 PriceTermStructure (const QuantLib::Date &referenceDate, const QuantLib::Calendar &cal=QuantLib::Calendar(), const QuantLib::DayCounter &dc=QuantLib::DayCounter())
 
 PriceTermStructure (QuantLib::Natural settlementDays, const QuantLib::Calendar &cal, const QuantLib::DayCounter &dc=QuantLib::DayCounter())
 
QuantLib::Real price (QuantLib::Time t, bool extrapolate=false) const
 
QuantLib::Real price (const QuantLib::Date &d, bool extrapolate=false) const
 
void update () override
 

Protected Member Functions

LazyObject interface
void performCalculations () const override
 
- Protected Member Functions inherited from PriceTermStructure
void checkRange (QuantLib::Time t, bool extrapolate) const
 Extra time range check for minimum time, then calls TermStructure::checkRange.
 

PriceTermStructure implementation

std::vector< QuantLib::Date > dates_
 
QuantLib::Real priceImpl (QuantLib::Time t) const override
 Price calculation.
 

Inspectors

const std::vector< QuantLib::Time > & times () const
 
const std::vector< QuantLib::Real > & prices () const
 
 InterpolatedPriceCurve (const QuantLib::Date &referenceDate, const QuantLib::DayCounter &dc, const QuantLib::Currency &currency, const Interpolator &interpolator=Interpolator())
 Used by PiecewisePriceCurve.
 

Detailed Description

template<class Interpolator>
class QuantExt::InterpolatedPriceCurve< Interpolator >

Interpolated price curve.

Class representing a curve of projected prices in the future.

Warning:
for consistency, if curve is constructed by inferring times from dates using a given day counter, pass the same day counter to the constructor