Autocorrelation Class |
Autocorrelation 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. Autocorrelation class interprets positive and negative lags equivalently as the delay against the current time. The (default) zero lag value means for the Autocorrelation class this will cause the autocorrelation coefficient to be permanently equal to 1.
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:
Autocorrelation(TimeSpan, Int32)
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).
Autocorrelation class is modified by adding an immediate value:
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: