|
cfl::MultiFunction | prb::asianCall (const std::vector< double > &rAverageTimes, double dStrike, double dMaturity, cfl::AssetModel &rModel) |
|
cfl::MultiFunction | prb::barrierUpOrDownAndOut_path (double dNotional, double dLowerBarrier, double dUpperBarrier, const std::vector< double > &rBarrierTimes, cfl::AssetModel &rModel) |
|
cfl::MultiFunction | prb::savingsAccount (double dPeriod, unsigned iNumberOfPeriods, double dNotional, cfl::InterestRateModel &rModel) |
|
cfl::MultiFunction | prb::putOnSavingsAccount (const cfl::Data::CashFlow &rAccount, cfl::InterestRateModel &rModel) |
|
This module contains functions that compute prices of path dependent options in cfl::AssetModel and cfl::InterestRateModel.
Computes the price of the Asian call option. At maturity dMaturity holder of the option can exercise it by paying strike dStrike and receiving the historical average of the price of the stock computed over the set of averaging times rAverageTimes.
- Parameters
-
rAverageTimes | The vector of times participating in the computation of the historical average for the price of the stock. |
dStrike | The strike of the option. |
dMaturity | The maturity of the option. The maturity is strictly greater than the largest time from rAverageTimes. |
rModel | Reference to implementation of AssetModel. |
- Returns
- The price of the option as the function of the initial values of the state processes in the model.
Computes the value of the up-or-down-and-out barrier option. The payoff of the option at maturity (last barrier time) is given by the notional amount dNotional if the stock price has not crossed the lower and upper barriers for all barrier times. Otherwise, the option expires worthless.
- Parameters
-
dLowerBarrier | The lower barrier. |
dUpperBarrier | The upper barrier. |
dNotional | The notional amount. |
rBarrierTimes | The vector of barrier times. The first time is greater than the initial time. The last barrier time is the maturity of the option. |
rModel | Reference to implementation of AssetModel. |
- Returns
- The price of the option as the function of the initial values of the state processes in the model. This implementation views barrier option as a path dependent derivative security: a new state process representing barrier event is added to rModel.
Computes the price of put option on savings account. At maturity the holder of the option has the right to receive the capital accumulated on the account with fixed rate rAccount.rate in exchange for the capital accumulated on the account with float rate (savings account). Both accounts are issued at the initial time of the model.
- Parameters
-
rAccount | The parameters of the fixed and floating accounts. The fixed rate is given by rAccount.rate. |
rModel | Reference to implementation of InterestRateModel. |
- Returns
- The price of the option as the function of the initial values of the state processes in the model.
Computes the price of savings account. Savings account starts with notional amount dNotional and then invests the capital at regular time intervals at float rate.
- Parameters
-
dPeriod | The period between two payments. |
iNumberOfPeriods | The number of payments. |
dNotional | The notional amount. |
rModel | Reference to implementation of InterestRateModel. |
- Returns
- The price of the option as the function of the initial values of the state processes in the model.