Case S_ST: Stochastic Trend With Seasonality

  1. Modeling:

Modeling for a variable subject to both trend and seasonality takes two stages. First stage is to reduce the data to a stationary series using differencing.

Let the variable of interest have both trend and seasonality. Following the stochastic trend formulation, we would remove the trend by taking the first difference:

Next, for removing seasonality, we apply the seasonal difference

The two successive differences would, usually, reduce the data with trend and seasonality to a stationary data:

It is instructive to write the forecasting form of the above model as follows:

After the data has become stationary, there are several ways to model the series using ARMA. One example is to use MA(1) and a multiplicative seasonal MA(s). This modeling is commonly referred to as the airline model, after the work of Box and Jenkins for forecasting the international airline passengers.

where is a WN N(0, ). We can also incorporate AR to this model:

In the following we will apply the modeling described above for the toy sales data analyzed earlier.

  1. Application:

TOYSALES: Retail Monthly Sales: Hobby, Toy and Game Stores (NSA, Mil.$)

Range: 1977:01 to 1998:10; n= 262

Frequency: Monthly

(1)Timeplot:
yts= log(toysales)
freeze toysales.line
freeze yts.line

TOYSALES YTS = log (TOYSALES)

(2) De-trend and de-seasonalize Y = (1 - L)(1 - L12)YTS

smpl @all

sample s1 @first 1996:09

sample s2 1996:10 @last
smpl s1

'De-trend and de-seasonalize data

series ys=yts-yts(-1)

series y=ys-ys(-12)

freeze ys.line

freeze y.line


Sample: 1977:01 1996:10
Included observations: 225
Autocorrelation / Partial Correlation / AC / PAC / Q-Stat / Prob
***|. | / ***|. | / 1 / -0.389 / -0.389 / 34.504 / 0.000
.|* | / *|. | / 2 / 0.069 / -0.097 / 35.603 / 0.000
.|. | / *|. | / 3 / -0.053 / -0.073 / 36.253 / 0.000
.|. | / *|. | / 4 / -0.044 / -0.104 / 36.704 / 0.000
.|. | / *|. | / 5 / 0.002 / -0.069 / 36.705 / 0.000
.|. | / .|. | / 6 / -0.003 / -0.040 / 36.707 / 0.000
.|. | / .|. | / 7 / -0.014 / -0.046 / 36.754 / 0.000
.|. | / .|. | / 8 / 0.062 / 0.036 / 37.654 / 0.000
.|* | / .|* | / 9 / 0.084 / 0.145 / 39.332 / 0.000
*|. | / .|. | / 10 / -0.087 / 0.007 / 41.147 / 0.000
.|* | / .|* | / 11 / 0.090 / 0.084 / 43.098 / 0.000
**|. | / **|. | / 12 / -0.294 / -0.259 / 63.853 / 0.000
Sample: 1977:01 1996:09
Included observations: 236
Autocorrelation / Partial Correlation / AC / PAC / Q-Stat / Prob
**|. | / **|. | / 1 / -0.211 / -0.211 / 10.633 / 0.001
**|. | / ***|. | / 2 / -0.278 / -0.337 / 29.170 / 0.000
.|. | / **|. | / 3 / -0.055 / -0.241 / 29.891 / 0.000
.|. | / *|. | / 4 / 0.059 / -0.156 / 30.736 / 0.000
.|. | / *|. | / 5 / -0.010 / -0.164 / 30.761 / 0.000
.|. | / *|. | / 6 / 0.001 / -0.118 / 30.761 / 0.000
.|. | / *|. | / 7 / -0.015 / -0.127 / 30.813 / 0.000
.|. | / .|. | / 8 / 0.059 / -0.030 / 31.680 / 0.000
.|. | / *|. | / 9 / -0.048 / -0.095 / 32.253 / 0.000
**|. | / ***|. | / 10 / -0.270 / -0.420 / 50.411 / 0.000
**|. | / *******|. | / 11 / -0.194 / -0.836 / 59.789 / 0.000
.|*******| / .|***** | / 12 / 0.927 / 0.598 / 275.25 / 0.000

(3) Seasonal ARMA Modeling of Yt

'Fit an Airline Model
ls y c ma(1) sma(12)

Dependent Variable: Y
Method: Least Squares
Sample (adjusted): 1978:02 1996:09
Included observations: 224 after adjustments
Convergence achieved after 12 iterations
Backcast: 1975:12 1976:12
Variable / Coefficient / Std. Error / t-Statistic / Prob.
C / -0.000596 / 0.000541 / -1.102802 / 0.2713
MA(1) / -0.377704 / 0.057700 / -6.546014 / 0.0000
SMA(12) / -0.907654 / 0.025482 / -35.61901 / 0.0000
R-squared / 0.444438 / Mean dependent var / -0.001498
Adjusted R-squared / 0.439411 / S.D. dependent var / 0.085792
S.E. of regression / 0.064234 / Akaike info criterion / -2.639252
Sum squared resid / 0.911860 / Schwarz criterion / -2.593560
Log likelihood / 298.5962 / F-statistic / 88.39786
Durbin-Watson stat / 2.023755 / Prob(F-statistic) / 0.000000

