C# Class HistoricalSimulator.HistoricalSimulator

Inheritance: IFullSimulator, IExtensibleProcess, IParsable
Exibir arquivo Open project: fairmat/EquityModels

Private Properties

Property Type Description
NearestDate System.DateTime
NearestDateIndex int

Public Methods

Method Description
ExportObjects ( bool recursive ) : List

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

HistoricalSimulator ( ) : System

Initializes the object.

Parse ( IProject context ) : bool

Parses the process (in this case nothing has to be done).

Setup ( double simulationDates ) : void

Called by Simulator after parse. Initializes here time-dependant but not state dependent variables.

Simulate ( double dates, IReadOnlyMatrixSlice noise, IMatrixSlice outDynamic ) : void

Simulate a realization of the stochastic process driven by the noise matrix noise.

This function is called once for realization.

Private Methods

Method Description
NearestDate ( System.DateTime referenceDate, System.DateTime dateA, System.DateTime dateB ) : System.DateTime

Gets the nearest date to the reference date between the given dates.

NearestDateIndex ( System.DateTime referenceDate, System.DateTime dates ) : int

Gets the nearest date index to the reference date between the dates contained in the array.

Method Details

ExportObjects() public method

Creates a list of all the sub-objects that can be edited.
public ExportObjects ( bool recursive ) : List
recursive bool The parameter is not used.
return List

HistoricalSimulator() public method

Initializes the object.
public HistoricalSimulator ( ) : System
return System

Parse() public method

Parses the process (in this case nothing has to be done).
public Parse ( IProject context ) : bool
context IProject The project representing the context of the parsing.
return bool

Setup() public method

Called by Simulator after parse. Initializes here time-dependant but not state dependent variables.
public Setup ( double simulationDates ) : void
simulationDates double /// The dates at which the process realizations will be requested. ///
return void

Simulate() public method

Simulate a realization of the stochastic process driven by the noise matrix noise.
This function is called once for realization.
public Simulate ( double dates, IReadOnlyMatrixSlice noise, IMatrixSlice outDynamic ) : void
dates double /// The dates (in years fractions) at which the process must be simulated. ///
noise IReadOnlyMatrixSlice The matrix of IID normal realizations.
outDynamic IMatrixSlice Where the dynamic should be written.
return void