QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
|
Piecewise yield term structure. More...
#include <piecewiseyieldcurve.hpp>
Public Types | |
typedef Traits | traits_type |
typedef Interpolator | interpolator_type |
typedef Bootstrap< this_curve > | bootstrap_type |
![]() | |
typedef set_type::iterator | iterator |
Public Member Functions | |
Constructors | |
PiecewiseYieldCurve (const Date &referenceDate, std::vector< ext::shared_ptr< typename Traits::helper > > instruments, const DayCounter &dayCounter, const std::vector< Handle< Quote > > &jumps={}, const std::vector< Date > &jumpDates={}, const Interpolator &i={}, bootstrap_type bootstrap={}) | |
PiecewiseYieldCurve (const Date &referenceDate, std::vector< ext::shared_ptr< typename Traits::helper > > instruments, const DayCounter &dayCounter, const Interpolator &i, bootstrap_type bootstrap=bootstrap_type()) | |
PiecewiseYieldCurve (const Date &referenceDate, std::vector< ext::shared_ptr< typename Traits::helper > > instruments, const DayCounter &dayCounter, bootstrap_type bootstrap) | |
PiecewiseYieldCurve (Natural settlementDays, const Calendar &calendar, std::vector< ext::shared_ptr< typename Traits::helper > > instruments, const DayCounter &dayCounter, const std::vector< Handle< Quote > > &jumps={}, const std::vector< Date > &jumpDates={}, const Interpolator &i={}, bootstrap_type bootstrap={}) | |
PiecewiseYieldCurve (Natural settlementDays, const Calendar &calendar, std::vector< ext::shared_ptr< typename Traits::helper > > instruments, const DayCounter &dayCounter, const Interpolator &i, bootstrap_type bootstrap=bootstrap_type()) | |
PiecewiseYieldCurve (Natural settlementDays, const Calendar &calendar, const std::vector< ext::shared_ptr< typename Traits::helper > > &instruments, const DayCounter &dayCounter, const bootstrap_type &bootstrap) | |
TermStructure interface | |
Date | maxDate () const override |
base_curve interface | |
const std::vector< Time > & | times () const |
const std::vector< Date > & | dates () const |
const std::vector< Real > & | data () const |
std::vector< std::pair< Date, Real > > | nodes () const |
Observer interface | |
void | update () override |
![]() | |
LazyObject () | |
~LazyObject () override=default | |
bool | isCalculated () const |
void | forwardFirstNotificationOnly () |
void | alwaysForwardNotifications () |
void | recalculate () |
void | freeze () |
void | unfreeze () |
![]() | |
Observable ()=default | |
Observable (const Observable &) | |
Observable & | operator= (const Observable &) |
Observable (Observable &&)=delete | |
Observable & | operator= (Observable &&)=delete |
virtual | ~Observable ()=default |
void | notifyObservers () |
![]() | |
Observer ()=default | |
Observer (const Observer &) | |
Observer & | operator= (const Observer &) |
virtual | ~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 | update ()=0 |
virtual void | deepUpdate () |
Private Types | |
typedef Traits::template curve< Interpolator >::type | base_curve |
typedef PiecewiseYieldCurve< Traits, Interpolator, Bootstrap > | this_curve |
LazyObject interface | |
std::vector< ext::shared_ptr< typename Traits::helper > > | instruments_ |
Real | accuracy_ |
Bootstrap< this_curve > | bootstrap_ |
class | Bootstrap< this_curve > |
class | BootstrapError< this_curve > |
class | PenaltyFunction< this_curve > |
void | performCalculations () const override |
DiscountFactor | discountImpl (Time) const override |
Additional Inherited Members | |
![]() | |
virtual void | calculate () const |
![]() | |
bool | calculated_ = false |
bool | frozen_ = false |
bool | alwaysForward_ |
Piecewise yield term structure.
This term structure is bootstrapped on a number of interest rate instruments which are passed as a vector of pointers to RateHelper 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 60 of file piecewiseyieldcurve.hpp.
|
private |
Definition at line 64 of file piecewiseyieldcurve.hpp.
|
private |
Definition at line 65 of file piecewiseyieldcurve.hpp.
typedef Traits traits_type |
Definition at line 67 of file piecewiseyieldcurve.hpp.
typedef Interpolator interpolator_type |
Definition at line 68 of file piecewiseyieldcurve.hpp.
typedef Bootstrap<this_curve> bootstrap_type |
Definition at line 69 of file piecewiseyieldcurve.hpp.
PiecewiseYieldCurve | ( | const Date & | referenceDate, |
std::vector< ext::shared_ptr< typename Traits::helper > > | instruments, | ||
const DayCounter & | dayCounter, | ||
const std::vector< Handle< Quote > > & | jumps = {} , |
||
const std::vector< Date > & | jumpDates = {} , |
||
const Interpolator & | i = {} , |
||
bootstrap_type | bootstrap = {} |
||
) |
Definition at line 73 of file piecewiseyieldcurve.hpp.
PiecewiseYieldCurve | ( | const Date & | referenceDate, |
std::vector< ext::shared_ptr< typename Traits::helper > > | instruments, | ||
const DayCounter & | dayCounter, | ||
const Interpolator & | i, | ||
bootstrap_type | bootstrap = bootstrap_type() |
||
) |
Definition at line 87 of file piecewiseyieldcurve.hpp.
PiecewiseYieldCurve | ( | const Date & | referenceDate, |
std::vector< ext::shared_ptr< typename Traits::helper > > | instruments, | ||
const DayCounter & | dayCounter, | ||
bootstrap_type | bootstrap | ||
) |
Definition at line 99 of file piecewiseyieldcurve.hpp.
PiecewiseYieldCurve | ( | Natural | settlementDays, |
const Calendar & | calendar, | ||
std::vector< ext::shared_ptr< typename Traits::helper > > | instruments, | ||
const DayCounter & | dayCounter, | ||
const std::vector< Handle< Quote > > & | jumps = {} , |
||
const std::vector< Date > & | jumpDates = {} , |
||
const Interpolator & | i = {} , |
||
bootstrap_type | bootstrap = {} |
||
) |
Definition at line 110 of file piecewiseyieldcurve.hpp.
PiecewiseYieldCurve | ( | Natural | settlementDays, |
const Calendar & | calendar, | ||
std::vector< ext::shared_ptr< typename Traits::helper > > | instruments, | ||
const DayCounter & | dayCounter, | ||
const Interpolator & | i, | ||
bootstrap_type | bootstrap = bootstrap_type() |
||
) |
Definition at line 125 of file piecewiseyieldcurve.hpp.
PiecewiseYieldCurve | ( | Natural | settlementDays, |
const Calendar & | calendar, | ||
const std::vector< ext::shared_ptr< typename Traits::helper > > & | instruments, | ||
const DayCounter & | dayCounter, | ||
const bootstrap_type & | bootstrap | ||
) |
Definition at line 142 of file piecewiseyieldcurve.hpp.
|
override |
Definition at line 195 of file piecewiseyieldcurve.hpp.
const std::vector< Time > & times |
Definition at line 201 of file piecewiseyieldcurve.hpp.
const std::vector< Date > & dates |
Definition at line 207 of file piecewiseyieldcurve.hpp.
const std::vector< Real > & data |
Definition at line 213 of file piecewiseyieldcurve.hpp.
Definition at line 220 of file piecewiseyieldcurve.hpp.
|
overridevirtual |
This method must be implemented in derived classes. An instance of Observer does not call this method directly: instead, it will be called by the observables the instance registered with when they need to notify any changes.
Reimplemented from LazyObject.
Definition at line 226 of file piecewiseyieldcurve.hpp.
|
overrideprivatevirtual |
This method must implement any calculations which must be (re)done in order to calculate the desired results.
Implements LazyObject.
Definition at line 247 of file piecewiseyieldcurve.hpp.
|
overrideprivate |
Definition at line 241 of file piecewiseyieldcurve.hpp.
|
friend |
Definition at line 179 of file piecewiseyieldcurve.hpp.
|
friend |
Definition at line 179 of file piecewiseyieldcurve.hpp.
|
friend |
Definition at line 179 of file piecewiseyieldcurve.hpp.
|
private |
Definition at line 178 of file piecewiseyieldcurve.hpp.
|
private |
Definition at line 179 of file piecewiseyieldcurve.hpp.
|
private |
Definition at line 188 of file piecewiseyieldcurve.hpp.