QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Piecewise yield term structure. More...
#include <piecewiseyieldcurve.hpp>
Public Types | |
typedef Traits | traits_type |
typedef Interpolator | interpolator_type |
typedef Bootstrap< this_curve > | bootstrap_type |
Public Types inherited from Observer | |
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 |
Public Member Functions inherited from LazyObject | |
LazyObject () | |
~LazyObject () override=default | |
bool | isCalculated () const |
void | forwardFirstNotificationOnly () |
void | alwaysForwardNotifications () |
void | recalculate () |
void | freeze () |
void | unfreeze () |
Public Member Functions inherited from Observable | |
Observable () | |
Observable (const Observable &) | |
Observable & | operator= (const Observable &) |
Observable (Observable &&)=delete | |
Observable & | operator= (Observable &&)=delete |
virtual | ~Observable ()=default |
void | notifyObservers () |
Public Member Functions inherited from Observer | |
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 | MultiCurveSensitivities |
class | Bootstrap< this_curve > |
class | BootstrapError< this_curve > |
class | PenaltyFunction< this_curve > |
void | performCalculations () const override |
DiscountFactor | discountImpl (Time) const override |
Additional Inherited Members | |
Protected Member Functions inherited from LazyObject | |
virtual void | calculate () const |
Protected Attributes inherited from LazyObject | |
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 62 of file piecewiseyieldcurve.hpp.
|
private |
Definition at line 66 of file piecewiseyieldcurve.hpp.
|
private |
Definition at line 67 of file piecewiseyieldcurve.hpp.
typedef Traits traits_type |
Definition at line 69 of file piecewiseyieldcurve.hpp.
typedef Interpolator interpolator_type |
Definition at line 70 of file piecewiseyieldcurve.hpp.
typedef Bootstrap<this_curve> bootstrap_type |
Definition at line 71 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 75 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 89 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 101 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 112 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 127 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 144 of file piecewiseyieldcurve.hpp.
|
override |
Definition at line 198 of file piecewiseyieldcurve.hpp.
const std::vector< Time > & times |
Definition at line 204 of file piecewiseyieldcurve.hpp.
const std::vector< Date > & dates |
Definition at line 210 of file piecewiseyieldcurve.hpp.
const std::vector< Real > & data |
Definition at line 216 of file piecewiseyieldcurve.hpp.
Definition at line 223 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 229 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 250 of file piecewiseyieldcurve.hpp.
|
overrideprivate |
Definition at line 244 of file piecewiseyieldcurve.hpp.
|
friend |
Definition at line 187 of file piecewiseyieldcurve.hpp.
|
friend |
Definition at line 187 of file piecewiseyieldcurve.hpp.
|
friend |
Definition at line 187 of file piecewiseyieldcurve.hpp.
|
friend |
Definition at line 187 of file piecewiseyieldcurve.hpp.
|
private |
Definition at line 180 of file piecewiseyieldcurve.hpp.
|
private |
Definition at line 181 of file piecewiseyieldcurve.hpp.
|
private |
Definition at line 191 of file piecewiseyieldcurve.hpp.