|
cfl::MultiFunction | prb::put (double dStrike, double dMaturity, cfl::AssetModel &rModel) |
|
cfl::MultiFunction | prb::americanPut (double dStrike, const std::vector< double > &rExerciseTimes, cfl::AssetModel &rModel) |
|
cfl::MultiFunction | prb::barrierUpOrDownAndOut (double dNotional, double dLowerBarrier, double dUpperBarrier, const std::vector< double > &rBarrierTimes, cfl::AssetModel &rModel) |
|
cfl::MultiFunction | prb::downAndOutAmericanCall (double dBarrier, const std::vector< double > &rBarrierTimes, double dStrike, const std::vector< double > &rExerciseTimes, cfl::AssetModel &rModel) |
|
cfl::MultiFunction | prb::swing (double dStrike, const std::vector< double > &rExerciseTimes, unsigned iNumberOfExercises, cfl::AssetModel &rModel) |
|
This module contains functions that compute prices of standard and barrier options in cfl::AssetModel.
Computes the value of the American put option. In this contract, at any exercise time (from rExerciseTimes) a holder of the option can sell the stock at the strike dStrike.
- Parameters
-
dStrike | The strike of the option. |
rExerciseTimes | The vector of exercise times. The first exercise time is strictly greater than the initial time. |
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.
Computes the value of the down-and-out American call. The option behaves as the American call option with the strike dStrike and the exercise times rExerciseTimes until the first barrier time when the stock price hits the lower barrier dBarrier. At this exit time the option is canceled.
- Parameters
-
dBarrier | The lower barrier (dBarrier < dStrike). |
rBarrierTimes | The vector of barrier times. The first time is greater than the initial time. |
dStrike | The strike of the option. |
rExerciseTimes | The vector of exercise times. The first exercise time is strictly greater than the initial time. |
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 European put option. In this contract, at maturity dMaturity a holder of the option can sell the stock at the strike dStrike.
- Parameters
-
dStrike | The strike of the option. |
dMaturity | 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.
Computes the value of the swing option. The holder can exercise the option iNumberOfExercises times. At each exercise time he can buy only one stock for strike dStrike.
- Parameters
-
dStrike | The strike of the option. |
rExerciseTimes | The vector of exercise times. |
iNumberOfExercises | The maximal number of exercises. |
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.