The Moving Average (MA) function computes the average of a set of input values over a specified number of periods. The smaller the number of periods, the faster the moving average responds to changes in the input values.
The mathematical expression being calculated is as follows:
MAt = (Yt + Yt-1 + Yt-2 + ... + Yt-N+1) / N
Where N is the number of time periods and Y is the value. You can find further details about the calculation of a moving average from Wolfram MathWorld.
The Moving Average function requires the following input:
- d0 - Input data values - The set of data values for which the Moving Average is calculated.
The Moving Average function requires the following parameters.
- s0 - The number of periods to use in the calculation. The default value is 10.
- Alignment (Optional) – Hierarchy placeholder to be used as the alignment axis.
The Moving Average function generates the following output:
- Moving Average - The Moving Average result set.