6 Seasonality & Forecasting

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

6 Seasonality & Forecasting

6.1 Overview of Seasonality


Seasonality (dfn): Any cyclical or periodic fluctuation in a time-series that recurs or repeats
itself at the same phase of the cycle or period.

Examples:

• Toy sales at Christmas

• Ice cream sales in the summer

• Peruvian anchovy production

Seasonality has implications for temporal aggregation of the data.

Example:

• Toy Sales at Christmas


Data is to be collected . . .

Quarterly — Every 4th quarter


Monthly — Every 12th month
Weekly — Every 52n d week
Yearly — ???

6.2 Seasonality & The ARIMA Model


The basic thrust of the ARIMA perspective, with regard to seasonality, is to identify (and
model) the problem rather than assume that it either does or does not exist.

ARIMA models provide an improvement over past efforts to “deseasonalize” the time-series
through the use of dummy variables. The latter approach simply employs multiple regres-
sion with dummy variables to estimate the seasonal variance of each phase of the cycle.
This estimated variance is then subtracted from the time-series. This approach, however, is
inadequate (see McCleary & Hay, p.81)

6.2.1 Parallel Concepts

Seasonal Non-Stationarity (dfn): Trend or drift in steps rather than as “observation to ob-
servation steps.
Example:

(1 − B 12 )yt = θ0 or,

yt = yt−12 + θ0

Seasonal AR (dfn): Partial dependence on some steps back in the series.

(1 − φ12 B 12 )yt = at or,

yt = φ12 yt−12 + at

The (seasonal) autocorrelation could depend, to some extent, on corresponding observa-


tions from 2 preceding cycles, written as:

(1 − φ12 B 12 − φ24 B 24 )yt = at

Seasonal MA (dfn): Partial persistence from shocks back in the cycle.

yt = (1 − θ12 B 12 )at
= at − θ1 2at−12

It is also possible to combine seasonality with other components of a time-series:

ARIMA(p, d, q)(P, D, Q)s , where

s is the seasonality, so that;


s = 12 for monthly data
s = 4 for quarterly data
s = 52 for weekly data

Example:

(1, 0, 0)(1, 0, 0)12


(1 − θ1 B)(1 − θ12 B 12 )yt = at
(1 − θ1 B − θ12 B 12 + θ1 θ12 B 13 )yt = at
yt − θ1 yt−1 − θ12 yt−12 + θ1 θ12 yt−13 = at
θ1 yt−1 + θ12 yt−12 − θ1 θ12 yt−13 + at = yt
The approach can be extended to model a time-series that drifts or trends regularly & sea-
sonally, such as . . .

ARIMA(0, 1, 1)(0, 1, 1)12


Note that the order of differencing in practice does not matter because:

(1 − B)(1 − B 12 ) = (1 − B 12 )(1 − B) = (1 − B − B 12 + B 13 )

Therefore, you can difference regularly:

zt∗ = yt − yt−1

and then difference seasonally:

zt ∗ = zt − zt−12

or vice-versa, with the same result.

Or, the differencing can occur simultaneously:

zt∗ = (1 − B)(1 − B 12 )yt


= (1 − B − B 12 + B 13 )yt
= yt − yt−1 − yt−12 + yt−13

Finally,

• ARIMA(p, 0, 0)(P, 0, 0)s models can be written as an infinite series of exponentially


weighted past shocks.

• ARIMA(0, d, q)(0, D, Q)s can be written as an infinite series of exponentially weighted


past observations.

• Invertibility conditions

−1 < φ, φs < 1
−1 < θ, θs < 1

6.2.2 Identification

The same logic applies here, as before — know how the different models behave, in theory,
then just “match up . . . ”

Example: Seasonal Non-stationarity

Large and nearly equal values of the ACF at all seasonal lags.

ACF (s) ≈ ACF (2s) ≈ ACF (3s) ≈ · · · ≈ ACF (ks)

Seasonal differencing (0, D, 0)s will make the ACF stationary.


• ARIMA(0, 0, Q)s will have Q spikes at the Q seasonal lags of the ACF (with the rest
being zero).

The PACF will decay from seasonal lag to seasonal lag, with the rate of decay de-
termined by;
θs , θ2s , θ3s , · · · , θQs

• ARIMA(P, 0, 0)s has a decaying ACF, with the rate of decay determined by;
φs , φ2s , φ3s , · · · , φP s

The PACF has P spikes at the first P seasonal lags (with all other successive lags
expected to be zero).

McCleary & Hay contend that small order will work, if you can find it at all [Clear up
from M&H, pp. 87-9]

Example: Hog Production (see Pindyck & Rubinfeld, pp. 457-9, Figures 15.14 & 15.15)

6.3 Forecasting
6.3.1 Background

