C# 클래스 CIRProcess.CIR

상속: IExtensibleProcessIR, IMarkovSimulator, IParsable, IEstimationResultPopulable, IGreeksDerivativesInfo, IExportableContainer
파일 보기 프로젝트 열기: fairmat/InterestRatesModels

공개 프로퍼티들

프로퍼티 타입 설명
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