YieldTermStructure Class Reference
[Term structures]

#include <ql/yieldtermstructure.hpp>

Inheritance diagram for YieldTermStructure:

Inheritance graph
[legend]
List of all members.

Detailed Description

Interest-rate term structure.

This abstract class defines the interface of concrete rate structures which will be derived from this one.

Rates are assumed to be annual continuous compounding.

Todo:
add derived class ParSwapTermStructure similar to ZeroYieldTermStructure, DiscountStructure, ForwardRateStructure

Tests:
observability against evaluation date changes is checked.


Public Member Functions

Constructors
See the TermStructure documentation for issues regarding constructors.

 YieldTermStructure ()
 default constructor
 YieldTermStructure (const Date &referenceDate)
 initialize with a fixed reference date
 YieldTermStructure (Integer settlementDays, const Calendar &)
 calculate the reference date based on the global evaluation date
zero rates
These methods are either function of dates or times. In the latter case, times are calculated as fraction of year from the reference date.

InterestRate zeroRate (const Date &d, const DayCounter &resultDayCounter, Compounding comp, Frequency freq=Annual, bool extrapolate=false) const
 zero-yield rate
InterestRate zeroRate (Time t, Compounding comp, Frequency freq=Annual, bool extrapolate=false) const
 zero-yield rate
discount factors
These methods are either function of dates or times. In the latter case, times are calculated as fraction of year from the reference date.

DiscountFactor discount (const Date &, bool extrapolate=false) const
 discount factor
DiscountFactor discount (Time, bool extrapolate=false) const
 discount factor
forward rates
These methods are either function of dates or times. In the latter case, times are calculated as fraction of year from the reference date.

InterestRate forwardRate (const Date &d1, const Date &d2, const DayCounter &resultDayCounter, Compounding comp, Frequency freq=Annual, bool extrapolate=false) const
 forward interest rate
InterestRate forwardRate (Time t1, Time t2, Compounding comp, Frequency freq=Annual, bool extrapolate=false) const
 forward interest rate
par rates
These methods are either function of dates or times. In the latter case, times are calculated as fraction of year from the reference date.

Rate parRate (Year tenor, const Date &effectiveDate, Frequency freq=Annual, bool extrapolate=false) const
 par rate
Rate parRate (Year tenor, Time t0, Frequency freq=Annual, bool extrapolate=false) const
 par rate
Dates
virtual Date maxDate () const =0
 the latest date for which the curve can return rates
virtual Time maxTime () const
 the latest time for which the curve can return rates

Protected Member Functions

Calculations
These methods must be implemented in derived classes to perform the actual discount and rate calculations. When they are called, range check has already been performed; therefore, they must assume that extrapolation is required.

virtual DiscountFactor discountImpl (Time) const =0
 discount calculation


Constructor & Destructor Documentation

YieldTermStructure  ) 
 

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

InterestRate zeroRate const Date d,
const DayCounter resultDayCounter,
Compounding  comp,
Frequency  freq = Annual,
bool  extrapolate = false
const
 

zero-yield rate

returns the implied zero-yield rate for a given date. The resulting InterestRate has the required daycounting rule.

InterestRate zeroRate Time  t,
Compounding  comp,
Frequency  freq = Annual,
bool  extrapolate = false
const
 

zero-yield rate

returns the implied zero-yield rate for a given time. The resulting InterestRate has the same day-counting rule used by the term structure. The same rule should be used for the calculating the time t.

InterestRate forwardRate const Date d1,
const Date d2,
const DayCounter resultDayCounter,
Compounding  comp,
Frequency  freq = Annual,
bool  extrapolate = false
const
 

forward interest rate

returns the implied forward interest rate between two dates The resulting interest rate has the required day-counting rule.

InterestRate forwardRate Time  t1,
Time  t2,
Compounding  comp,
Frequency  freq = Annual,
bool  extrapolate = false
const
 

forward interest rate

returns the implied forward interest rate between two times The resulting interest rate has the same day-counting rule used by the term structure. The same rule should be used for the calculating the time t.

Rate parRate Year  tenor,
const Date effectiveDate,
Frequency  freq = Annual,
bool  extrapolate = false
const
 

par rate

returns the implied par rate of a stylised swap starting at the effective date with a given tenor.

Warning:
this par rate is not to be used for evaluation of a real swap, since it does not take into account all the market conventions' details.

Rate parRate Year  tenor,
Time  t0,
Frequency  freq = Annual,
bool  extrapolate = false
const
 

par rate

returns the implied par rate of a stylised swap starting at the given time with a given tenor.

Warning:
this par rate is not to be used for evaluation of a real swap, since it does not take into account all the market conventions' details.


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