CFL
Classes | Functions
Basic classes: Slice and IModel.
Collaboration diagram for Basic classes: Slice and IModel.:

Classes

class  cfl::IModel
 Interface class for financial models. More...
 
class  cfl::Slice
 Representation of random payoffs in the library. More...
 

Functions

Slice cfl::abs (const Slice &rSlice)
 
double cfl::atOrigin (const Slice &rSlice)
 
Slice cfl::exp (const Slice &rSlice)
 
Slice cfl::indicator (const Slice &rSlice, double dBarrier)
 
Slice cfl::indicator (double dBarrier, const Slice &rSlice)
 
Slice cfl::indicator (const Slice &rSlice, const Slice &rBarrier)
 
MultiFunction cfl::interpolate (const Slice &rSlice)
 
MultiFunction cfl::interpolate (const Slice &rSlice, const std::vector< unsigned > &rState)
 
MultiFunction cfl::interpolate (const Slice &rSlice, unsigned iStates)
 
Slice cfl::log (const Slice &rSlice)
 
Slice cfl::max (const Slice &rSlice, double dValue)
 
Slice cfl::max (const Slice &rSlice1, const Slice &rSlice2)
 
Slice cfl::max (double dValue, const Slice &rSlice)
 
Slice cfl::min (const Slice &rSlice, double dValue)
 
Slice cfl::min (const Slice &rSlice1, const Slice &rSlice2)
 
Slice cfl::min (double dValue, const Slice &rSlice)
 
Slice cfl::operator* (const Slice &rSlice1, const Slice &rSlice2)
 
Slice cfl::operator* (const Slice &rSlice, double dValue)
 
Slice cfl::operator* (double dValue, const Slice &rSlice)
 
Slice cfl::operator+ (const Slice &rSlice1, const Slice &rSlice2)
 
Slice cfl::operator+ (const Slice &rSlice, double dValue)
 
Slice cfl::operator+ (double dValue, const Slice &rSlice)
 
Slice cfl::operator- (const Slice &rSlice)
 
Slice cfl::operator- (const Slice &rSlice1, const Slice &rSlice2)
 
Slice cfl::operator- (const Slice &rSlice, double dValue)
 
Slice cfl::operator- (double dValue, const Slice &rSlice)
 
Slice cfl::operator/ (const Slice &rSlice1, const Slice &rSlice2)
 
Slice cfl::operator/ (const Slice &rSlice, double dValue)
 
Slice cfl::operator/ (double dValue, const Slice &rSlice)
 
Slice cfl::pow (const Slice &rSlice, double dPower)
 
Slice cfl::rollback (const Slice &rSlice, unsigned iEventTime)
 
Slice cfl::sqrt (const Slice &rSlice)
 

Detailed Description

This module contains the basic classes of the library: interface class IModel and concrete class Slice.

Function Documentation

Slice cfl::abs ( const Slice rSlice)

Returns the absolute value of rSlice.

Parameters
rSliceSome random payoff.
Returns
The absolute value of rSlice.
double cfl::atOrigin ( const Slice rSlice)

Returns the value of random variable represented by rSlice at initial values of state processes. This function is usually used at initial time.

Parameters
rSliceSome random payoff.
Returns
The value of random variable represented by rSlice at initial values of state processes.
Slice cfl::exp ( const Slice rSlice)

Returns exponential of rSlice.

Parameters
rSliceSome random payoff.
Returns
The random variable given by exp(rSlice).
Slice cfl::indicator ( const Slice rSlice,
double  dBarrier 
)

Returns the indicator of the event: rSlice is greater than dBarrier.

Parameters
rSliceSome random payoff.
dBarrierLower barrier.
Returns
The random variable given by I(rSlice > dBarrier) .
Slice cfl::indicator ( double  dBarrier,
const Slice rSlice 
)

Returns the indicator of the event: dBarrier is greater than rSlice.

Parameters
dBarrierUpper barrier.
rSliceSome random payoff.
Returns
The random variable given by I(dBarrier > rSlice) .
Slice cfl::indicator ( const Slice rSlice,
const Slice rBarrier 
)

Returns the indicator of the event: rSlice is greater than rBarrier. Both input parameters should be defined on the same model and at the same event time.

Parameters
rSliceSome random payoff.
rBarrierRandom variable describing lower barrier.
Returns
The random variable given by I(rSlice > rBarrier) .
MultiFunction cfl::interpolate ( const Slice rSlice)

This function explicitly defines the dependence of the given Slice object on the state processes. The dimension of the returned MultiFunction object coincides with the number of state processes on which rSlice is dependent.

Parameters
rSliceA random variable in the model.
Returns
Multi-dimensional function object that shows the dependence of rSlice on state processes.
MultiFunction cfl::interpolate ( const Slice rSlice,
const std::vector< unsigned > &  rState 
)

Returns the function that interpolates rSlice with respect to state processes with indexes rStates. Other states are set to to their initial values.

Parameters
rSliceSome random payoff.
rStateThe indexes of state processes that will be present in the result.
Returns
The explicit functional dependence of the random payoff represented by rSlice on state processes with indexes rState.
MultiFunction cfl::interpolate ( const Slice rSlice,
unsigned  iStates 
)

Returns the function that interpolates rSlice with respect to state processes with indexes less than iStates. Other states are set to to their initial values.

Parameters
rSliceSome random payoff.
iStatesThe number of first state processes that will be present in the result.
Returns
The explicit functional dependence of the random payoff represented by rSlice on state processes with indexes less than iStates.
Slice cfl::log ( const Slice rSlice)

Returns logarithm of rSlice.

Parameters
rSliceSome random payoff.
Returns
The random variable given by log(rSlice) .
Slice cfl::max ( const Slice rSlice,
double  dValue 
)

Returns the maximum of rSlice and dValue.

Parameters
dValueA number.
rSliceSome payoff.
Returns
The maximum of dValue and rSlice.
Slice cfl::max ( const Slice rSlice1,
const Slice rSlice2 
)

Returns the maximum of rSlice1 and rSlice2. Both input parameters should be defined on the same model and at the same event time.

Parameters
rSlice1Some payoff.
rSlice2Some payoff.
Returns
The maximum of rSlice1 and rSlice2.
Slice cfl::max ( double  dValue,
const Slice rSlice 
)

Returns the maximum of rSlice and dValue.

Parameters
dValueA constant value.
rSliceSome random payoff.
Returns
The maximum of dValue and rSlice.
Slice cfl::min ( const Slice rSlice,
double  dValue 
)

Returns the minimum of rSlice and dValue.

Parameters
dValueA number.
rSliceSome payoff.
Returns
The minimum of rSlice and dValue.
Slice cfl::min ( const Slice rSlice1,
const Slice rSlice2 
)

Returns the minimum of rSlice1 and rSlice2. Both input parameters should be defined on the same model and at the same event time.

Parameters
rSlice1Some payoff.
rSlice2Some payoff.
Returns
The minimum of rSlice1 and rSlice2.
Slice cfl::min ( double  dValue,
const Slice rSlice 
)

Returns the minimum of rSlice and dValue.

Parameters
dValueA constant value.
rSliceSome random payoff.
Returns
The minimum of dValue and rSlice.
Slice cfl::operator* ( const Slice rSlice1,
const Slice rSlice2 
)

Returns the product of rSlice1 and rSlice2. Both input parameters should be defined on the same model and at the same event time.

Parameters
rSlice1The first multiplier.
rSlice2The second multiplier.
Returns
The product of rSlice1 and rSlice2.
Slice cfl::operator* ( const Slice rSlice,
double  dValue 
)

Returns the product of rSlice and dValue.

