Concrete class for interest rate models.
More...
#include <cfl/InterestRateModel.hpp>
This is the main concrete class for interest rate models.
- See also
- IInterestRateModel
The constructor.
- Parameters
-
pNewModel | Dynamically allocated implementation of the interface class IInterestRateModel. |
rExtended | An instance of the class Extended. |
unsigned cfl::InterestRateModel::addState |
( |
const PathDependent & |
rState | ) |
|
Adds another state process to the model.
- Parameters
-
rState | The description of a path dependent process which becomes additional state process in the model. |
- Returns
- The index of the additional state process.
void cfl::InterestRateModel::assignEventTimes |
( |
const std::vector< double > & |
rEventTimes | ) |
|
Resets the vector of event times to rEventTimes. This function also resets the vector of state processes. All state processes created previously by the function InterestRateModel::addState will be deleted.
- Parameters
-
rEventTimes | The new vector of event times for the model. The front element of this vector should equal the initial time of the model. Otherwise, an error is thrown. |
Slice cfl::InterestRateModel::cash |
( |
unsigned |
iEventTime, |
|
|
double |
dAmount |
|
) |
| const |
Constructs constant payoff in the amount dAmount at the event time with index iEventTime.
- Parameters
-
iEventTime | Index of event time. |
dAmount | The amount of cash. |
- Returns
- Representation of constant payoff in the amount dAmount taking place at the event time with index iEventTime.
Slice cfl::InterestRateModel::discount |
( |
unsigned |
iEventTime, |
|
|
double |
dBondMaturity |
|
) |
| const |
Constructs discount factor with maturity dBondMaturity at event time with index iEventTime.
- Parameters
-
iEventTime | Index of event time where the discount factor is constructed. |
dBondMaturity | The maturity of the discount factor. |
- Returns
- Discount factor with maturity dBondMaturity at event time with index iEventTime.
const std::vector<double>& cfl::InterestRateModel::eventTimes |
( |
| ) |
const |
Accessor function to the vector of event times in the model. Event times are sorted in increasing order and are given as year fractions. The front event time equals the initial time.
- Returns
- Vector of event times in the model.
double cfl::InterestRateModel::initialTime |
( |
| ) |
const |
unsigned cfl::InterestRateModel::numberOfStates |
( |
| ) |
const |
Returns the dimension of the model, that is, the number of state processes.
- Returns
- The number of state processes in the model.
Slice cfl::InterestRateModel::state |
( |
unsigned |
iEventTime, |
|
|
unsigned |
iState |
|
) |
| const |
Returns the representation of the state process with index iState at the event time with index iEventTime.
- Parameters
-
iEventTime | The index of the event time. |
iState | The index of the state process. |
- Returns
- State process with index iState at event time with index iEventTime.
The documentation for this class was generated from the following file: