Time Series Analysis (Moving Average Filters)

From Met Dynamics
Jump to navigation Jump to search

Description

This article describes several filters for the analysis of time series data, including:

  • Simple Moving Average (SMA)
  • Exponential Moving Average (EMA)
  • Linear Regression Moving Average (LRMA)

Model theory

Under construction icon-blue.svg.png This section is currently under construction. Please check back later for updates and revisions.

Excel

Figure 1. Example showing the selection of the TimeSeriesData (blue frame), k (red frame) and Results (light blue frame) arrays in Excel, for the Simple Moving Average (SMA) case.

The Simple Moving Average (SMA) filter may be invoked from the Excel formula bar with the following function calls:

=mdTimeSeries_SMA(TimeSeriesData as Range, k as Integer)

Invoking the function with no arguments will print Help text associated with the model, including a link to this page.

The input parameters and calculation results are defined below in matrix notation, along with an example image showing the selection of the same cells and arrays in the Excel interface:

where:

  • is the number of data points
  • are the data points to average
  • is the number of previous data points over which the moving average is taken
  • is the value of the simple moving average over the previous data points

The Exponential Moving Average (EMA) filter may be invoked from the Excel formula bar with the following function calls:

=mdTimeSeries_EMA(TimeSeriesData as Range, alpha as Double)

Invoking the function with no arguments will print Help text associated with the model, including a link to this page.

The input parameters and calculation results are defined below in matrix notation, along with an example image showing the selection of the same cells and arrays in the Excel interface:

where:

  • is the number of data points
  • are the data points to average
  • is the smoothing factor
  • is the value of the exponential moving average

The Linear Regression Moving Average (LRMA) filter may be invoked from the Excel formula bar with the following function calls:

=mdTimeSeries_LRMA(TimeSeriesData as Range, k as Integer)

Invoking the function with no arguments will print Help text associated with the model, including a link to this page.

The input parameters and calculation results are defined below in matrix notation, along with an example image showing the selection of the same cells and arrays in the Excel interface:

where:

  • is the number of data points
  • are the data points to average
  • is the number of previous data points over which the linear regression moving average is taken
  • is the value of the linear regression moving average of the previous data points

References