Parameters
rSliceThe first multiplier.
dValueThe second multiplier.
Returns
The Slice object that is the difference between rSlice and dValue.
Slice cfl::operator* ( double  dValue,
const Slice rSlice 
)

Returns the product of dValue and rSlice.

Parameters
dValueThe first multiplier.
rSliceThe second multiplier.
Returns
The product of dValue and rSlice.
Slice cfl::operator+ ( const Slice rSlice1,
const Slice rSlice2 
)

Returns the sum of rSlice1 and rSlice2. Both input parameters should be defined on the same model and at the same event time.

Parameters
rSlice1The first element of the sum.
rSlice2The second element of the sum
Returns
The sum of rSlice1 and rSlice2.
Slice cfl::operator+ ( const Slice rSlice,
double  dValue 
)

Returns the sum of rSlice and dValue.

Parameters
rSliceThe first element of the sum.
dValueThe second element of the sum.
Returns
The Slice object that is the sum of rSlice and dValue.
Slice cfl::operator+ ( double  dValue,
const Slice rSlice 
)

Returns the sum of dValue and rSlice.

Parameters
dValueThe first element of the sum.
rSliceThe second element of the sum.
Returns
The sum of dValue and rSlice.
Slice cfl::operator- ( const Slice rSlice)

Returns minus rSlice.

Parameters
rSliceSome Slice object.
Returns
Minus of rSlice.
Slice cfl::operator- ( const Slice rSlice1,
const Slice rSlice2 
)

Returns the difference between rSlice1 and rSlice2. Both input parameters should be defined on the same model and at the same event time.

Parameters
rSlice1The first element of the difference.
rSlice2The second element of the difference.
Returns
The difference between rSlice1 and rSlice2.
Slice cfl::operator- ( const Slice rSlice,
double  dValue 
)

Returns the difference between rSlice and dValue.

Parameters
rSliceThe first element in subtraction.
dValueThe second element in subtraction.
Returns
The Slice object that is the difference between rSlice and dValue.
Slice cfl::operator- ( double  dValue,
const Slice rSlice 
)

Returns the difference between dValue and rSlice.

Parameters
dValueThe first element in subtraction.
rSliceThe second element in subtraction.
Returns
The difference of dValue and rSlice.
Slice cfl::operator/ ( const Slice rSlice1,
const Slice rSlice2 
)

Returns the ratio rSlice1 and rSlice2. Both input parameters should be defined on the same model and at the same event time.

Parameters
rSlice1The dividend.
rSlice2The divisor.
Returns
The ratio between rSlice1 and rSlice2.
Slice cfl::operator/ ( const Slice rSlice,
double  dValue 
)

Returns the ratio of rSlice and dValue.

Parameters
rSliceThe dividend.
dValueThe constant divisor.
Returns
The ratio between rSlice and dValue.
Slice cfl::operator/ ( double  dValue,
const Slice rSlice 
)

Returns the ratio of dValue and rSlice.

Parameters
dValueThe dividend.
rSliceThe divisor.
Returns
The ratio of dValue and rSlice.
Slice cfl::pow ( const Slice rSlice,
double  dPower 
)

Returns the representation of the random variable given by rSlice in the power dPower.

Parameters
rSliceSome random payoff.
dPowerThe power.
Returns
The random variable given by rSlice^dPower .
Slice cfl::rollback ( const Slice rSlice,
unsigned  iEventTime 
)

Returns the equivalent value of the derivative security represented by rSlice at event time with index iEventTime. The index of event time for rSlice should be greater or equal iEventTime.

Parameters
rSliceA random payoff.
iEventTimeIndex of event time, when the price of rSlice will be computed.
Returns
The price of the random payoff given by rSlice at event time with the index iEventTime.
Slice cfl::sqrt ( const Slice rSlice)

Returns squire root of rSlice.

Parameters
rSliceSome random payoff.
Returns
The random variable given by sqrt(rSlice) .