C# Класс CIRProcess.CIR

Наследование: IExtensibleProcessIR, IMarkovSimulator, IParsable, IEstimationResultPopulable, IGreeksDerivativesInfo, IExportableContainer
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
k IModelParameter
r0 IModelParameter
sigma IModelParameter
theta IModelParameter

Открытые методы

Метод Описание
Bond ( IReadOnlyMatrixSlice dynamic, double dates, int i, double t, double s ) : double

Calculates the value of a Bond under the Cox-Ingersoll-Ross model.

CIR ( ) : System

Default constructor, sets all the values to a default of 0.001.

ExportObjects ( bool recursive ) : List

Creates a list of all the sub-objects that can be edited.

GetDeltaFactors ( ) : IModelParameter[]

Gets the factors for Delta Greek derivative.

GetVegaFactors ( ) : IModelParameter[]

Gets the factors for Vega Greek derivative.

Parse ( IProject context ) : bool

Ensure the parameters are correct.

Populate ( IStochasticProcess container, EstimationResult estimate ) : void

Populate editable fields from name and value vectors specific to the CIR process.

Setup ( double dates ) : void

Called by Simulator after parse. Calculates the variables d and nu for faster execution.

a ( int i, double x, double a ) : void

This function defines the drift in the Cox-Ingersoll-Ross Markov process. The formula to calculate the A component is A = k * (theta - max(previous state, 0)).

ab ( int i, double x, double a, double b ) : void

This function calculates the drift and the volatility in the Cox-Ingersoll-Ross Markov process. as A = k * (theta - max(previous state, 0)). B = sigma * sqrt(max(previous state, 0)).

b ( int i, double x, double b ) : void

This function defines the volatility in the Cox-Ingersoll-Ross Markov process. The formula to calculate the B component is B = sigma * sqrt(max(previous state, 0)).

isLog ( bool &isLog ) : void

Sets the passed array with a Boolean stating if the process must be simulated as a log-normal process.

Приватные методы

Метод Описание
SetParametersValue ( ) : void

Prepares the serialized model parameters with the provided values.

Описание методов

Bond() публичный Метод

Calculates the value of a Bond under the Cox-Ingersoll-Ross model.
public Bond ( IReadOnlyMatrixSlice dynamic, double dates, int i, double t, double s ) : double
dynamic IReadOnlyMatrixSlice /// The simulated process. ///
dates double /// The vector of reference dates. ///
i int /// The index at which the state variable must be sampled. ///
t double /// The date in years/fractions at at which the state variable must be sampled. ///
s double /// The maturity of the bond. ///
Результат double

CIR() публичный Метод

Default constructor, sets all the values to a default of 0.001.
public CIR ( ) : System
Результат System

ExportObjects() публичный Метод

Creates a list of all the sub-objects that can be edited.
public ExportObjects ( bool recursive ) : List
recursive bool /// The parameter is not used. ///
Результат List

GetDeltaFactors() публичный Метод

Gets the factors for Delta Greek derivative.
public GetDeltaFactors ( ) : IModelParameter[]
Результат IModelParameter[]

GetVegaFactors() публичный Метод

Gets the factors for Vega Greek derivative.
public GetVegaFactors ( ) : IModelParameter[]
Результат IModelParameter[]

Parse() публичный Метод

Ensure the parameters are correct.
public Parse ( IProject context ) : bool
context IProject /// The underlying project. ///
Результат bool

Populate() публичный Метод

Populate editable fields from name and value vectors specific to the CIR process.
public Populate ( IStochasticProcess container, EstimationResult estimate ) : void
container IStochasticProcess /// The stochastic process which is being referenced to. ///
estimate EstimationResult /// The estimation result which contains values and names of parameters. ///
Результат void

Setup() публичный Метод

Called by Simulator after parse. Calculates the variables d and nu for faster execution.
public Setup ( double dates ) : void
dates double The parameter is not used.
Результат void

a() публичный Метод

This function defines the drift in the Cox-Ingersoll-Ross Markov process. The formula to calculate the A component is A = k * (theta - max(previous state, 0)).
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.
Результат void

ab() публичный Метод

This function calculates the drift and the volatility in the Cox-Ingersoll-Ross Markov process. as A = k * (theta - max(previous state, 0)). B = sigma * sqrt(max(previous state, 0)).
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 of the function.
Результат void

b() публичный Метод

This function defines the volatility in the Cox-Ingersoll-Ross Markov process. The formula to calculate the B component is B = sigma * sqrt(max(previous state, 0)).
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.
Результат void

isLog() публичный Метод

Sets the passed array with a Boolean stating if the process must be simulated as a log-normal process.
public isLog ( bool &isLog ) : void
isLog bool /// A reference to the array to be set with the required information. /// The array contains a single member set to false as this simulation /// is not log-normal. ///
Результат void

Описание свойств

k публичное свойство

The k parameter of the model. It's the mean reversion speed.
public IModelParameter k
Результат IModelParameter

r0 публичное свойство

The starting point for the model.
public IModelParameter r0
Результат IModelParameter

sigma публичное свойство

The sigma parameter of the model. It's the volatility.
public IModelParameter sigma
Результат IModelParameter

theta публичное свойство

The theta parameter of the model. It's the long term mean.
public IModelParameter theta
Результат IModelParameter