Property | Type | Description | |
---|---|---|---|
k1 | IModelParameter | ||
k2 | IModelParameter | ||
sigma1 | IModelParameter | ||
sigma2 | IModelParameter | ||
startingValue1 | IModelParameter | ||
startingValue2 | IModelParameter | ||
theta1 | IModelParameter | ||
theta2 | IModelParameter |
Method | Description | |
---|---|---|
CDSDefaultP ( IReadOnlyMatrixSlice dynamic, double dates, int j, double t ) : double |
Calculates the probability of a default at date t (conditional of being in a given state (realization) of process s1, s2), being on period s = dates[j].
|
|
CIR2 ( ) : System |
Default constructor which prepares an instance of the two factors Cox-Ingersoll-Ross model with some sample values.
|
|
DefaultValues ( ) : void |
Sets the default values for the components.
|
|
ExportObjects ( bool recursive ) : List |
Creates a list of all the sub-objects that can be edited.
|
|
Parse ( IProject context ) : bool |
Ensure the parameters are correct.
|
|
Populate ( string names, double values ) : void |
This is part of the IPopulable interface but it's not implemented.
|
|
Setup ( double simulationDates ) : void |
Called by Simulator after parse. In this case does nothing.
|
|
Transform ( double dates, IMatrixSlice outDynamic ) : void |
Calculates the probabilities for one scenario.
|
|
a ( int i, double x, double a ) : void |
This function defines the drift in the Cox-Ingersoll-Ross Two factors Markov process. The formula to calculate the A component is A[0] = k1 * (theta1 - previous state) A[1] = k2 * (theta2 - previous state).
|
|
ab ( int i, double x, double a, double b ) : void |
This function calculated drift and volatility in the Cox-Ingersoll-Ross Two factors Markov process. The formula to calculate the B component is B[0] = sqrt(previous state) * sigma1 B[1] = sqrt(previous state) * sigma2.
|
|
b ( int i, double x, double b ) : void |
This function defines the volatility in the Cox-Ingersoll-Ross Two factors Markov process. The formula to calculate the B component is B[0] = sqrt(previous state) * sigma1 B[1] = sqrt(previous state) * sigma2.
|
|
isLog ( bool &isLog ) : void |
Sets the passed array with a Boolean stating if the process must be simulated as a log-normal process.
|
Method | Description | |
---|---|---|
AdjSqrt ( double x ) : double |
Checks if the value is negative and floors it to zero, instead of attempting a square root of negative numbers.
|
|
GetZR ( double t ) : double |
Helper function to make functions easier to read. Just returns the value of the zero rate at position t.
|
|
SetDescription ( ) : void |
Sets the descriptions for the components.
|
public CDSDefaultP ( IReadOnlyMatrixSlice dynamic, double dates, int j, double t ) : double | ||
dynamic | IReadOnlyMatrixSlice | The underlying's realizations. |
dates | double | The corresponding underlying's dates. |
j | int | The wanted date index. |
t | double | The date at which we want to estimate the default prob. |
return | double |
public ExportObjects ( bool recursive ) : List |
||
recursive | bool | /// The parameter is not used. /// |
return | List |
public Parse ( IProject context ) : bool | ||
context | IProject | /// The underlying project. /// |
return | bool |
public Populate ( string names, double values ) : void | ||
names | string | The parameter is not used. |
values | double | The parameter is not used. |
return | void |
public Setup ( double simulationDates ) : void | ||
simulationDates | double | The parameter is not used. |
return | void |
public Transform ( double dates, IMatrixSlice outDynamic ) : void | ||
dates | double | Dates (in Year fractions). |
outDynamic | IMatrixSlice | Input and output matrix. |
return | void |
public a ( int i, double x, double a ) : void | ||
i | int | The parameter is not used. |
x | double | The state vector at the previous state. |
a | double | The output of the function. |
return | void |
public ab ( int i, double x, double a, double b ) : void | ||
i | int | The parameter is not used. |
x | double | The state vector at the previous state. |
a | double | |
b | double | The output drift. |
return | void |
public b ( int i, double x, double b ) : void | ||
i | int | The parameter is not used. |
x | double | The state vector at the previous state. |
b | double | The output of the function. |
return | void |
public isLog ( bool &isLog ) : void | ||
isLog | bool | /// A reference to the array to be set with the required information. /// The array contains a two members set to false as this simulation /// is not log-normal. /// |
return | void |