QuantLib_TermStructure man page

TermStructure — Basic term-structure functionality.  


#include <ql/termstructure.hpp>

Inherits Observer, Observable, and Extrapolator.

Inherited by CallableBondVolatilityStructure, CommodityCurve, CorrelationTermStructure, DefaultProbabilityTermStructure, InflationTermStructure, VolatilityTermStructure, and YieldTermStructure.

Public Member Functions

There are three ways in which a term structure can keep track of its reference date. The first is that such date is fixed; the second is that it is determined by advancing the current date of a given number of business days; and the third is that it is based on the reference date of some other structure.

In the first case, the constructor taking a date is to be used; the default implementation of referenceDate() will then return such date. In the second case, the constructor taking a number of days and a calendar is to be used; referenceDate() will return a date calculated based on the current evaluation date, and the term structure and its observers will be notified when the evaluation date changes. In the last case, the referenceDate() method must be overridden in derived classes so that it fetches and return the appropriate date.

TermStructure (const DayCounter &dc=DayCounter())
default constructor
TermStructure (const Date &referenceDate, const Calendar &calendar=Calendar(), const DayCounter &dc=DayCounter())
initialize with a fixed reference date
TermStructure (Natural settlementDays, const Calendar &, const DayCounter &dc=DayCounter())
calculate the reference date based on the global evaluation date

Dates and Time

virtual DayCounter dayCounter () const
the day counter used for date/time conversion
Time timeFromReference (const Date &date) const
date/time conversion
virtual Date maxDate () const =0
the latest date for which the curve can return values
virtual Time maxTime () const
the latest time for which the curve can return values
virtual const Date & referenceDate () const
the date at which discount = 1.0 and/or variance = 0.0
virtual Calendar calendar () const
the calendar used for reference and/or option date calculation
virtual Natural settlementDays () const
the settlementDays used for reference date calculation

Observer interface

void update ()

Protected Member Functions

void checkRange (const Date &d, bool extrapolate) const
date-range check
void checkRange (Time t, bool extrapolate) const
time-range check

Protected Attributes

bool moving_
bool updated_
Calendar calendar_

Additional Inherited Members

Detailed Description

Basic term-structure functionality.

Constructor & Destructor Documentation

TermStructure (const DayCounter & dc = DayCounter())

default constructor


term structures initialized by means of this constructor must manage their own reference date by overriding the referenceDate() method.

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.

Implements Observer.

Reimplemented in YieldTermStructure, DefaultProbabilityTermStructure, FittedBondDiscountCurve, PiecewiseYoYInflationCurve< Interpolator, Bootstrap, Traits >, CapFloorTermVolCurve, CapFloorTermVolSurface, PiecewiseZeroInflationCurve< Interpolator, Bootstrap, Traits >, FlatForward, InterpolatedPiecewiseZeroSpreadedTermStructure< Interpolator >, ZeroSpreadedTermStructure, ForwardSpreadedTermStructure, and StrippedOptionletAdapter.


Generated automatically by Doxygen for QuantLib from the source code.

Referenced By

moving_(3), TermStructure(3), timeFromReference(3) and updated_(3) are aliases of QuantLib_TermStructure(3).

Fri Feb 10 2017 Version 1.9.1 QuantLib