ARBIMETRA · Financial intelligence, made practical.

ARBIMETRA LAB

Moving Average

Smooths a series with a simple or linearly weighted trailing average.

What it does

Smooths a series with a simple or linearly weighted trailing average.

Use it to see the underlying direction of a noisy series.

Data you need

  • One series
  • Window

Supported data: Time series. Level: Beginner.

Formula and method

SMA = (1/w) Σ yₜ₋ᵢ · WMA = Σ wᵢyₜ₋ᵢ / Σ wᵢ

Each value is replaced by an average of the latest w observations. A simple average weights them equally, and a weighted average gives linearly more weight to recent values. Accuracy compares each average with the next observation.

Assumptions

  • Rows are in time order

Input checks

  • Window from 2 to n−1

How to read the result

A longer window is smoother but lags turning points.

Worked example

Illustrative run on Box-Jenkins airline passengers. These figures are the actual output of this model on that example, and they say nothing about your own data.

  • The latest average is 476.1667; the one-step-ahead RMSE is 49.7226.
  • The average removes short-term variation and lags turning points.

Limitations

  • No forecast interval

Numerical validation

Validated 14 of 14 automated checks passed, including numerical results, invalid input, missing values, small samples, constant variables, charts and the interpretation text.

CheckReferenceResultAbs. errorToleranceSource
Simple average by hand37.3333333337.333333337.1e-151e-12Hand calculation
Weighted average by hand45.3333333345.333333337.1e-151e-12Hand calculation

Computed with python 3.13.2, numpy 2.2.5, scipy 1.14.1, pandas 2.3.3, statsmodels 0.14.4, scikit-learn 1.7.0, in your browser. A passing check confirms the listed comparison only. It does not make any result suitable for your data, and it is not a claim of equivalence with other statistical software.

Questions

Is this the same as an MA model?

No. A moving average smooths data. An MA model describes a series using past forecast errors.

ARBIMETRA LAB is an educational and research tool. Results should be checked by the researcher and are not professional advice.