ECON 410 · Econometrics II: Causal Methods and Time Series
Autoregressive and Moving Average Models
Two simple recipes for a series with memory, one that remembers its past values and one that remembers past surprises.
Key takeaways
- An autoregressive (AR) model says today's value depends on its own past values plus a new shock.
- A moving average (MA) model says today's value depends on the current shock and a few past shocks.
- An AR series fades gradually; an MA(1) series has memory for exactly one period.
- The autocorrelation pattern, how strongly a series relates to its own past, helps tell the two apart.
- These models assume a stationary series; if it has a unit root, difference it first.
Maya runs a smoothie cart. On a day when she sells 30 smoothies, what should she guess for tomorrow? A good guess is not 20, her usual average, and it is not 30 either. Busy days tend to be followed by somewhat busy days. The crowd from a street fair does not vanish at midnight. But the effect also cools off. By the end of the week, things are back to normal.
That is a series with memory. The question for this lesson is how to describe the memory with a simple recipe, so you can forecast and understand the pattern. There are two basic recipes. One says today depends on yesterday's value. The other says today depends on yesterday's surprise. Put them together, and you have the working toolkit of time-series forecasting.
Setting the stage: a series with memory
Everything here assumes the series is stationary, an idea built in the lesson on stationarity and unit roots. Its average stays put, and its wiggles stay the same size. Our smoothie sales hover around an average of 20 per day.
We will write each day's sales as the average plus some leftover. The leftover has two sources: a shock, today's fresh surprise (a rainy day, a street fair), and a memory of the past. A shock is modeled as random noise with an average of zero, unrelated from day to day. Economists call such noise white noise. The only job of an AR or MA model is to say how memory is built from past values or past shocks.
The autoregressive model: remember the past value
"Auto" means self, and "regressive" means regressing, so an autoregressive model regresses a series on its own past. The simplest, AR(1), uses one lag (one period back):
y(today) = μ + φ × (y(yesterday) − μ) + shock Here μ (mu) is the long-run average, and φ (phi) says how much of yesterday's gap above or below average carries into today. For stationarity, φ must lie between −1 and 1. If φ = 0, there is no memory. If φ is near 1, memory is long.
Suppose Maya's μ = 20 and φ = 0.6. She sold 30 today, which is 10 above average. Ignoring future shocks (their best guess is zero), forecast ahead:
Tomorrow: 20 + 0.6 × (30 − 20) = 20 + 6 = 26
Day after: 20 + 0.6 × (26 − 20) = 20 + 3.6 = 23.6
Next day: 20 + 0.6 × (23.6 − 20) = 20 + 2.16 = 22.16
Next day: 20 + 0.6 × (22.16 − 20) = 20 + 1.296 = 21.296 Each day, the gap shrinks to 60% of the day before: 10, 6, 3.6, 2.16, 1.296. The forecast glides back to the average of 20 but never quite arrives. That glide is the signature of an AR model.
The last point, 20.78, comes from one more step: 20 + 0.6 × 1.296 = 20.7776, which rounds to 20.78. You can add more lags if memory goes back further. An AR(2) uses the two previous days, and an AR(p) uses p of them.
The moving average model: remember the past surprise
The second recipe sounds odd at first. A moving average model says today's value is built from the current shock and some recent shocks. The word "moving" refers to a window of shocks that slides forward in time. The simplest, MA(1), is:
y(today) = μ + shock(today) + θ × shock(yesterday) The Greek letter θ (theta) says how much of yesterday's surprise still echoes today. Think of a street fair that lifts sales on the day and spills a little into the next, then is gone. The effect has a hard stop.
Say μ = 20 and θ = 0.5. Yesterday a surprise of +8 smoothies hit, the street fair. Today's forecast, before knowing today's shock:
Forecast for today = 20 + 0.5 × 8 = 24
Forecast for the day after = 20 + 0.5 × 0 = 20 The day after, the forecast is simply the average, 20, because the fair's echo has ended. Compare with the AR model, where the forecast drifted down gradually and never fully stopped. That is the key behavioral difference: an MA(q) series forgets shocks completely after q periods, while an AR series forgets them gradually.
Look at the last bullets. For an MA model, θ can be large and the series is still stationary. There is a different technical rule, called invertibility, that asks |θ| to be below 1 so that the model can be rewritten in terms of past observations. It is a rule of convenience that lets forecasters recover the shocks from the data.
Reading memory from the autocorrelation function
How do you know which recipe fits real data? You study the autocorrelation function, or ACF: the correlation between the series and itself shifted back by 1, 2, 3 and more periods. A correlation of 1 means perfect lockstep; 0 means no link.
For our AR(1) with φ = 0.6, the theory says lag-k autocorrelation is φ raised to the power k:
Lag 1: 0.6 Lag 2: 0.36 Lag 3: 0.216 Lag 4: 0.1296 Lag 5: 0.0778 It decays gradually and never hits zero. For our MA(1) with θ = 0.5, lag 1 is θ ÷ (1 + θ²) = 0.5 ÷ 1.25 = 0.4. At lag 2 and beyond it is exactly 0, because no shock is shared by days two or more apart. It cuts off sharply.
This is the central diagnostic. Slow fade suggests AR. A sharp cutoff suggests MA. Real data are messier, and a second chart, the partial autocorrelation function, helps: for an AR(p) it cuts off after lag p, while for an MA it fades. Together they hint at the right order.
Watching an MA series being born
It helps to build one by hand. Take μ = 20, θ = 0.5, and suppose the shocks for four days are +4, −2, +6 and 0. Assume the shock before day 1 was 0. Each day's value is the average, plus today's shock, plus half of yesterday's shock:
Day 1: 20 + 4 + 0.5 × 0 = 24
Day 2: 20 − 2 + 0.5 × 4 = 20
Day 3: 20 + 6 + 0.5 × (−2) = 25
Day 4: 20 + 0 + 0.5 × 6 = 23 Notice day 4. No fresh surprise arrived that day, yet sales were 3 above average. That is the echo of day 3's big shock of +6, half of which spilled over. On day 5, if again nothing new happens, sales return to exactly 20. Anyone who sees only the sales numbers (24, 20, 25, 23) sees a series with a short memory, and the ACF would reveal it: neighbors are related, but days two apart are not.
This is why economists like MA terms for things that have a short, clear aftershock: a one-time tax rebate that spreads its spending over a couple of months, or a storm that disrupts deliveries for a week. The AR form suits things with feedback, where today's level itself pushes tomorrow's, as with inflation that people build into the next round of price changes.
Putting them together: ARMA and ARIMA
Often a series needs both ingredients. An ARMA(p, q) model has p autoregressive lags and q moving average terms. An ARMA(1,1) might be: today depends on yesterday's value and yesterday's shock. If a series is not stationary, you first difference it d times, and the resulting model is ARIMA(p, d, q), where the I means "integrated." So ARIMA(1,1,0) means: difference once, then fit an AR(1) to the changes.
To choose among candidates, forecasters use an information criterion such as AIC (Akaike information criterion). It rewards a good fit but charges a penalty for each extra parameter. Lower is better. Without the penalty, you would always add more terms and end up fitting noise. After fitting, the leftover errors should look like white noise. If they still show a pattern, the model has missed something.
A common mistake: confusing a good fit with a good forecast
A model that hugs the past data closely can still forecast badly. If you keep adding lags until the fit is perfect, you have memorized the noise. The test is how it performs on data it has not seen. Good practice is to hold back the most recent months, fit the model on the earlier ones, and compare forecasts with what actually happened.
Another slip is forgetting that forecasts from AR models go flat. Far into the future, every stationary model predicts the long-run average. That is honest: it says that for distant dates, today tells us little. Do not read a flat long-range forecast as a promise of stability. It is only the model saying "I don't know much that far out."
Finally, these models describe one series by itself. They know nothing about interest rates or policy. When you want several series to explain each other, you need the tools in cointegration and vector autoregressions. And as in all of econometrics, fitting is only half the job: maximum likelihood is the usual engine under the hood that finds the φ and θ values.
Words to know
Autoregressive (AR) model a model where today's value depends on its own past values plus a shock.
Moving average (MA) model a model where today's value depends on the current shock and a fixed number of past shocks.
White noise random shocks with an average of zero that are unrelated across time.
Autocorrelation the correlation between a series and a copy of itself shifted back by some number of periods.
ARIMA a model that differences a series d times and then fits an ARMA(p, q) to the result.
Invertibility a condition on an MA model that lets the shocks be recovered from past observations.
Information criterion a score, such as AIC, that balances fit against the number of parameters.
Check yourself
- In your own words, what is the main difference between how an AR model and an MA(1) model remember a shock?
- An AR(1) has μ = 50 and φ = 0.5. Today's value is 70. What is the forecast for tomorrow, and for the day after?
- An MA(1) has μ = 100 and θ = 0.4. Yesterday's shock was +10. What is the forecast for today, before today's shock is known?
- For an AR(1) with φ = 0.5, what is the autocorrelation at lag 3?
- Explain why an MA(1) has zero autocorrelation at lag 2.
- Explain why choosing a model only by how well it fits past data can mislead you.
Show the answers
- An AR model carries shocks forward through past values, so they fade gradually and never fully end; an MA(1) remembers a shock for exactly one more period and then forgets it.
- Tomorrow: 50 + 0.5 × (70 − 50) = 60; the day after: 50 + 0.5 × (60 − 50) = 55.
- 100 + 0.4 × 10 = 104.
- The autocorrelation is φ³ = 0.5 × 0.5 × 0.5 = 0.125.
- Days two apart share no common shock, since each day's value uses only its own shock and the one before, so their link is zero.
- Adding terms always improves the in-sample fit by matching noise, so the model may forecast new data poorly; penalties like AIC and holdout tests guard against that.