Somewhat surprisingly, there appears to be a presumption that forecasting is not an impor-


tant topic for most of the social sciences (including political science) — the notable exception
being Economics.

However, an entire cottage industry has sprung up around the issue of forecasting. A more
interesting question is, why has there been so little use of ARIMA methods in the area of
forecasting?

6.3.2 Definitions

Forecasting: The likelihood of future events given current & past information.

Point Forecast: Prediction of a single number.

Interval Forecast: Prediction of the interval in which a number will lie.

Ex Post Forecast: Knowing all values of the exogenous and endogenous variables with cer-
tainty, so you can evaluate accuracy exactly.

Ex Ante Forecast: A prediction beyond the estimated period using explanatory variables
with and without certainty.
T1 T2 T 3 (present)

time (t)
 -  -  -
Estimation Ex Post Ex Ante
Period Forecast Period Forecast Period

Unconditional Forecast: All explanatory variables are known with certainty.

Conditional Forecast: Forecasts themselves are used to predict values. Values for one or
more explanatory variables are unknown, so that forecasts must be used to produces the
forecast on the dependent variable.

Example:

If monthly sales, s(t), are linearly related to 2 variables, X1 & X2 , but with lags of 3 &
4 months respectively then,

s(t) = a0 + a1 X1 (t − 3) + a2 X2 (t − 4) + ²t

If this equation is estimated, the results can be used to produce an unconditional forecast of
s(t) 1,2, and 3 months into the future.

To get the 3 month forecast of s(t), we would use the current value of X1 & last month’s
value of X2 , both of which are known.

6.3.3 Criteria for Determining Optimum Forecast

Mean Square Forecast Error (MFSE)


v
n u
1 uX
M F SE = t (yt+i − yti )2 (1)
n i=1

where, yti is the forecast from time t, out i steps.

6.3.4 ARIMA Forecasting

Pindyck & Rubin present a general development for the general model:

φ(B)∆d yt = θ(B)²t (2)


McCleary & Hay (Chapter 4) have a much simpler treatment;

Unconditional Forecast for AR(1)

(1 − φ1 B)yt = at (3)
−1
yt = (1 − φ1 B) at

Recall,

(1 − B)−1 = 1 + B + B 2 + · · · + B k + · · ·

So that,

yt = (1 + φ1 B + φ21 B 2 + · · · + φn1 B n + · · ·)at


= at + φ1 at−1 + φ21 at−2 + · · · + φn1 at−n + · · ·

Taking expectations yields;

E[yt ] = E[at ] + φ1 E[at−1 ] + φ21 E[at−2 ] + · · · + φn1 E[at−n ] + · · ·


= 0 + φ1 · 0 + φ21 · 0 + · · · + φn1 · 0 + · · ·
= 0

Since yt = yt − θ0 ,
⇒ yt = yt + θ0

Then,
E[yt ] = E[yt ] + θ0
= 0 + θ0
= θ0 (Mean)

“Extrapolating” yields:

yt (1) = E[yt+1 ] = 0
..
.
yt (n) = E[yt+n ] = 0

This implies that an unconditional forecast will always have the same value . . . the series
mean.

As l becomes large, the mean is the best prediction. This is not surprising since the se-
ries is stationary.
Conditional Forecast for AR(1) — will depend on previous forecasts

Consider a one-step ahead expression for an AR(1) model:


yt+1 = φ1 yt + at+1 (4)
(1 − φ1 B)yt+1 = at+1
yt+1 = (1 − φ1 B)−1 at+1
= (1 + φ1 B + φ21 B 2 + · · ·)at+1
= at+1 + φ1 at + φ21 at−1 + · · ·
Taking expectations yields:
E[yt+1 ] = E[at+1 ] + φ1 at + φ21 at−1 + · · · + φn1 at−n
= E[at+1 ] + φ1 yt
= 0 + φ1 yt
= φ1 yt
Thus, conditional forecasts are given by:
yt (1) = E[at+1 ] + φ1 yt = φ1 yt
yt (2) = φ21 yt
..
.
yt (n) = φn1 yt
To construct confidence intervals it is necessary to write the model in terms of an infinite
sum of shocks (i.e. in terms of φ weights).
yt = at + φ1 at−1 + φ2 at−2 + · · · + φk at−k + · · · (5)
Example: ARIMA Model with 4th Order Seasonal Lag
(1 − φ1 B)(1 − φ4 B 4 )yt = at
yt = (1 − φ1 B)−1 (1 − φ4 B 4 )−1 at
= (1 + φ1 B + φ21 B 2 + · · ·)(1 + φ4 B 4 + φ24 B 8 + · · ·)at
= at + φ1 at−1 + · · · + (φ41 + φ4 )at−4 + (φ51 + φ1 φ4 )at−5 + · · ·
The φ’s can be considered weights (ψ). Then interval forecasts can be calculated for these
weights.

