#include <DiscreteInterestRateSchedule.h>
Inheritance diagram for com::ftlabs::fisa::DiscreteInterestRateSchedule:

Public Member Functions | |
| DiscreteInterestRateSchedule (void) | |
| DiscreteInterestRateSchedule (double firstInterestRate, const FISADate &conversionDate, double newInterestRate) | |
| A convenience constructor to create a DiscreteInterestRateSchedule with an initial interest rate and a single step. | |
| ~DiscreteInterestRateSchedule (void) | |
| DiscreteInterestRateSchedule & | operator= (const DiscreteInterestRateSchedule &schedule) |
| void | setSingleStep (double firstInterestRate, const FISADate &conversionDate, double newInterestRate) |
| A convenience method to clear this schedule and set an initial interest rate with a single step. | |
| void | add (const FISADate &conversionDate, double interestRate) |
| Adds a new InterestRateStep to this DiscreteInterestRateSchedule, created using the provided date and interestRate. | |
| void | clear (void) |
| Clears this DiscreteInterestRateSchedule. | |
| int | getIndex (const FISADate &date) const |
| Get the index of the given date. | |
| double | getInterestRate (const FISADate &date) const |
| Get the interest rate that would be applicable for the given date. | |
| int | getCount () const |
| Get the total number of interest rates in this schedule. | |
| const FISADate | getDate (int index) const |
| Get the conversionDate for the specified index. | |
| void | getDate (int index, FISADate &date) const |
| Get the conversionDate for the specified index. | |
| double | getInterestRate (int index) const |
| Get the interest reate for the specified index. | |
Private Member Functions | |
| void | sort (void) const |
Private Attributes | |
| std::vector< InterestRateStep > * | steps |
| bool * | needsSort |
The order in which the steps are added doesn't matter.
| com::ftlabs::fisa::DiscreteInterestRateSchedule::DiscreteInterestRateSchedule | ( | void | ) |
| com::ftlabs::fisa::DiscreteInterestRateSchedule::DiscreteInterestRateSchedule | ( | double | firstInterestRate, | |
| const FISADate & | conversionDate, | |||
| double | newInterestRate | |||
| ) |
A convenience constructor to create a DiscreteInterestRateSchedule with an initial interest rate and a single step.
| firstInterestRate | the interestRate to use from settlementDate until the conversionDate. | |
| conversionDate | the date on which the newInterestRate takes effect. | |
| newInterestRate | the interest rate to be used from conversionDate to maturity. |
| com::ftlabs::fisa::DiscreteInterestRateSchedule::~DiscreteInterestRateSchedule | ( | void | ) |
| DiscreteInterestRateSchedule& com::ftlabs::fisa::DiscreteInterestRateSchedule::operator= | ( | const DiscreteInterestRateSchedule & | schedule | ) |
| void com::ftlabs::fisa::DiscreteInterestRateSchedule::setSingleStep | ( | double | firstInterestRate, | |
| const FISADate & | conversionDate, | |||
| double | newInterestRate | |||
| ) |
A convenience method to clear this schedule and set an initial interest rate with a single step.
| firstInterestRate | the interestRate to use from settlementDate until the conversionDate. | |
| conversionDate | the date on which the newInterestRate takes effect. | |
| newInterestRate | the interest rate to be used from conversionDate to maturity. |
| void com::ftlabs::fisa::DiscreteInterestRateSchedule::add | ( | const FISADate & | conversionDate, | |
| double | interestRate | |||
| ) |
Adds a new InterestRateStep to this DiscreteInterestRateSchedule, created using the provided date and interestRate.
The order in which the steps are added does not matter.
| date | the date that the provided interestRate takes effect. | |
| interestRate | the new interestRate. |
| void com::ftlabs::fisa::DiscreteInterestRateSchedule::clear | ( | void | ) |
Clears this DiscreteInterestRateSchedule.
| int com::ftlabs::fisa::DiscreteInterestRateSchedule::getIndex | ( | const FISADate & | date | ) | const [virtual] |
Get the index of the given date.
| date | a date |
Implements com::ftlabs::fisa::InterestRateSchedule.
| double com::ftlabs::fisa::DiscreteInterestRateSchedule::getInterestRate | ( | const FISADate & | date | ) | const [virtual] |
Get the interest rate that would be applicable for the given date.
| date | a date |
Implements com::ftlabs::fisa::InterestRateSchedule.
| int com::ftlabs::fisa::DiscreteInterestRateSchedule::getCount | ( | ) | const [virtual] |
Get the total number of interest rates in this schedule.
Implements com::ftlabs::fisa::InterestRateSchedule.
| const FISADate com::ftlabs::fisa::DiscreteInterestRateSchedule::getDate | ( | int | index | ) | const [virtual] |
Get the conversionDate for the specified index.
| index | the interest rate index |
Implements com::ftlabs::fisa::InterestRateSchedule.
| void com::ftlabs::fisa::DiscreteInterestRateSchedule::getDate | ( | int | index, | |
| FISADate & | date | |||
| ) | const [virtual] |
Get the conversionDate for the specified index.
| index | the interest rate index |
Implements com::ftlabs::fisa::InterestRateSchedule.
| double com::ftlabs::fisa::DiscreteInterestRateSchedule::getInterestRate | ( | int | index | ) | const [virtual] |
Get the interest reate for the specified index.
| index | the interest rate index |
Implements com::ftlabs::fisa::InterestRateSchedule.
| void com::ftlabs::fisa::DiscreteInterestRateSchedule::sort | ( | void | ) | const [private] |
std::vector<InterestRateStep>* com::ftlabs::fisa::DiscreteInterestRateSchedule::steps [private] |
bool* com::ftlabs::fisa::DiscreteInterestRateSchedule::needsSort [private] |
1.5.2