QuantLib 0.3.11
Getting started
Reference manual
|
InterestRate Class Reference#include <ql/interestrate.hpp>
List of all members.
Detailed Description
Concrete interest rate class.
This class encapsulate the interest rate compounding algebra. It manages day-counting conventions, compounding conventions, conversion between different conventions, discount/compound factor calculations, and implied/equivalent rate calculations.
- Tests:
- Converted rates are checked against known good results
|
Public Member Functions |
|
| InterestRate () |
| Default constructor returning a null interest rate.
|
| InterestRate (Rate r, const DayCounter &dc, Compounding comp, Frequency freq=Annual) |
| Standard constructor.
|
|
| operator Rate () const |
|
Rate | rate () const |
const DayCounter & | dayCounter () const |
Compounding | compounding () const |
Frequency | frequency () const |
|
DiscountFactor | discountFactor (Time t) const |
| discount factor implied by the rate compounded at time t.
|
DiscountFactor | discountFactor (const Date &d1, const Date &d2, const Date &refStart=Date(), const Date &refEnd=Date()) const |
| discount factor implied by the rate compounded between two dates
|
Real | compoundFactor (Time t) const |
| compound factor implied by the rate compounded at time t.
|
Real | compoundFactor (const Date &d1, const Date &d2, const Date &refStart=Date(), const Date &refEnd=Date()) const |
| compound factor implied by the rate compounded between two dates
|
|
InterestRate | equivalentRate (Time t, Compounding comp, Frequency freq=Annual) const |
| equivalent interest rate for a compounding period t.
|
InterestRate | equivalentRate (Date d1, Date d2, const DayCounter &resultDC, Compounding comp, Frequency freq=Annual) const |
| equivalent rate for a compounding period between two dates
|
Static Public Member Functions |
|
static InterestRate | impliedRate (Real compound, Time t, const DayCounter &resultDC, Compounding comp, Frequency freq=Annual) |
| implied interest rate for a given compound factor at a given time.
|
static InterestRate | impliedRate (Real compound, const Date &d1, const Date &d2, const DayCounter &resultDC, Compounding comp, Frequency freq=Annual) |
| implied rate for a given compound factor between two dates.
|
Related Functions |
(Note that these are not member functions.)
|
std::ostream & | operator<< (std::ostream &, const InterestRate &) |
Member Function Documentation
|
discount factor implied by the rate compounded at time t.
- Warning:
- Time must be measured using InterestRate's own day counter.
|
|
compound factor implied by the rate compounded at time t.
returns the compound (a.k.a capitalization) factor implied by the rate compounded at time t.
- Warning:
- Time must be measured using InterestRate's own day counter.
|
|
compound factor implied by the rate compounded between two dates
returns the compound (a.k.a capitalization) factor implied by the rate compounded between two dates. |
|
implied interest rate for a given compound factor at a given time.
The resulting InterestRate has the day-counter provided as input.
- Warning:
- Time must be measured using the day-counter provided as input.
|
|
implied rate for a given compound factor between two dates.
The resulting rate is calculated taking the required day-counting rule into account. |
|
equivalent interest rate for a compounding period t.
The resulting InterestRate shares the same implicit day-counting rule of the original InterestRate instance.
- Warning:
- Time must be measured using the InterestRate's own day counter.
|
|
equivalent rate for a compounding period between two dates
The resulting rate is calculated taking the required day-counting rule into account. |
|