PiecewiseYieldCurve< Traits, Interpolator, Bootstrap > Class Template Reference
Term structures

Piecewise yield term structure. More...

`#include <ql/termstructures/yield/piecewiseyieldcurve.hpp>`

Inheritance diagram for PiecewiseYieldCurve< Traits, Interpolator, Bootstrap >:
[legend]

## Public Types

typedef Traits | traits_type
typedef Interpolator | interpolator_type

## Public Member Functions

Constructors

PiecewiseYieldCurve (const Date &referenceDate, const std::vector< boost::shared_ptr< typename Traits::helper > > &instruments, const DayCounter &dayCounter, const std::vector< Handle< Quote > > &jumps=std::vector< Handle< Quote > >(), const std::vector< Date > &jumpDates=std::vector< Date >(), Real accuracy=1.0e-12, const Interpolator &i=Interpolator(), const Bootstrap< this_curve > &bootstrap=Bootstrap< this_curve >())

| PiecewiseYieldCurve (const Date &referenceDate, const std::vector< boost::shared_ptr< typename Traits::helper > > &instruments, const DayCounter &dayCounter, Real accuracy, const Interpolator &i=Interpolator(), const Bootstrap< this_curve > &bootstrap=Bootstrap< this_curve >())
| PiecewiseYieldCurve (const Date &referenceDate, const std::vector< boost::shared_ptr< typename Traits::helper > > &instruments, const DayCounter &dayCounter, const Interpolator &i, const Bootstrap< this_curve > &bootstrap=Bootstrap< this_curve >())

PiecewiseYieldCurve (Natural settlementDays, const Calendar &calendar, const std::vector< boost::shared_ptr< typename Traits::helper > > &instruments, const DayCounter &dayCounter, const std::vector< Handle< Quote > > &jumps=std::vector< Handle< Quote > >(), const std::vector< Date > &jumpDates=std::vector< Date >(), Real accuracy=1.0e-12, const Interpolator &i=Interpolator(), const Bootstrap< this_curve > &bootstrap=Bootstrap< this_curve >())

| PiecewiseYieldCurve (Natural settlementDays, const Calendar &calendar, const std::vector< boost::shared_ptr< typename Traits::helper > > &instruments, const DayCounter &dayCounter, Real accuracy, const Interpolator &i=Interpolator(), const Bootstrap< this_curve > &bootstrap=Bootstrap< this_curve >())
| PiecewiseYieldCurve (Natural settlementDays, const Calendar &calendar, const std::vector< boost::shared_ptr< typename Traits::helper > > &instruments, const DayCounter &dayCounter, const Interpolator &i, const Bootstrap< this_curve > &bootstrap=Bootstrap< this_curve >())
TermStructure interface
Date | maxDate () const
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 ()
Public Member Functions inherited from LazyObject
void | recalculate ()
void | freeze ()
void | unfreeze ()
Public Member Functions inherited from Observable
| Observable (const Observable &)
Observable & | operator= (const Observable &)
void | notifyObservers ()
Public Member Functions inherited from Observer
| Observer (const Observer &)
Observer & | operator= (const Observer &)
std::pair< std::set< boost::shared_ptr< Observable > >::iterator, bool > | registerWith (const boost::shared_ptr< Observable > &)
void | registerWithObservables (const boost::shared_ptr< Observer > &)
Size | unregisterWith (const boost::shared_ptr< Observable > &)
void | unregisterWithAll ()

## Friends

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

## Additional Inherited Members

Protected Member Functions inherited from LazyObject
virtual void | calculate () const
Protected Attributes inherited from LazyObject
bool | calculated_
bool | frozen_

## Detailed Description

### template<class Traits, class Interpolator, template< class > class Bootstrap = IterativeBootstrap>
class QuantLib::PiecewiseYieldCurve< Traits, Interpolator, Bootstrap >

Piecewise yield term structure.

This term structure is bootstrapped on a number of interest rate instruments which are passed as a vector of handles 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.

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

Tests:
  - the correctness of the returned values is tested by checking them against the original inputs.
  - the observability of the term structure is tested.

Examples:
  Bonds.cpp, FittedBondCurve.cpp, FRA.cpp, and swapvaluation.cpp.

## Member Function Documentation

void update | ( |  | ) |

virtual

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.