Moving Average

Overview

The moving average for a given point in a time series is the average of the prior {% n-1 %} points and the current point.
{% Moving Average_n = \frac{1}{size} \sum_{i=n-size}^n P_i %}
Sometimes a moving average is defined to be
{% Moving Average_n = \frac{1}{2 size} \sum_{i=n-size}^{n+size} P_i %}
This second version has a look ahead feature, meaning, the moving average a given point is calculate from both earlier points and later points in the series, which means that this version is more accurate of as a representation of the time series but cannot be used in forecasting.

Topics

  • Implementation - demonstrates multiple ways to construct a moving average.
  • Exponential Weighting : is a technique to smooth a signal. It accomplishes this by taking a weighted average of all the points of the time series behind the current point. The weighting is such that points closer to the current point have greater weight than points further in the series.