ECON30401 · Time series · Note 4

Forecasting
& seasonality

Once a model is fitted, two practical questions follow: what does it predict, and how do we handle the seasonal swings in quarterly and monthly data? This note derives the optimal predictor and forecast-error variance for an AR model, then models seasonality with deterministic dummies and a seasonal ARMA, computing quarter-by-quarter means and a seasonally adjusted series.

The optimal predictor

The best forecast of a future value, in the mean-square sense, is its conditional expectation given the information available now. Writing \(\hat Y_{T+i}=\mathbb{E}[Y_{T+i}\mid Y_T=y_T, Y_{T-1}=y_{T-1},\ldots]\), the key fact is that future shocks cannot be predicted: under the i.i.d./white-noise assumption

$$\mathbb{E}[\varepsilon_{T+j}\mid Y_T=y_T,\ldots]=\mathbb{E}[\varepsilon_{T+j}]=0 \qquad \text{for all } j\ge1.$$

So to forecast we take conditional expectations through the model equation, replace future errors by zero, and replace future \(Y\)'s by their own forecasts. Because a stationary process forgets its past, the forecasts converge to the unconditional mean as the horizon grows, and the forecast becomes progressively less informative.

Forecasting an AR(2)

Take \(Y_t=\alpha+\phi_1 Y_{t-1}+\phi_2 Y_{t-2}+\varepsilon_t\). The one-step forecast plugs in the observed values and sets \(\varepsilon_{T+1}\) to its mean of zero,

$$\hat Y_{T+1}=\mathbb{E}[\alpha+\phi_1 Y_T+\phi_2 Y_{T-1}+\varepsilon_{T+1}\mid Y_T=y_T]=\alpha+\phi_1 y_T+\phi_2 y_{T-1}.$$

The two-step forecast needs \(Y_{T+1}\), which we do not yet observe, so we substitute its forecast:

$$\hat Y_{T+2}=\alpha+\phi_1\hat Y_{T+1}+\phi_2 y_T=\alpha(1+\phi_1)+(\phi_1^2+\phi_2)y_T+\phi_1\phi_2 y_{T-1}.$$

This is the general recursive pattern: each forecast is built from earlier forecasts and observed data, iterating the model forward.

Forecast-error variance

Forecasts are uncertain, and the uncertainty grows with the horizon. The forecast error at horizon \(i\) is \(Y_{T+i}-\hat Y_{T+i}\); its variance \(\mathrm{FE}(i)=\mathbb{E}[(Y_{T+i}-\hat Y_{T+i})^2]\) measures accuracy. One step ahead, the only unknown is the next shock,

$$\mathrm{FE}(1)=\mathbb{E}[(Y_{T+1}-\hat Y_{T+1})^2]=\mathbb{E}[\varepsilon_{T+1}^2]=\sigma^2.$$

Two steps ahead the error is \(Y_{T+2}-\hat Y_{T+2}=\varepsilon_{T+2}+\phi_1(Y_{T+1}-\hat Y_{T+1})=\varepsilon_{T+2}+\phi_1\varepsilon_{T+1}\), whose variance is the MA(1) result

$$\mathrm{FE}(2)=\mathbb{E}[(\varepsilon_{T+2}+\phi_1\varepsilon_{T+1})^2]=\sigma^2(1+\phi_1^2).$$

Since \(\mathrm{FE}(2)>\mathrm{FE}(1)\) whenever \(\phi_1\neq0\), and this pattern continues, forecast accuracy declines as the horizon lengthens — distant observations become less relevant, and the error variance climbs toward the process variance.

Modelling seasonality with dummies

Quarterly and monthly economic series often show a strong, repeating within-year pattern. One approach models it deterministically with seasonal dummy variables. For quarterly data we include an intercept plus three quarterly dummies (and, here, an AR term and an MA term):

$$Y_t=\alpha_0+\alpha_1 D_{1t}+\alpha_2 D_{2t}+\alpha_3 D_{3t}+\phi_2 Y_{t-2}+\varepsilon_t+\theta_1\varepsilon_{t-1}.$$

We deliberately use three dummies for four quarters, not four. Including a full set of four dummies alongside the intercept would make the regressors perfectly collinear — the dummy variable trap. Omitting one (here the fourth quarter, our baseline) breaks the collinearity; the intercept \(\alpha_0\) then captures the baseline quarter and each \(\alpha_j\) is that quarter's difference from it.

Deriving the quarter-by-quarter means

The seasonal dummies give each quarter its own mean. In quarter 1, \(D_{1t}=1\) and \(D_{2t}=D_{3t}=0\), so taking expectations (and using \(\mathbb{E}[\varepsilon_t]=0\)),

$$\mu_1=\mathbb{E}[Y_t\mid q=1]=\alpha_0+\alpha_1+\phi_2\,\mathbb{E}[Y_{t-2}\mid q=1].$$

Because \(Y_{t-2}\) two quarters before quarter 1 falls in quarter 3, \(\mathbb{E}[Y_{t-2}\mid q=1]=\mu_3\). Repeating for each quarter gives the system

$$\mu_1=\alpha_0+\alpha_1+\phi_2\mu_3,\quad \mu_2=\alpha_0+\alpha_2+\phi_2\mu_4,\quad \mu_3=\alpha_0+\alpha_3+\phi_2\mu_1,\quad \mu_4=\alpha_0+\phi_2\mu_2.$$

The \(Y_{t-2}\) term links quarters two apart, so the equations pair up: \((\mu_1,\mu_3)\) together and \((\mu_2,\mu_4)\) together. Substituting the third equation into the first,

$$\mu_1=\alpha_0+\alpha_1+\phi_2(\alpha_0+\alpha_3+\phi_2\mu_1)\ \Longrightarrow\ \mu_1=\frac{\alpha_0+\alpha_1+\phi_2(\alpha_0+\alpha_3)}{1-\phi_2^2},$$

and \(\mu_3\) follows by back-substitution; \((\mu_2,\mu_4)\) solve identically. The result is a distinct, stable mean level for each quarter — exactly the seasonal pattern we set out to capture.

Seasonal adjustment

Subtracting the fitted deterministic and autoregressive part leaves the seasonally adjusted series,

$$Y_t^{SA}=Y_t-(\alpha_0+\alpha_1 D_{1t}+\alpha_2 D_{2t}+\alpha_3 D_{3t}+\phi_2 Y_{t-2})=\varepsilon_t+\theta_1\varepsilon_{t-1},$$

which is just an MA(1). Its variance is therefore

$$\mathrm{Var}(Y_t^{SA})=\mathrm{Var}(\varepsilon_t+\theta_1\varepsilon_{t-1})=\sigma^2(1+\theta_1^2).$$

Stripping out the predictable seasonal and dynamic structure leaves a simple stationary residual whose properties we already know — the payoff of writing the model down carefully.

Check your understanding

For an AR(1), \(Y_t=\alpha+\phi_1 Y_{t-1}+\varepsilon_t\), find the one- and two-step forecasts and their error variances.

One step: \(\hat Y_{T+1}=\alpha+\phi_1 y_T\), with error \(\varepsilon_{T+1}\) and \(\mathrm{FE}(1)=\sigma^2\). Two steps: \(\hat Y_{T+2}=\alpha+\phi_1\hat Y_{T+1}=\alpha(1+\phi_1)+\phi_1^2 y_T\), with error \(\varepsilon_{T+2}+\phi_1\varepsilon_{T+1}\) and \(\mathrm{FE}(2)=\sigma^2(1+\phi_1^2)\). As the horizon grows the forecast tends to the unconditional mean \(\alpha/(1-\phi_1)\) and the error variance tends to \(\sigma^2/(1-\phi_1^2)\), the process variance.

Why include only three seasonal dummies plus an intercept for quarterly data?

Four quarterly dummies always sum to a column of ones, which is the intercept. Including all four alongside the intercept makes the regressor matrix singular — the dummy variable trap — and the coefficients cannot be identified. Dropping one dummy (making that quarter the baseline captured by the intercept) restores identification; each remaining coefficient is the seasonal offset of its quarter relative to the baseline.

Show that the seasonally adjusted series above has variance \(\sigma^2(1+\theta_1^2)\).

After removing the deterministic and AR components, \(Y_t^{SA}=\varepsilon_t+\theta_1\varepsilon_{t-1}\), an MA(1). Its variance is \(\mathbb{E}[(\varepsilon_t+\theta_1\varepsilon_{t-1})^2]=\mathbb{E}[\varepsilon_t^2]+\theta_1^2\mathbb{E}[\varepsilon_{t-1}^2]+2\theta_1\mathbb{E}[\varepsilon_t\varepsilon_{t-1}]\). By white noise the cross term is zero, giving \(\sigma^2(1+\theta_1^2)\).

Related notes

Downloads

Lecture 4 slides: prediction & seasonality
AR forecasting, forecast-error variance, seasonal dummies and seasonal ARMA models.
PDF
Video exercise: AR(2) prediction & seasonal ARMA (worked solutions)
Full step-by-step solutions to the prediction and seasonality problems on this page.
PDF
Video exercise 2: questions
The AR(2) forecasting and ARMA(1,1) moment problems.
PDF

Studying this for
a university module?

I tutor economics, econometrics, statistics and maths at university and postgraduate level, from OLS foundations through time series, VAR systems and unit-root testing. First 30–45 minute consultation is free.