Login Page - Create Account

Technical Studies Reference


Moving Average - Arnaud Legoux

This study calculates and displays an Arnaud Legoux Moving Average (ALMA) of the data specified by the Input Data Input.

Let \(X\) be a random variable denoting the Input Data, and let \(X_j\) be the value of the Input Data at Index \(j\). Let the Inputs Length, Sigma, and Offset be denoted as \(n\), \(\sigma\), and \(k\), respectively. Then we denote the Moving Average - Arnaud Legoux at Index \(t\) for the given Inputs as \(ALMA_t(X, n,\sigma, k)\), and we compute it for \(t \geq n - 1\) as follows.

\(\displaystyle{ALMA_t(X, n, \sigma, k) = \frac{\sum_{j = 0}^{n - 1}\exp\left(-\frac{(j - \lfloor k(n - 1) \rfloor)^2}{2n^2/\sigma^2}\right) \cdot X_{t - n + 1 + j}}{\sum_{j = 0}^{n - 1}\exp\left(-\frac{(j - \lfloor k(n - 1) \rfloor))^2}{2n^2/\sigma^2}\right)}}\)

For an explanation of the Sigma (\(\Sigma\)) notation for summation, refer to our description here.

For an explanation of the Floor Function (\(\lfloor \cdot \rfloor\)), refer to our description here

ALMA is a weighted moving average with Gaussian weights. It is advertised as a Gaussian filter, however caution should be exercised in this interpretation. The Input \(\sigma\) does not play the role of the standard deviation of the Gaussians. Rather, the standard deviation is determined by \(\frac{n}{\sigma}\). The mean, or center, of each Gaussian is determined by \(\lfloor k(n - 1) \rfloor\)

Inputs

  • Input Data
  • Length
  • Sigma: This Input controls the width of the Gaussian distribution of the weights.
  • Offset: This Input controls the center of the Gaussian distribution of the weights.

Spreadsheet

The spreadsheet below contains the formulas for this study in Spreadsheet format. Save this Spreadsheet to the Data Files Folder.

Open it through File >> Open Spreadsheet.

Moving_Average_-_Arnaud_Legoux.475.scss


*Last modified Monday, 26th September, 2022.