Logo
Reference manual - version qle_version
Public Types | List of all members
PiecewisePriceCurve< Interpolator, Bootstrap > Class Template Reference

Piecewise price term structure. More...

#include <qle/termstructures/piecewisepricecurve.hpp>

+ Inheritance diagram for PiecewisePriceCurve< Interpolator, Bootstrap >:

Public Types

typedef PiecewisePriceCurve< Interpolator, Bootstrap > this_curve
 
typedef QuantLib::BootstrapHelper< PriceTermStructurehelper
 
typedef PriceTraits traits_type
 
typedef Interpolator interpolator_type
 

Public Member Functions

Constructors
 PiecewisePriceCurve (const QuantLib::Date &referenceDate, const std::vector< boost::shared_ptr< helper > > &instruments, const QuantLib::DayCounter &dayCounter, const QuantLib::Currency &currency, const Interpolator &i=Interpolator(), const Bootstrap< this_curve > &bootstrap=Bootstrap< this_curve >())
 
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.
 
InterpolatedPriceCurve interface
const std::vector< QuantLib::Time > & times () const
 
const std::vector< QuantLib::Real > & prices () const
 
const boost::shared_ptr< helper > & instrument (QuantLib::Size i) const
 Return the i-th instrument.
 
- Public Member Functions inherited from InterpolatedPriceCurve< Interpolator >
 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.
 
void update () override
 
QuantLib::Date maxDate () const override
 
QuantLib::Time maxTime () const override
 
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.
 
const std::vector< QuantLib::Time > & times () const
 
const std::vector< QuantLib::Real > & prices () const
 
- 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
 

PriceTermStructure implementation

class Bootstrap< this_curve >
 
class BootstrapError< this_curve >
 
class PenaltyFunction< this_curve >
 

Additional Inherited Members

- Protected Member Functions inherited from InterpolatedPriceCurve< Interpolator >
void performCalculations () const override
 
QuantLib::Real priceImpl (QuantLib::Time t) const override
 Price calculation.
 
 InterpolatedPriceCurve (const QuantLib::Date &referenceDate, const QuantLib::DayCounter &dc, const QuantLib::Currency &currency, const Interpolator &interpolator=Interpolator())
 Used by PiecewisePriceCurve.
 
- 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.
 
- Protected Attributes inherited from InterpolatedPriceCurve< Interpolator >
std::vector< QuantLib::Date > dates_
 

Detailed Description

template<class Interpolator, template< class > class Bootstrap = IterativeBootstrap>
class QuantExt::PiecewisePriceCurve< Interpolator, Bootstrap >

Piecewise price term structure.

This term structure is bootstrapped on a number of instruments which are passed as a vector of handles to PriceHelper instances. Their maturities mark the boundaries of the interpolated segments.

Each segment is determined sequentially starting from the earliest period to the latest and is chosen so that the instrument whose maturity marks the end of such segment is correctly repriced on the curve.

Warning:
The bootstrapping algorithm raises an exception if any two instruments have the same maturity date.