CFL
|
![]() |
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) |
This module contains the basic classes of the library: interface class IModel and concrete class Slice.
Slice cfl::abs | ( | const Slice & | rSlice | ) |
Returns the absolute value of rSlice.
rSlice | Some random payoff. |
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.
rSlice | Some random payoff. |
Slice cfl::exp | ( | const Slice & | rSlice | ) |
Returns exponential of rSlice.
rSlice | Some random payoff. |
exp(rSlice)
. Slice cfl::indicator | ( | const Slice & | rSlice, |
double | dBarrier | ||
) |
Returns the indicator of the event: rSlice is greater than dBarrier.
rSlice | Some random payoff. |
dBarrier | Lower barrier. |
I(rSlice > dBarrier)
. Slice cfl::indicator | ( | double | dBarrier, |
const Slice & | rSlice | ||
) |
Returns the indicator of the event: dBarrier is greater than rSlice.
dBarrier | Upper barrier. |
rSlice | Some random payoff. |
I(dBarrier > rSlice)
. 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.
rSlice | Some random payoff. |
rBarrier | Random variable describing lower barrier. |
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.
rSlice | A random variable in the model. |
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.
rSlice | Some random payoff. |
rState | The indexes of state processes that will be present in the result. |
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.
rSlice | Some random payoff. |
iStates | The number of first state processes that will be present in the result. |
Slice cfl::log | ( | const Slice & | rSlice | ) |
Returns logarithm of rSlice.
rSlice | Some random payoff. |
log(rSlice)
. Slice cfl::max | ( | const Slice & | rSlice, |
double | dValue | ||
) |
Returns the maximum of rSlice and dValue.
dValue | A number. |
rSlice | Some payoff. |
Returns the maximum of rSlice1 and rSlice2. Both input parameters should be defined on the same model and at the same event time.
rSlice1 | Some payoff. |
rSlice2 | Some payoff. |
Slice cfl::max | ( | double | dValue, |
const Slice & | rSlice | ||
) |
Returns the maximum of rSlice and dValue.
dValue | A constant value. |
rSlice | Some random payoff. |
Slice cfl::min | ( | const Slice & | rSlice, |
double | dValue | ||
) |
Returns the minimum of rSlice and dValue.
dValue | A number. |
rSlice | Some payoff. |
Returns the minimum of rSlice1 and rSlice2. Both input parameters should be defined on the same model and at the same event time.
rSlice1 | Some payoff. |
rSlice2 | Some payoff. |
Slice cfl::min | ( | double | dValue, |
const Slice & | rSlice | ||
) |
Returns the minimum of rSlice and dValue.
dValue | A constant value. |
rSlice | Some random payoff. |
Returns the product of rSlice1 and rSlice2. Both input parameters should be defined on the same model and at the same event time.
rSlice1 | The first multiplier. |
rSlice2 | The second multiplier. |
Slice cfl::operator* | ( | const Slice & | rSlice, |
double | dValue | ||
) |
Returns the product of rSlice and dValue.
rSlice | The first multiplier. |
dValue | The second multiplier. |
Slice cfl::operator* | ( | double | dValue, |
const Slice & | rSlice | ||
) |
Returns the product of dValue and rSlice.
dValue | The first multiplier. |
rSlice | The second multiplier. |
Returns the sum of rSlice1 and rSlice2. Both input parameters should be defined on the same model and at the same event time.
rSlice1 | The first element of the sum. |
rSlice2 | The second element of the sum |
Slice cfl::operator+ | ( | const Slice & | rSlice, |
double | dValue | ||
) |
Returns the sum of rSlice and dValue.
rSlice | The first element of the sum. |
dValue | The second element of the sum. |
Slice cfl::operator+ | ( | double | dValue, |
const Slice & | rSlice | ||
) |
Returns the sum of dValue and rSlice.
dValue | The first element of the sum. |
rSlice | The second element of the sum. |
Slice cfl::operator- | ( | const Slice & | rSlice | ) |
Returns the difference between rSlice1 and rSlice2. Both input parameters should be defined on the same model and at the same event time.
rSlice1 | The first element of the difference. |
rSlice2 | The second element of the difference. |
Slice cfl::operator- | ( | const Slice & | rSlice, |
double | dValue | ||
) |
Returns the difference between rSlice and dValue.
rSlice | The first element in subtraction. |
dValue | The second element in subtraction. |
Slice cfl::operator- | ( | double | dValue, |
const Slice & | rSlice | ||
) |
Returns the difference between dValue and rSlice.
dValue | The first element in subtraction. |
rSlice | The second element in subtraction. |
Returns the ratio rSlice1 and rSlice2. Both input parameters should be defined on the same model and at the same event time.
rSlice1 | The dividend. |
rSlice2 | The divisor. |
Slice cfl::operator/ | ( | const Slice & | rSlice, |
double | dValue | ||
) |
Returns the ratio of rSlice and dValue.
rSlice | The dividend. |
dValue | The constant divisor. |
Slice cfl::operator/ | ( | double | dValue, |
const Slice & | rSlice | ||
) |
Returns the ratio of dValue and rSlice.
dValue | The dividend. |
rSlice | The divisor. |
Slice cfl::pow | ( | const Slice & | rSlice, |
double | dPower | ||
) |
Returns the representation of the random variable given by rSlice
in the power dPower
.
rSlice | Some random payoff. |
dPower | The power. |
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.
rSlice | A random payoff. |
iEventTime | Index of event time, when the price of rSlice will be computed. |
Slice cfl::sqrt | ( | const Slice & | rSlice | ) |
Returns squire root of rSlice.
rSlice | Some random payoff. |
sqrt(rSlice)
.