CFL EXAMPLES
Functions
Standard and barrier options on interest rates.

Functions

cfl::MultiFunction prb::cap (const cfl::Data::CashFlow &rCap, cfl::InterestRateModel &rModel)
 
cfl::MultiFunction prb::swaption (const cfl::Data::Swap &rSwap, double dMaturity, cfl::InterestRateModel &rModel)
 
cfl::MultiFunction prb::cancellableCollar (const cfl::Data::CashFlow &rCap, double dFloorRate, cfl::InterestRateModel &rModel)
 
cfl::MultiFunction prb::downAndOutCap (const cfl::Data::CashFlow &rCap, double dLowerBarrier, cfl::InterestRateModel &rModel)
 
cfl::MultiFunction prb::futureOnLibor (double dLiborPeriod, unsigned iFutureTimes, double dMaturity, cfl::InterestRateModel &rModel)
 

Detailed Description

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

Function Documentation

cfl::MultiFunction prb::cancellableCollar ( const cfl::Data::CashFlow rCap,
double  dFloorRate,
cfl::InterestRateModel rModel 
)

Computes the price of cancellable collar. In this contract, holder of the option can terminate the underlying interest rate collar at any payment time. Note that in the case of termination the current payment is still taking place.

Parameters
rCapThe parameters of the underlying interest rate collar. Here rCap.rate defines the cap rate.
dFloorRateThe floor rate in the underlying interest rate collar.
rModelReference to implementation of InterestRateModel.
Returns
The price of the option as the function of the initial values of the state processes in the model.
cfl::MultiFunction prb::cap ( const cfl::Data::CashFlow rCap,
cfl::InterestRateModel rModel 
)

Computes the price of interest rate cap.

Parameters
rCapThe parameters of interest rate cap.
rModelReference to implementation of InterestRateModel.
Returns
The price of the option as the function of the initial values of the state processes in the model.
cfl::MultiFunction prb::downAndOutCap ( const cfl::Data::CashFlow rCap,
double  dLowerBarrier,
cfl::InterestRateModel rModel 
)

Computes the price of down-and-out cap. The down-and-out cap generates the same cash flow as a standard interest rate cap up to (and including) the payment time when the float rate hits the lower barrier dLowerBarrier. After that, the cap is terminated.

Parameters
rCapThe parameters of the underlying interest rate cap.
dLowerBarrierThe lower barrier for float rate.
rModelReference to implementation of InterestRateModel.
Returns
The price of the option as the function of the initial values of the state processes in the model.
cfl::MultiFunction prb::futureOnLibor ( double  dLiborPeriod,
unsigned  iFutureTimes,
double  dMaturity,
cfl::InterestRateModel rModel 
)

Computes future price on LIBOR. The set of times, when the future price is evaluated is given by

t(i) = rModel.initialTime() +
i*(dFutureMaturity-rModel.initialTime())/iFutureTimes,
i = 0, ... , iFutureTimes-1

Denote by F(t(i)) the future price determined at time t(i). Recall that it costs nothing to enter into the future contract at time t(i) and that short position entered at time t(i) assumes the following transactions:

  1. At time t(k) such that i < k < iFutureTimes short position pays the amount F(t(k+1)) - F(t(k)).
  2. At maturity dFutureMaturity short position receives future price F(t(iFutureTimes-1)) defined at the previous time step and pays the amount
    1.-LIBOR(dMaturity, dMaturity + dLiborPeriod)
cfl::MultiFunction prb::swaption ( const cfl::Data::Swap rSwap,
double  dMaturity,
cfl::InterestRateModel rModel 
)

Computes the price of interest rate swaption. In this contract, at maturity dMaturity a holder of the option has the right to enter the interest rate swap with the issue time dMaturity and the parameters rSwap.

Parameters
rSwapThe parameters of the underlying interest rate swap.
dMaturityThe maturity of the option. This time is also the issue time for the underlying swap contract.
rModelReference to implementation of InterestRateModel.
Returns
The price of the option as the function of the initial values of the state processes in the model.