ClassicalStatistical
◆ The PatternModeling dependence through past shocks
An MA(q) model expresses each value as a weighted sum of q past error terms. While AR uses past values, MA uses past surprises. ACF cutoff at lag q identifies the order.
yt = c + εt + θ1εt−1 + θ2εt−2 + … + θqεt−q
Each θ coefficient controls the impact of a past shock. MA models have finite memory — the effect of a shock dies out after exactly q steps.
// Interactive — MA(q) impulse response
θ10.60
Order (q)1
Pattern bridge: MA models capture how surprises propagate — the same mechanism behind market overreaction. The finite memory of MA is the opposite of the persistent memory in AR models.
Worked example
An MA(1) process with θ = 0.6 has a lag-1 autocorrelation of θ/(1 + θ²) = 0.441 and none beyond. Simulated over 5,000 points, the sample ACF is 0.447, 0.000, 0.009: one spike, then nothing. A shock is remembered for exactly one step, and so is anything a forecast can say about it.
Where it misleads
- Different θ values can give the same ACF (θ and 1/θ); only the invertible one is used.
- Beyond q steps an MA forecast is just the mean — useful to know before trusting long horizons.
- MA terms are estimated from unobserved errors, so fitting is harder and less stable than for AR terms.
In code
rng = np.random.default_rng(5)
theta, n = 0.6, 5_000
e = rng.normal(size=n + 1)
y = e[1:] + theta * e[:-1] # MA(1)
def acf(x, k):
x = x - x.mean(); return (x[:-k] * x[k:]).sum() / (x * x).sum()
theory1 = theta / (1 + theta ** 2)
sample = [round(acf(y, k), 3) for k in (1, 2, 3)]Assumes import numpy as np and import pandas as pd. Each snippet simulates or makes up its own series, as the comments say.
The same idea with a library
# Python — fit MA model from statsmodels.tsa.arima.model import ARIMA model = ARIMA(series, order=(0, 0, 2)).fit() # MA(2) print(model.summary())
Sources
- Time Series Analysis: Forecasting and Control (5th ed.), G. E. P. Box, G. M. Jenkins, G. C. Reinsel & G. M. Ljung, Wiley, 2015
- Time Series Analysis, J. D. Hamilton, Princeton University Press, 1994
Last reviewed October 2026 · How this site checks its content · Report a mistake
Linked from 1