For yt+1 we have:


yt+1 = at+1 + ψ1 at + ψ2 at−1 + · · · + ψk at−k+1 + · · · (6)
Taking expectations yields:
E[yt+1 ] = E[at+1 ] + ψ1 at + ψ2 at−1 + · · · + ψk at−k+1 + · · ·
= 0 + ψ1 at + ψ2 at−1 + · · · + ψk at−k+1 + · · ·
= ψ1 at + ψ2 at−1 + · · · + ψk at−k+1 + · · ·
E[at+1 ] = 0 is employed here because the value of the future random shock (at+1 ) is unknown.

Assuming that all the ψ weights & past shocks are known, we can use the conditional expectation
as a forecast of yt+1 .

Therefore, the Error in Forecasting is given by:

et+1 = yt+1 − E[yt+1 ] (7)


= yt+1 − yt (1)
= at+1

The Forecast Variance is given by:

V ar(1) = E[e2t+1 ] = σa2 (8)

Which is the variance of the white noise process.

Therefore, the interval forecast of yt+1 is given by:


q q
−1.96 V ar(1) < yt (1) < 1.96 V ar(1) (9)

Similarly, it can be shown that:

V ar(2) = (1 + ψ12 )σa2

If φ1 6= 0, V ar(2) will have a larger error component, (1 + ψ12 ), than V ar(1).

So, q q
−1.96 V ar(2) < yt (2) < 1.96 V ar(2)
Moreover,
V ar(n) = (1 + ψ12 + ψ22 + · · · + ψn−1
2
)σa2
V ar(n) will be even larger if uncertainty exists — resulting from a poor fit of coefficient
estimates.

6.3.5 Forecast Profiles

McCleary & Hay and Pindyck & Rubinfeld both develop “profiles” for difficult ARIMA
models. They show that the nature of the point forecasts and confidence intervals are not
all the same. They vary with respect to:

• Conditional forecasts

• Interval forecasts due to different ψ weights


1. ARIMA(0,0,0) — White Noise (which is: yt = at )

There are uniformly zero weights:


ψ1 = ψ2 = ψ3 = · · · = ψk = 0

The point forecasts are:

yt (1) = E[at+1 ] = 0
yt (2) = E[at+2 ] = 0
..
.
yt (n) = E[at+n ] = 0

Because the ψ weights are zero, the variance around these point estimate forecasts
is constant for all lead times. Therefore,

V ar(1) = σa2
V ar(2) = σa2
..
.
V ar(n) = σa2

For this profile, the conditional and unconditional expectations are identical. The
best forecast is the process mean. Moreover, the history of the process results in no
improvement to the prediction.

2. ARIMA(0,1,0) — Random Walk

McCleary & Hay, Figure 4.2(a) (p.216)

After only two or three steps into the future the confidence intervals become so large
as to make the interval forecasts meaningless.

3. ARIMA(2,0,0) — Autoregressive

McCleary & Hay, Figure 4.2(b) (p.217)

As the lead time increases, the forecasts regress to the process mean and confidence
intervals at each point. Forecasts tend to increase with increases in lead time (with
the confidence intervals increasing at a rate determined by φ1 ).

4. ARIMA(0,0,1) — Moving Average

McCleary & Hay, Figure 4.2(c) (p.219)


Pindyck & Rubinfeld, Figure 18.2 (p.524)

For lead times > 1, yt (n) equals the process mean; V ar(n) remains constant.
5. ARIMA(1,1,0) — Mixed (Autoregressive-Moving Average)

Pindyck & Rubinfeld, Figure 18.5 & 18.6 (p.529)

Examples: (Pindyck & Rubinfeld)

• Interest Rates
• Hog Production

6.4 Summary & Discussion


• McCleary & Hay suggests using these models to forecast 2-3 periods ahead, at most,
because of their potential unreliability. However, they are quick to point out that there
is nothing you can do in a social system if this is what you have and there is a need
for longer forecasts.

• McCleary & Hay see more value in forecasting as a diagnostic tool;

– Not many people appear to use forecasting models in this manner.


– There are some interesting implications for this approach in quality control.

• Both McCleary & Hay and Pindyck & Rubinfeld stress the short-run value of ARIMA
models for forecasting purposes.

This is because M A(q) processes have a memory of only q periods. Actual data can
be used only if l < q. Only the most recent observations have much impact on the
AR forecast since exponential weights and invertibility will wipe out the effect of long
memory (seasonality is something of an exception here).

Also, for most ARIMA models the last observation often has the most impact. If
the last observation is an extreme value its presence can be problematic.

Applications:

Political Forecasting Literature (e.g. Peterson)

Next Week . . . Intervention Analysis

You might also like