Correlation Class |
The class provides four constructors to initialize an instance to operate either with expanding or sliding data set.
The following constructors imply an expanding data set and either the default zero lag or user-specified time lag value measured in data points:
The time lag value can be either positive, negative or zero. The Correlation class interprets positive lags as the delay of the first time series against the second one and negative lags have the opposite meaning. The (default) zero lag value means for the Correlation class that correlations will be computed at equal-time data points.
To operate with sliding data sets, it is necessary to define the sliding window size value either as a time period or a number of data points in the following constructors:
Irrespective of how the sliding window size is defined, the time lag value must not exceed the window size, otherwise an Exception will be thrown.
Modification of the indicators is done in standard way with Add(…) methods either time assigned or not (but not both for a given instance).
Correlation class is modified by adding of the two values corresponding to the variables considered:
The returned value is true if modification was successful.
Note |
---|
modification of the indicators assumes using of the current or equal-time values since lagging is applied automatically according to the value specified while initialization. |
Every modification changes the current correlation value available via class property: