Piecewise price term structure. More...
#include <qle/termstructures/piecewisepricecurve.hpp>
Public Types | |
typedef PiecewisePriceCurve< Interpolator, Bootstrap > | this_curve |
typedef QuantLib::BootstrapHelper< PriceTermStructure > | helper |
typedef PriceTraits | traits_type |
typedef Interpolator | interpolator_type |
Public Member Functions | |
Constructors | |
PiecewisePriceCurve (const QuantLib::Date &referenceDate, const std::vector< QuantLib::ext::shared_ptr< helper > > &instruments, const QuantLib::DayCounter &dayCounter, const QuantLib::Currency ¤cy, 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. More... | |
std::vector< QuantLib::Date > | pillarDates () const override |
The pillar dates for the PriceTermStructure. More... | |
InterpolatedPriceCurve interface | |
const std::vector< QuantLib::Time > & | times () const |
const std::vector< QuantLib::Real > & | prices () const |
const QuantLib::ext::shared_ptr< helper > & | instrument (QuantLib::Size i) const |
Return the i-th instrument. More... | |
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 ¤cy, const Interpolator &interpolator=Interpolator()) | |
Curve constructed from periods and prices. No conventions are applied in getting to a date from a period. More... | |
InterpolatedPriceCurve (const std::vector< QuantLib::Period > &tenors, const std::vector< QuantLib::Handle< QuantLib::Quote > > "es, const QuantLib::DayCounter &dc, const QuantLib::Currency ¤cy, const Interpolator &interpolator=Interpolator()) | |
Curve constructed from periods and quotes. No conventions are applied in getting to a date from a period. More... | |
InterpolatedPriceCurve (const QuantLib::Date &referenceDate, const std::vector< QuantLib::Date > &dates, const std::vector< QuantLib::Real > &prices, const QuantLib::DayCounter &dc, const QuantLib::Currency ¤cy, const Interpolator &interpolator=Interpolator()) | |
Curve constructed from dates and prices. More... | |
InterpolatedPriceCurve (const QuantLib::Date &referenceDate, const std::vector< QuantLib::Date > &dates, const std::vector< QuantLib::Handle< QuantLib::Quote > > "es, const QuantLib::DayCounter &dc, const QuantLib::Currency ¤cy, const Interpolator &interpolator=Interpolator()) | |
Curve constructed from dates and quotes. More... | |
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. More... | |
std::vector< QuantLib::Date > | pillarDates () const override |
The pillar dates for the PriceTermStructure. More... | |
const QuantLib::Currency & | currency () const override |
The currency in which prices are expressed. More... | |
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 |
Private Types | |
typedef InterpolatedPriceCurve< Interpolator > | base_curve |
Private Member Functions | |
LazyObject interface | |
void | performCalculations () const override |
PriceTermStructure implementation | |
std::vector< QuantLib::ext::shared_ptr< helper > > | instruments_ |
Real | accuracy_ |
Bootstrap< this_curve > | bootstrap_ |
class | Bootstrap< this_curve > |
class | BootstrapError< this_curve > |
class | PenaltyFunction< this_curve > |
QuantLib::Real | priceImpl (QuantLib::Time t) const override |
Price calculation. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from InterpolatedPriceCurve< Interpolator > | |
void | performCalculations () const override |
QuantLib::Real | priceImpl (QuantLib::Time t) const override |
Price calculation. More... | |
InterpolatedPriceCurve (const QuantLib::Date &referenceDate, const QuantLib::DayCounter &dc, const QuantLib::Currency ¤cy, const Interpolator &interpolator=Interpolator()) | |
Used by PiecewisePriceCurve. More... | |
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. More... | |
Protected Attributes inherited from InterpolatedPriceCurve< Interpolator > | |
std::vector< QuantLib::Date > | dates_ |
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.
Definition at line 99 of file piecewisepricecurve.hpp.
|
private |
Definition at line 102 of file piecewisepricecurve.hpp.
typedef PiecewisePriceCurve<Interpolator, Bootstrap> this_curve |
Definition at line 105 of file piecewisepricecurve.hpp.
typedef QuantLib::BootstrapHelper<PriceTermStructure> helper |
Definition at line 106 of file piecewisepricecurve.hpp.
typedef PriceTraits traits_type |
Definition at line 107 of file piecewisepricecurve.hpp.
typedef Interpolator interpolator_type |
Definition at line 108 of file piecewisepricecurve.hpp.
PiecewisePriceCurve | ( | const QuantLib::Date & | referenceDate, |
const std::vector< QuantLib::ext::shared_ptr< helper > > & | instruments, | ||
const QuantLib::DayCounter & | dayCounter, | ||
const QuantLib::Currency & | currency, | ||
const Interpolator & | i = Interpolator() , |
||
const Bootstrap< this_curve > & | bootstrap = Bootstrap<this_curve>() |
||
) |
Definition at line 162 of file piecewisepricecurve.hpp.
|
override |
Definition at line 187 of file piecewisepricecurve.hpp.
|
override |
Definition at line 193 of file piecewisepricecurve.hpp.
|
overridevirtual |
The minimum time for which the curve can return values.
Reimplemented from PriceTermStructure.
Definition at line 199 of file piecewisepricecurve.hpp.
|
overridevirtual |
The pillar dates for the PriceTermStructure.
Implements PriceTermStructure.
Definition at line 205 of file piecewisepricecurve.hpp.
const std::vector< QuantLib::Time > & times |
Definition at line 211 of file piecewisepricecurve.hpp.
const std::vector< QuantLib::Real > & prices |
Definition at line 217 of file piecewisepricecurve.hpp.
const QuantLib::ext::shared_ptr< QuantLib::BootstrapHelper< PriceTermStructure > > & instrument | ( | QuantLib::Size | i | ) | const |
Return the i-th instrument.
Definition at line 224 of file piecewisepricecurve.hpp.
|
overrideprivate |
Definition at line 231 of file piecewisepricecurve.hpp.
|
overrideprivatevirtual |
Price calculation.
Implements PriceTermStructure.
Definition at line 237 of file piecewisepricecurve.hpp.
|
friend |
Definition at line 153 of file piecewisepricecurve.hpp.
|
friend |
Definition at line 153 of file piecewisepricecurve.hpp.
|
friend |
Definition at line 153 of file piecewisepricecurve.hpp.
|
private |
Definition at line 152 of file piecewisepricecurve.hpp.
|
private |
Definition at line 153 of file piecewisepricecurve.hpp.
|
private |
Definition at line 158 of file piecewisepricecurve.hpp.