You are on page 1of 21

Building a Seasonal ARIMA Model

Firstly, download the excel file called " HK_exports & imports_monthly data "
from the "Sample Data" of Econ3600 homepage.
Second, open EVIEWS program in this way: click "File", "New", "Workfile"
commands, then in the "Workfile Range", choose "Monthly" and type 1980.01 for
the "Start observation" and 2000.07 for "End observation" in the dialogue
box. Then, we will get a Workfile, and import data from the excel file to generate the
following result: (remember "B9" for upper left data cell)

Double click "export" to check the import data is consistent with Excel file, and
choose "View", "Line" to get a general idea about the time series whether it is level
stationary or no. Also, choose "View", "Correlogram" to identify tentative pattern
and model components (i.e. ARIMA p, d, q) The resulting graphs are:

From the line graph, you can see that the time series is likely to have upward trend
and seasonal cycles, which implies level non-stationary. Also, in the graph of
correlogram, the ACFs is suffered from linear decline and there are significant
seasonal spikes of PACFs at lags 1 and 13, that is a 12-period seasonality. Also,
checking the first-difference of the lnexport, it shows as:

This graph shows that the firs-difference series has a problem of variance nonstationary. Therefore, the series needs to take the logarithm transformation to become
variance stationary. In order to generate a logarithm transformation of the original
series, i.e., Log (export), simply click "GENR" and type "lnexport = Log(export)".
The line graph of LNEXPORT and its correlogram are shown as follows:

Also, the time plot graph of the first-difference of "lnexport" is:

As shown above, the logarithm transformation still cannot solve the problem of
variance non-stationary. And from the graph of correlogram of "lnexport", we still
find a significant seasonal spike of PACF appears at period 13, it implies the series
may be needed to take the 12-period seasonal difference to achieve the stationary.
To examine whether the seasonal- difference can generate stationarity or not, click
"GENR", type "d12lexport = lexport - lexport(-12)". Then, get a new created
series--"d12lexport" in the "Workfile", and use it to plot a line graph to see whether
it becomes stationary or not. The result is:

After taking 12-period seasonal-difference of "lnexport", the series "d12lexport"


becomes stationary. It implies that the series of lnexport is an I(1)12.
Now, the 12-period seasonal-difference of lnexport is "d12lexport", it seems free
from variance non-stationary problem. Then we can further search the best ARIMA
model.
Restart from the previous identification procedures. From the ACFs and PACFs, we
may first guess there are AR(1), AR(2) and AR(3) because there are three significant
spikes at PACF(1), PACF(2) and PACF(3), and MA(1), MA(2) and MA(3) because
there are couple significant spikes at ACF(1), ACF(2), and ACF(3), and after the four
lags, the ACFs are slowly declined.
So, we can try the "ARIMA(3, 1, 3)12 1, 1" and specify the ARIMA equation as:

Residual diagnostics:

As you can see that the 12th-order difference series has not achieved white noise
because there are still has significant spikes for both ACFs and PACFs at lags 12 and
25, respectively. Then, by guessing to add AR(12) or MA(12) seems suitable. Which
one is the best? It will need to compare their results of BIC, SEE and Adjusted R2.
First, we try to add AR(12) to the previous regression equation, the result is:

Residual diagnostic:

This result is not improved than before in terms of BIC, SEE and Adjusted R 2, also
there is still a significant spike at lags 12th of ACFs and PACFs, which means the
residual of this model has not achieve white noise. (You are supposed to have ability
to check it yourself)
Second, we can try another possibility whish is to add MA(12) to the previous
specification, the result is:

Residual diagnostic:

This result seems better than the previous one and the residuals also achieve white
noise, however, the coefficients of MA(1) and MA(3) are not significant and the AR
roots is also 1.00 which is not satisfied the invertibility condition. Therefore, we may
try to drop the MA(1) and MA(3) in the model as follow:
Residual diagnostic:

The Q-test of residuals


seems no problem,
however, the inverted
root of AR not satisfied,
therefore, other possible
model should be tried in
order to obtain the better
result.
Alternative, we can try
to start from the firstdifference of lnexport.
The correlograms are
The ACF and PACF are
significant at 12th lag, it
indicates the 12-period
seasonal effect appeared,
therefore, in order to
generate the stationary
process, we may try to
take the 12-period
difference of the
dlnexport to remove the
12-period seasonal effect. Click "GENR" and type "d12dlexport = dlexport
- dlexport(-12)". The correlograms of the d12dlexport are

Thus, there is one significant spike of ACFs and two significant spikes of PACFs, we
may suspect the d12dlexport has AR(2) and MA(1), then we can try to estimate the
ARIMA as
Residual diagnostic:

From the Q-test, we still


observe the significant of
ACF and PACF at lag
12th. In order to remove
the 12-period effect, we
can try another ARIMA
model as:
Since the t-statistics of
AR(12) and MA(1) is
insignificant, so they may
be dropped and re-try
another ARIMA model
as:

and the Q-test is

or we can try

and the Q-test is

We can summary the result for several trials and errors as in the following table:
Q-test
(No significant
Invertibility
ACFs or
PACFs)

BIC

Adjusted R2

SEE

12

-2.361

0.681

0.0700

OK

12

-2.485

0.723

0.0653

OK

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

-2.625

0.776

0.0596

OK

(0,0,0)1,1,(3,1,3) (1,0,1)

12

-2.455

0.730

0.0655

OK

(0,0,0)1,1,(3,1,0) (0,0,1)

12

-2.687

0.765

0.0601

OK

ARIMA model
(0,0,0)1,1,(2,1,3)
(0,0,0)1,1,(3,1,3)
12

12

12

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

-2.584

0.735

0.0639

OK

(0,0,0)1,1,(1,1,3)

12

-2.354

0.6716

0.0719

OK

12

-2.710

0.573

0.0600

OK

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

-2.699

0.569

0.0600

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

-2.682

0.569

0.0603

12

12

(0,1,0) 0,1,(2,1,0) (0,0,1)

From several trial models, the ARIMA(0,1,0)1,1,(2,1,0) (0,0,1)12 would be selected as


the best one as it satisfied the invertibility condition and Q-test and has a relatively
smaller BIC and larger adjusted R2.
12

The selected best model can be expressed as

The End

You might also like