CFL EXAMPLES
Functions
Auxiliary functions for project Examples.

Functions

cfl::Slice prb::couponBond (unsigned iTime, const cfl::Data::CashFlow &rBond, const cfl::InterestRateModel &rModel)
 
cfl::PathDependent prb::indUpDownOut (double dLowerBarrier, double dUpperBarrier, const std::vector< unsigned > &rResetIndexes, const cfl::AssetModel &rModel)
 
cfl::PathDependent prb::histAverage (const std::vector< unsigned > &rResetIndexes, const cfl::AssetModel &rModel)
 
cfl::Slice prb::rate (unsigned iTime, double dPeriod, const cfl::InterestRateModel &rModel)
 
cfl::PathDependent prb::savingsAccountNextTime (double dPeriod, double dNotional, const std::vector< unsigned > &rResetIndexes, const cfl::InterestRateModel &rModel)
 
cfl::Slice prb::swap (unsigned iTime, const cfl::Data::Swap &rSwap, const cfl::InterestRateModel &rModel)
 

Detailed Description

This module contains auxiliary functions and classes for project Examples.

Function Documentation

cfl::Slice prb::couponBond ( unsigned  iTime,
const cfl::Data::CashFlow rBond,
const cfl::InterestRateModel rModel 
)

Computes the value of coupon bond.

Parameters
iTimeThe index of the current event time.
rBondThe parameters of the coupon bond issued at the event time with index iTime.
rModelReference to implementation of InterestRateModel.
Returns
The value of coupon bond at event time with index iTime.
cfl::PathDependent prb::histAverage ( const std::vector< unsigned > &  rResetIndexes,
const cfl::AssetModel rModel 
)
Parameters
rResetIndexesThe vector of indexes of event times, when the additional state process changes its value.
rModelReference to implementation of AssetModel.
Returns
The additional state process represented by the historical average for the price of stock over the event times with indexes rResetIndexes.
cfl::PathDependent prb::indUpDownOut ( double  dLowerBarrier,
double  dUpperBarrier,
const std::vector< unsigned > &  rResetIndexes,
const cfl::AssetModel rModel 
)
Parameters
dLowerBarrierThe lower barrier.
dUpperBarrierThe upper barrier.
rResetIndexesThe vector of indexes of event times, when the additional state process changes its value.
rModelReference to implementation of AssetModel.
Returns
The additional state process represented by the indicator of the event that that the price of the stock has not crossed the upper and lower barriers at event times represented by indexes rResetIndexes.
cfl::Slice prb::rate ( unsigned  iTime,
double  dPeriod,
const cfl::InterestRateModel rModel 
)

Computes float (LIBOR) rate.

Parameters
iTimeThe index of the current event time.
dPeriodThe time interval (given as year fraction) for interest rate loan.
rModelReference to implementation of InterestRateModel.
Returns
The float rate at event time with index iTime for loan with time interval dPeriod.
cfl::PathDependent prb::savingsAccountNextTime ( double  dPeriod,
double  dNotional,
const std::vector< unsigned > &  rResetIndexes,
const cfl::InterestRateModel rModel 
)

Describes the capital on savings account at next payment time.

Parameters
dPeriodThe time interval (given as year fraction) for interest rate loan.
dNotionalThe notional amount.
rResetIndexesThe vector of indexes of event times, when the additional state process changes its value.
rModelReference to implementation of InterestRateModel.
Returns
Additional state process represented by the evolution of the capital on savings account at next payment time.
cfl::Slice prb::swap ( unsigned  iTime,
const cfl::Data::Swap rSwap,
const cfl::InterestRateModel rModel 
)

Computes the value of interest rate swap.

Parameters
iTimeThe index of the current event time.
rSwapThe parameters of interest rate swap issued at event time with index iTime.
rModelReference to implementation of InterestRateModel.
Returns
The value of interest rate swap issued at event time with index iTime.