Understanding Moving Averages vs. Centered Moving Averages

Moving averages are widely used in time series analysis, forecasting, and data smoothing. While both Moving Average (MA) and Centered Moving Average (CMA) aim to reduce short-term fluctuations and highlight trends, they differ in how they position the average relative to the data points.


1. Moving Average (MA)

A Moving Average calculates the average of a fixed number of consecutive data points and assigns that average to the last point in the window. For example, in a 3-period moving average:

  • Take the first three observations, compute their average, and assign it to the third period.
  • Slide the window forward by one period and repeat.

Key Characteristics:

  • Purpose: Smooths out short-term variations to reveal underlying trends.
  • Positioning: The average is aligned with the end of the window.
  • Common Use: Forecasting and trend analysis in financial markets, sales data, etc.

2. Centered Moving Average (CMA)

A Centered Moving Average adjusts the positioning so that the average is centered in the middle of the window rather than at the end. This is particularly useful for seasonal data or when you want the smoothed value to represent the midpoint of the time span.

Key Characteristics:

  • Purpose: Provides a more accurate representation of the trend at the center of the time window.
  • Positioning: The average is aligned with the middle of the window.
  • Common Use: Seasonal adjustment in time series decomposition.

Key Differences at a Glance

FeatureMoving Average (MA)Centered Moving Average (CMA)
AlignmentEnd of the windowMiddle of the window
Use CaseTrend smoothingSeasonal adjustment
InterpretationSlight lag in trendMore accurate trend position

Extending the Moving Average Using y = mx + b

While moving averages smooth data, they do not inherently predict future values. To extend the trend beyond the available data, you can apply a linear regression line using the equation:

$ y = mx + b $

Where:

  • y = predicted value
  • m = slope of the trend line
  • x = time period (e.g., day, month)
  • b = intercept (value when x = 0)

How to Apply It:

  1. Compute the Moving Average or Centered Moving Average for your dataset.
  2. Plot the smoothed points against time.
  3. Fit a linear regression line through these points:
    • Calculate the slope (m) and intercept (b) using least squares or a regression tool.
  4. Use the equation y = mx + b to forecast future values:
    • Plug in future time periods for x to estimate y.

Important: Start from the Nearest Inflexion Point of the CMA

When using y = mx + b for extrapolation, it’s critical to identify the nearest inflexion point in the Centered Moving Average curve. An inflexion point is where the trend changes direction (from upward to downward or vice versa). Why?

  • Reason: Extrapolating from an outdated trend can lead to inaccurate forecasts. The inflexion point represents the most recent shift in trend, making it the best anchor for your regression line.
  • How:
    • Analyze the CMA curve for changes in slope.
    • Select the segment starting at the latest inflexion point.
    • Fit your regression line to this segment for a more realistic projection.

Example:
If your CMA shows a turning point at period 10, use data from period 10 onward to calculate m and b, then extend the line for future periods.


Why Use This Method?

  • Moving averages alone cannot forecast beyond the last data point.
  • Adding a regression line from the latest inflexion point ensures your forecast reflects the most recent trend direction.