FINAL EXAM
Functions
Standard and barrier options on a single stock.

Functions

cfl::MultiFunction prb::downAndRebateOrUpAndOut (double dNotional, double dLowerBarrier, double dUpperBarrier, const std::vector< double > &rLowerBarrierTimes, const std::vector< double > &rUpperBarrierTimes, cfl::AssetModel &rModel)
 

Detailed Description

This module contains functions that compute prices of standard and barrier options in cfl::AssetModel.

Function Documentation

cfl::MultiFunction prb::downAndRebateOrUpAndOut ( double  dNotional,
double  dLowerBarrier,
double  dUpperBarrier,
const std::vector< double > &  rLowerBarrierTimes,
const std::vector< double > &  rUpperBarrierTimes,
cfl::AssetModel rModel 
)

Computes the value of the down-and-rebate or up-and-out barrier option. There are two types of barrier events:

  1. The lower barrier event is taking place at the first time when the price of the stock is below the lower barrier dLowerBarrier. In this case, the option pays the notional amount dNotional.
  2. The upper barrier event is taking place at the first time when the price of the stock is above the upper barrier dUpperBarrier. In this case, the option expires worthless.

After any of the barrier events the option is terminated. If neither of the barriers has been crossed, then the option expires worthless.

Parameters
dNotionalThe notional amount.
dLowerBarrierThe lower barrier.
dUpperBarrierThe upper barrier.
rLowerBarrierTimesThe lower barrier times.
rUpperBarrierTimesThe upper barrier times.
rModelReference to implementation of cfl::AssetModel.
Returns
The price of the option as the function of the initial values of the state processes in the model.