MA and ARMA — shocks with echoes, and an honest scoreboard
▸ Pretest — guess, even if you don't know
You fit an ARMA model to ten years of daily S&P 500 returns. The fit converges nicely. What should you expect from its out-of-sample forecasts?
MA(1): a shock with an echo
The moving-average model of order one (take the mean as zero for simplicity):
In words: today's value equals today's shock, plus theta times yesterday's shock. Reading the symbols: ("x sub t") is the value at time ; ("epsilon sub t") is the shock — fresh random noise arriving each period, as in D1-02; is yesterday's shock, one lag back; and is the Greek letter theta, the echo dial — how loudly yesterday's shock repeats today. Concrete: with , a shock of today adds now, echoes as tomorrow, and then contributes nothing ever again.
Read it as news dynamics: a fresh shock hits today, and yesterday's shock echoes exactly once, scaled by — then it is gone forever. Contrast this with AR(1) from D1-04, where a shock enters the level and echoes forever with geometric fading. The trading question MA answers: what does a market look like where events matter briefly and then fully stop mattering? One concrete habitat: bid-ask bounce — trades ping-ponging between the bid price and the ask price — induces MA(1)-like negative lag-1 autocorrelation in high-frequency returns. The ping-pong creates one-period echoes with no real price change behind them.
The MA(1) autocorrelation function can be worked out directly. Recall ("rho") is the symbol for autocorrelation — the correlation of the series with itself lags back. Only adjacent terms share a shock, so:
In words: the lag-1 autocorrelation equals theta divided by one plus theta squared, and at every lag of 2 or more the autocorrelation is exactly zero. For : . The largest lag-1 autocorrelation any MA(1) can produce is , at . Note the hard cutoff: beyond lag 1, exactly zero.
Reading ACF signatures
That cutoff is the identification heuristic of the whole Box–Jenkins tradition. Given a stationary series, look at its ACF — the autocorrelation function from D1-01, autocorrelation plotted at every lag:
- AR() signature: the ACF decays geometrically — shocks echo forever, so autocorrelation fades but never cleanly stops.
- MA() signature: the ACF cuts off — significant out to lag , then drops inside the noise band.
(The partial ACF, which statsmodels plots alongside, does the mirror image: it cuts off at for AR models. The pair of plots is the classic order-picking tool.) The band from D1-01 is what "drops to zero" means in practice — this is where that eyeball rule earns its keep.
ARMA: both kinds of memory
Real series often carry both a persistent component and short echoes, so combine them — ARMA(), where counts the past values used and counts the past shocks:
In words: today's value equals a constant, plus a weighted sum of the last values (each past value scaled by its own phi coefficient ), plus today's shock, plus a weighted sum of the last shocks (each scaled by its own theta coefficient ). The two signs are A1-00's for-loops — one looping over past values, one over past shocks. Concrete: ARMA(1,1) is just — the AR(1) and MA(1) models glued together.
The practical selling point is parsimony — doing the job with few parameters. An ARMA(1,1) often fits what a pure AR would need five lags to approximate, and fewer parameters means less overfitting (the D4-01 lesson, in model-order clothing). Fitting is no longer plain OLS, because the past shocks are unobserved — you never directly see the values. So use a library (display only; the exercise runtime here is numpy-only):
from statsmodels.tsa.arima.model import ARIMA
fit = ARIMA(x, order=(1, 0, 1)).fit() # ARMA(1,1); middle 0 = no differencing
The middle number is , the number of differences to take first — set it to 1 and the model differences a non-stationary series for you, which is exactly the D1-03 recipe automated (the "I" in ARIMA is "integrated").
The honest scoreboard
Where does this machinery actually make money? Time for the track's most valuable table:
- Daily returns: approximately nothing. Any stable linear pattern in returns is visible to everyone with a laptop and gets arbitraged toward zero — the efficient-markets logic from D1-01 and D1-02. Fitted coefficients come out tiny and unstable. What little survives is usually eaten by costs (D4-01). Fit one anyway, once, on real data. Watching a converged, statistically respectable model forecast the unconditional mean — the plain long-run average — every single day teaches you, viscerally and permanently, how weak linear predictability in returns is. Every quant has this scar; it is load-bearing.
- Spreads: genuinely useful. A stationary spread has real, slow linear structure — the AR side of ARMA is exactly the D1-04 pairs-trading model, and the half-life logic carries over unchanged.
- Volatility: genuinely useful. Realized volatility — volatility measured from recent returns rather than implied by option prices — has strong positive autocorrelation (D1-01 Fact 2): persistent, forecastable memory. ARMA-type structure on volatility is the gateway to the GARCH family of models, and volatility forecasts feed position sizing and options work directly.
Same tool, three habitats, one lesson: the model does not create predictability — it can only harvest autocorrelation that is already there. Check the ACF first; it tells you whether there is anything to model before you model it.
Try it
Implement ma1_series(eps, theta): build the MA(1) process from an array of shocks. The first element is eps[0] (the shock before it is treated as zero), and every later element t equals eps[t] plus theta times the previous shock eps[t-1].
⧉ Review cardWrite the MA(1) model and give its intuition versus AR(1).
⧉ Review cardWhat are the ACF signatures that identify AR versus MA models?
⧉ Review cardWhat is the lag-1 autocorrelation of an MA(1), and its maximum?
⧉ Review cardWhere do ARMA models fail and where do they earn their keep in trading?
Summarize it
Close the linear-models arc. In six sentences, written or spoken, summarize D1-01 through D1-05: what autocorrelation measures, what white noise and the random walk are null models for, why stationarity is the license to estimate anything, what kind of memory AR captures versus MA, and — final sentence — where in actual trading each piece of this machinery earns money and where it finds nothing.
Predict before the next lesson
Next: model selection and forecasting (D1-06). You now have a whole family of models — AR(1), AR(2), MA(1), ARMA(1,1), and upward. Before then, predict: if you fit every one of them to the same series, which will have the best in-sample fit, and why is that answer useless for picking the model you should actually trade?
◈ Calibration check
Could you sketch the ACF of an AR(1) versus an MA(1) from memory, compute rho_1 for a given theta, and explain to a skeptic why ARMA on daily returns finds nothing while ARMA on volatility works?
1 = guessing · 5 = could teach it
⏻ End of lesson
Mark it read to book its 4 review cards into your deck.
Sources & further reading
- bookTsay (2010), Analysis of Financial Time Series, 3e — §2
- bookBox, Jenkins, Reinsel & Ljung (2015), Time Series Analysis: Forecasting and Control, 5e — §3