`#include <interestrate.hpp>`

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.

**Test:**- Converted rates are checked against known good results

Definition at line 40 of file interestrate.hpp.

## Public Member Functions | |

discount/compound factor calculations | |

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

Real | compoundFactor (Time t) const |

compound 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 | |

DiscountFactor | discountFactor (Time t) const |

discount factor implied by the rate compounded at time t. | |

inspectors | |

Compounding | compounding () const |

const DayCounter & | dayCounter () const |

Frequency | frequency () const |

Rate | rate () const |

equivalent rate calculations | |

InterestRate | equivalentRate (const DayCounter &resultDC, Compounding comp, Frequency freq, Date d1, Date d2, const Date &refStart=Date(), const Date &refEnd=Date()) const |

equivalent rate for a compounding period between two dates | |

InterestRate | equivalentRate (Compounding comp, Frequency freq, Time t) const |

equivalent interest rate for a compounding period t. | |

constructors | |

InterestRate (Rate r, const DayCounter &dc, Compounding comp, Frequency freq) | |

Standard constructor. | |

InterestRate () | |

Default constructor returning a null interest rate. | |

conversions | |

operator Rate () const | |

## Static Public Member Functions | |

implied rate calculations | |

static InterestRate | impliedRate (Real compound, const DayCounter &resultDC, Compounding comp, Frequency freq, const Date &d1, const Date &d2, const Date &refStart=Date(), const Date &refEnd=Date()) |

implied rate for a given compound factor between two dates. | |

static InterestRate | impliedRate (Real compound, const DayCounter &resultDC, Compounding comp, Frequency freq, Time t) |

implied interest rate for a given compound factor at a given time. | |

## Private Attributes | |

Compounding | comp_ |

DayCounter | dc_ |

Real | freq_ |

bool | freqMakesSense_ |

Rate | r_ |

## Related Functions | |

(Note that these are not member functions.) | |

std::ostream & | operator<< (std::ostream &, const InterestRate &) |

The documentation for this class was generated from the following files:

- QuantLib-1.0b3/ql/interestrate.hpp
- QuantLib-1.0b3/ql/interestrate.cpp

Generated by Doxygen 1.6.0 Back to index