SAMPLE EXAM 1
Functions
Standard and barrier options on a single stock.

Functions

cfl::MultiFunction prb::upRangeOutPut (double dUpperBarrier, unsigned iOutTimes, const std::vector< double > &rBarrierTimes, double dStrike, double dMaturity, 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::upRangeOutPut ( double  dUpperBarrier,
unsigned  iOutTimes,
const std::vector< double > &  rBarrierTimes,
double  dStrike,
double  dMaturity,
cfl::AssetModel rModel 
)

Computes the value of the up-range-out put option. The option is canceled after first iOutTimes barrier times, when the stock price is above dUpperBarrier. Otherwise, it behaves as standard European put option with maturity dMaturity and strike dStrike.

Parameters
dUpperBarrierThe upper barrier.
iOutTimesThe number of barrier events ("stock price is above \a dUpperBarrier") that cancels the option.
rBarrierTimesThe vector of barrier times. The first time is greater than the initial time. The last barrier time is less than dMaturity.
dStrikeThe strike of the put option.
dMaturityThe maturity of the option.
rModelReference to implementation of AssetModel.
Returns
The price of the option as the function of the initial values of the state processes in the model.