The estimated model for Yt is:


=

where is WN N(0, = 0.06423).

(4) Incorporating seasonal AR

If the airline model does not produce a WN residual, we might incorporate a seasonal AR as follows:

Here is the Eviews procedure for fitting the model:
ls y c ar(1) sar(12) ma(1) sma(12)

Dependent Variable: Y
Sample (adjusted): 1979:02 1996:09
Included observations: 212 after adjustments
Convergence achieved after 9 iterations
Backcast: 1975:12 1976:12
Variable / Coefficient / Std. Error / t-Statistic / Prob.
C / -0.000517 / 0.000553 / -0.933826 / 0.3515
AR(1) / 0.128756 / 0.096708 / 1.331386 / 0.1845
AR(12) / 0.184587 / 0.067453 / 2.736549 / 0.0067
MA(1) / -0.559133 / 0.085994 / -6.502017 / 0.0000
SMA(12) / -0.920019 / 0.018319 / -50.22273 / 0.0000
R-squared / 0.469681 / Mean dependent var / -0.000451
Adjusted R-squared / 0.459433 / S.D. dependent var / 0.084245
S.E. of regression / 0.061939 / Akaike info criterion / -2.702017
Sum squared resid / 0.794154 / Schwarz criterion / -2.622853
Log likelihood / 291.4138 / F-statistic / 45.83271
Durbin-Watson stat / 1.967792 / Prob(F-statistic) / 0.000000

with t is WN N(0, =0.06194).

(5) Out-of-Sample Forecast


obs / YTS / YS / Y / RESID
1995:08 / 6.777647 / -0.002275 / 0.002420 / 0.032358
1995:09 / 6.771936 / -0.005711 / -0.005711 / 0.031996
1995:10 / 7.000334 / 0.228399 / 0.069888 / 0.032315
1995:11 / 7.604894 / 0.604560 / -0.007582 / 0.092726
1995:12 / 8.315077 / 0.710183 / 0.029084 / -0.021840
1996:01 / 6.598509 / -1.716568 / -0.082024 / -0.077496
1996:02 / 6.677083 / 0.078574 / 0.035721 / 0.049401
1996:03 / 6.944087 / 0.267004 / 0.077715 / 0.089534
1996:04 / 6.801283 / -0.142804 / -0.112103 / -0.096871
1996:05 / 6.857514 / 0.056231 / 0.309858 / 0.065914
1996:06 / 6.849066 / -0.008448 / -0.245776 / -0.062573
1996:07 / 6.873164 / 0.024098 / -0.008238 / -0.014036
1996:08 / 6.869014 / -0.004149 / -0.001874 / 0.005321
1996:09 / 6.880384 / 0.011370 / 0.017081 / 0.037635

(a) For h=1

Pred_YTS(1996:10) = YTS(1996:09)+ YTS(1995:10) - YTS(1995:09) + Pred_u(1996:10)

= 6.880384 + (7.000334- 6.771936 = 0.228399) + Pred_u (1996:10)

= 7.0762

Pred_u (1996:10) =

= 0 – 0.3777(0.037635) – 0.9077 (0.032315) + 0.3428(0.031996)

= -0.0325743

(b)For h=1, …, 24

obs / YTS / F_YTS
1996:10 / 7.042286 / 7.075610
1996:11 / 7.607381 / 7.606489
1996:12 / 8.202482 / 8.367687
1997:01 / 6.744059 / 6.713375
1997:02 / 6.770789 / 6.719946
1997:03 / 6.883463 / 6.922023
1997:04 / 6.916715 / 6.897243
1997:05 / 6.881411 / 6.859841
1997:06 / 6.911747 / 6.930188
1997:07 / 6.937314 / 6.944978
1997:08 / 6.920672 / 6.930590
1997:09 / 6.901737 / 6.909028
1997:10 / 7.075809 / 7.116560
1997:11 / 7.595387 / 7.646842
1997:12 / 8.232174 / 8.407444
1998:01 / 6.848005 / 6.752536
1998:02 / 6.883463 / 6.758511
1998:03 / 7.045777 / 6.959992
1998:04 / 6.993015 / 6.934614
1998:05 / 6.979145 / 6.896616
1998:06 / 7.018402 / 6.966367
1998:07 / 7.002156 / 6.980560
1998:08 / 7.013915 / 6.965576
1998:09 / 7.008505 / 6.943418
1998:10 / 7.142037 / 7.150353

Forecast Performance


1