TermStructure Class Reference
[Term structures]

#include <ql/termstructure.hpp>

Inheritance diagram for TermStructure:

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

allow for different compounding rules and compounding frequencies


Public Member Functions

Rates and discount
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 zeroYield (const Date &, bool extrapolate=false) const
 zero-yield rate

Rate zeroYield (Time, bool extrapolate=false) const
 zero-yield rate

DiscountFactor discount (const Date &, bool extrapolate=false) const
 discount factor

DiscountFactor discount (Time, bool extrapolate=false) const
 discount factor

Rate instantaneousForward (const Date &, bool extrapolate=false) const
 instantaneous forward rate

Rate instantaneousForward (Time, bool extrapolate=false) const
 instantaneous forward rate

Rate compoundForward (const Date &, Integer, bool extrapolate=false) const
 instantaneous forward rate at a given compounding frequency

Rate compoundForward (Time, Integer, bool extrapolate=false) const
 instantaneous forward rate at a given compounding frequency

Rate forward (const Date &, const Date &, bool extrapolate=false) const
 discrete forward rate between two dates

Rate forward (Time, Time, bool extrapolate=false) const
 discrete forward rate between two times

Rate zeroCoupon (const Date &, Integer, bool extrapolate=false) const
 zero-coupon rate

Rate zeroCoupon (Time, Integer, bool extrapolate=false) const
 zero-coupon rate

Dates
virtual Date todaysDate () const =0
 today's date

virtual Date referenceDate () const =0
 the reference date, i.e., the date at which discount = 1

virtual DayCounter dayCounter () const =0
 the day counter used for date/time conversion

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 Rate zeroYieldImpl (Time) const =0
 zero-yield calculation

virtual DiscountFactor discountImpl (Time) const =0
 discount calculation

virtual Rate forwardImpl (Time) const =0
 instantaneous forward-rate calculation

virtual Rate compoundForwardImpl (Time, Integer) const =0
 compound forward-rate calculation


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