BaseTermStructure Class Reference

#include <ql/basetermstructure.hpp>

Inheritance diagram for BaseTermStructure:

Inheritance graph
[legend]
List of all members.

Detailed Description

Basic term-structure functionality.


Public Member Functions

Constructors
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.

 BaseTermStructure (const Date &todaysDate, const Date &referenceDate)
 initialize with a fixed today's date and reference date
 BaseTermStructure ()
 default constructor
 BaseTermStructure (const Date &referenceDate)
 initialize with a fixed reference date
 BaseTermStructure (Integer settlementDays, const Calendar &)
 calculate the reference date based on the global evaluation date
Dates
virtual const DatetodaysDate () const
 today's date
virtual const DatereferenceDate () const
 the reference date, i.e., the date at which discount = 1
virtual Calendar calendar () const
 the calendar used for reference date calculation
virtual DayCounter dayCounter () const =0
 the day counter used for date/time conversion
Observer interface
void update ()

Protected Member Functions

Time timeFromReference (const Date &date) const
 date/time conversion


Constructor & Destructor Documentation

BaseTermStructure const Date todaysDate,
const Date referenceDate
 

initialize with a fixed today's date and reference date

Deprecated:
use the constructor without today's date; set the evaluation date through Settings::instance().

BaseTermStructure  ) 
 

default constructor

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


Member Function Documentation

const Date & todaysDate  )  const [virtual]
 

today's date

Deprecated:
use Settings::instance().evaluationDate().

Reimplemented in DriftTermStructure, ForwardSpreadedTermStructure, QuantoTermStructure, and ZeroSpreadedTermStructure.

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 AffineTermStructure, ExtendedDiscountCurve, PiecewiseFlatForward, and CapVolatilityVector.


QuantLib.org
QuantLib
Hosted by
SourceForge.net Logo
Documentation generated by
doxygen