Standard deviation (rolling, time-based)

Signature

Accumulate_Rolling_Standard_Deviation(expression, window)

Description

Applies a moving window to the signal expression and calculates the standard deviation over each window. Each sample of 'result' contains the standard deviation over all samples in the window ending at that time.

Note  

A moving window is defined by a signal: Each sample of the signal represents a window. The value of the sample is the starting point of the window, the time of the sample is the end point of the window. A window defined this way contains all samples where the time t fulfills the condition start < t < end. Windows are usually created by using one of the window creation functions (Window_Sample, Window_Time, Window_Signal_*, ...). Windows can be fed to the window evaluation function (Accumulate_Rolling_*).

Result

The rolling standard deviation for expression in the time range given by window.

Arguments

 

expression

The signal for which the standard deviation is calculated.

window

A window signal which defines the start time of the time range (moving window). The end time is defined by the current time. E.g. to calculate the standard deviation for the last 5 seconds use Accumulate_Rolling_Standard_Deviation(expression, Master()-5).