YieldTermStructure Class Reference
[Term structures]

#include <ql/termstructure.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

virtual DayCounter dayCounter () const =0
 the day counter used for date/time conversion
Constructors
See the BaseTermStructure documentation for issues regarding constructors.

 YieldTermStructure (const Date &todaysDate, const Date &referenceDate)
 initialize with a fixed today's date and reference date
 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.

Rate zeroYield (const Date &, bool extrapolate=false) const
 zero-yield rate
Rate zeroYield (Time t, bool extrapolate=false) const
 zero-yield rate
Rate zeroCoupon (const Date &, Integer, bool extrapolate=false) const
 zero-coupon rate
Rate zeroCoupon (Time, Integer, bool extrapolate=false) const
 zero-coupon rate
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.

Rate compoundForward (const Date &d1, Integer f, bool extrapolate=false) const
 instantaneous forward rate at a given compounding frequency
Rate compoundForward (Time t1, Integer f, bool extrapolate=false) const
 instantaneous forward rate at a given compounding frequency
Rate instantaneousForward (const Date &, bool extrapolate=false) const
 instantaneous forward rate
Rate instantaneousForward (Time, bool extrapolate=false) const
 instantaneous forward rate
Rate forward (const Date &d1, const Date &d2, bool extrapolate=false) const
 discrete forward rate between two dates
Rate forward (Time, Time, bool extrapolate=false) const
 discrete forward rate between two times
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
virtual Rate zeroYieldImpl (Time) const =0
 zero-yield calculation
virtual Rate forwardImpl (Time) const =0
 instantaneous forward-rate calculation
virtual Rate compoundForwardImpl (Time, Integer) const =0
 compound forward-rate calculation


Constructor & Destructor Documentation

YieldTermStructure 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().

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

Rate zeroYield const Date ,
bool  extrapolate = false
const
 

zero-yield rate

Deprecated:
use zeroRate(const Date& d, const DayCounter& dc, Continuous, NoFrequency, bool extrapolate) instead

Rate zeroYield Time  t,
bool  extrapolate = false
const
 

zero-yield rate

Deprecated:
use zeroRate(Time t, Continuous, NoFrequency, bool extrapolate) instead

Rate zeroCoupon const Date ,
Integer  ,
bool  extrapolate = false
const
 

zero-coupon rate

Deprecated:
use zeroRate(const Date&, const DayCounter&, Compounding, Frequency, bool) instead

Rate zeroCoupon Time  ,
Integer  ,
bool  extrapolate = false
const
 

zero-coupon rate

Deprecated:
use zeroRate(Time, Compounding, Frequency, bool) instead

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.

Rate compoundForward const Date d1,
Integer  f,
bool  extrapolate = false
const
 

instantaneous forward rate at a given compounding frequency

Deprecated:
use forwardRate(const Date& d1, const Date& d1, const DayCounter& dc, SimpleThenCompounded, Frequency f, bool extrapolate) instead

Rate compoundForward Time  t1,
Integer  f,
bool  extrapolate = false
const
 

instantaneous forward rate at a given compounding frequency

Deprecated:
use forwardRate(Time t1, Time t1, SimpleThenCompounded, Frequency f, bool extrapolate) instead

Rate instantaneousForward const Date ,
bool  extrapolate = false
const
 

instantaneous forward rate

Deprecated:
use forwardRate(const Date& d1, const Date& d1, const DayCounter& dc, Continuous, NoFrequency, bool extrapolate) instead

Rate instantaneousForward Time  ,
bool  extrapolate = false
const
 

instantaneous forward rate

Deprecated:
use forwardRate(Time t1, Time t1, Continuous, NoFrequency, bool extrapolate) instead

Rate forward const Date d1,
const Date d2,
bool  extrapolate = false
const
 

discrete forward rate between two dates

Deprecated:
use forwardRate(const Date& d1, const Date& d2, const DayCounter& dc, Continuous, NoFrequency, bool extrapolate) instead

Rate forward Time  ,
Time  ,
bool  extrapolate = false
const
 

discrete forward rate between two times

Deprecated:
use forwardRate(Time t1, Time t2, Continuous, NoFrequency, bool extrapolate) instead

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