0% found this document useful (0 votes)
102 views43 pages

Lesson 15

This document provides examples of building ARMA models. It analyzes three time series: 1) A simulated stationary time series that is well modeled by an MA(2) process. 2) The exchange rate of lira to US dollars, which becomes stationary after first differences of logarithms. It is modeled by an AR(1) process. 3) US GNP deflator data, which requires second differences to be stationary. It is best modeled by an MA(1) process, although an ARMA(1,2) process also fits reasonably well according to information criteria. The examples illustrate the steps of identifying appropriate AR and MA orders through autocorrelations and estimating the resulting ARMA models.

Uploaded by

Syaiful Alam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
102 views43 pages

Lesson 15

This document provides examples of building ARMA models. It analyzes three time series: 1) A simulated stationary time series that is well modeled by an MA(2) process. 2) The exchange rate of lira to US dollars, which becomes stationary after first differences of logarithms. It is modeled by an AR(1) process. 3) US GNP deflator data, which requires second differences to be stationary. It is best modeled by an MA(1) process, although an ARMA(1,2) process also fits reasonably well according to information criteria. The examples illustrate the steps of identifying appropriate AR and MA orders through autocorrelations and estimating the resulting ARMA models.

Uploaded by

Syaiful Alam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

Lesson 15: Building ARMA models.

Examples

Umberto Triacca
Dipartimento di Ingegneria e Scienze dell’Informazione e Matematica
Università dell’Aquila,
[email protected]

Umberto Triacca Lesson 15: Building ARMA models. Examples


Examples

In this lesson, in order to illustrate the time series modelling


methodology we have presented so far, we analyze some time
series.

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 1
By using a computer program we have generated a time series
x.The graph of the series is presented in the following figure

Figure : A simulated time series

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 1

The objective is to build an ARMA model this time series.


The first step in developing a model is to determine if the
series is stationary.

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 1
Our time series seems the realization of a stationary process
with zero mean, thus we can look at sample autocorrelation
and partial autocorrelation function to establish the orders p
and q of the ARMA model.

Figure : Sample autocorrelation and sample partial autocorrelation


Umberto Triacca Lesson 15: Building ARMA models. Examples
Example 1

Since the SACF cuts off after lag 2 and the SPCAF follows a
damped cycle,

an MA(2) model

xt = ut + θ1 ut−1 + θ2 ut−2 , ut ∼ WN(0, σ 2 )

seems appropriate for the sample data.

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 1

Table reports the result of the ML estimation.

300 observations, Dependent Variable x

Variabile Coefficient St. error t statistic p-value


θ1 1,68559 0,0456203 36,9481 0,0000
θ2 0,883683 0,0492842 17,9303 0,0000

Variance of innovations 0.941107

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 1
Now, we consider the graph of the residuals

Figure : Residuals from MA(2) model

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 1

Figure : SACF and SPACF of residuals from MA(2) model

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 1

By analysing the SACF and SPACF of residuals presented in


figure, we note that any term isn’t significant and
Q25 = 16.4450 do not indicate any autocorrelation in the
residuals. They can be assimilate to a white noise process.

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 1

We conclude that the MA(2) model defined by

xt = ut + 1.686ut−1 + 0.884ut−2 , ut ∼ WN(0, 0.94)

appear to fit the data very well.

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 2

Consider the montly series of the foreign exchange rate Lira


per US Dollar from Jannuary 1973 until October 1989 (202
observations).

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 2
It can be observed that the series displays a nonstationary
pattern with an upward trending behavior.

Figure : Foreign exchange rate Lira per U.S. $ from Jannuary 19t3
until October 1989

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 2
The first difference of the series seems to have a constant
mean, although inspection of the graph (see Figure ) suggests
thye variance is an increasing function of time.

Figure : First difference of the foreign exchange rate Lira per US


dollar
Umberto Triacca Lesson 15: Building ARMA models. Examples
Example 2
As we can see in figure, the first difference of the logarithm is
the most likely candidate to be covariance stationary.

Figure : First difference of the logarithm of the foreign exchange


rate Lira per US Dollar.

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 2
Now, we examine the autocorrelation and partial
autocorrelation functions of the logarithmic change in the
foreign exchange rate Lira per US Dollar.

Figure : SACF and SPACF for the logarithmic change in the


foreign exchange rate Lira per US Dollar.
Umberto Triacca Lesson 15: Building ARMA models. Examples
Example 2

An AR(1) model is fitted by using the exact maximum


likelihood estimation. The parameter estimates are
summarized in the following table

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 2

Sample 1973:02–1989:10. Dependent Variable: First difference


of log of the foreign exchange rate Lira per US Dollar

Coefficient Std. error t statistic p-value Variance innov.


0,381412 0,0652368 5,8466 0,0000 0,000543700

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 2

The AR(1) model fit indicates a highly significant parameter


φ1 with estimate φ̂1 = 0, 381.

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 2
The Q statistic (Q20 = 16, 5014) and the graphs of the SACF
and SPACF of residuals (see Figure )indicate that the
autocorrelations of the residuals are not statistically significant.

Figure : SACF and SACFP of residuals from the model AR(1)

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 2

Thus we conclude that the AR(1) model

xt = 0.381xt−1 + ut

where ut ∼ WN(0, 0.00054) and xt is the first difference of log


of the foreign exchange rate Lira per US Dollar, fits the data
well.

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 3

We consider the log of GNP deflator series in USA observed


on the period 1955:1- 2000:4. The objective is to build an
ARMA model for this time series.

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 3
The time serie graph is shown in figure. We note that the
mean is changing over time. The variable exhibts a strong
trend. Thus the series cannot be considered a realization of a
stationary process.

Figure : Log of GNP deflator series in USA observed on the period


Umberto Triacca Lesson 15: Building ARMA models. Examples
Example 3
In order to make stationary the series, we consider the first
differeces.

Figure : Graphical plot of the first difference of log of GNP


deflator series

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 3
Visual inspection gives again strong indication of
nonstationarity. Thus we consider the second difference.

Figure : Graphical plot of the second difference of log of GNP


deflator series

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 3
The second difference seems the realization of a stationary
process with zero mean, thus we can look at sample
autocorrelation and partial autocorrelation function of the
second difference, to establish the orders p and q of the ARMA
model. Figure shows the graphs of SACFs and SPACFs.

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 3

Additional information can be obtained by inspecting the


outcomes of the AIC and BIC criteria.

Table : The information criteria: AIC and BIC

Orders p,q of ARMA model


2,2 2,1 1,2 1,1 1,0 0,1
AIC -1614.4 -1611.3 -1616.0 -1613.3 -1609.7 -1614.7
BIC -1595.2 -1595.2 -1599.9 -1600.4 -1600.1 -1605.1

From AIC values it is concluded that the ARMA(1,2) model is


most suitable for our time series. From BIC values, however,
the MA(1) is judged to be better suited.

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 3

The fact that AIC and BIC provided different indications about
the best fitting models is not surprising because BIC penalizes
larger models more than AIC.

Thus BIC tends to produce more parsimonious best-fitting


models than AIC.

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 3

Since computing time is inexpensive we can estimate both


models. Table 1 shows the results of fitting an ARMA(1,2) for
the second difference of log of GNP deflator.

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 3

Sample 1955:1–2000:4. Dependent Variable: second difference


of log of GNP deflator

Variabile Coefficient Std. error t statistic p-value


const 8,97976e-06 0,000122030 0,0736 0,9413
φ1 -0,923081 0,0694282 -13,2955 0,0000
θ1 0,438205 0,0999095 4,3860 0,0000
θ2 -0,349970 0,0785200 -4,4571 0,0000

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 3
Now, we can look at sample autocorrelation and partial
autocorrelation functions of residuals of the model ARMA(1,2)
to establish if this ARMA model is a good model for the data.

Figure : SACF and SACFP of residuals from the model ARMA(1,2)

These graphs are very similar


Umberto Triacca to the
Lessoncorrelograms of aExamples
15: Building ARMA models. white
Example 3

The QK -statistic computed with K = 20 lags is equal to


Q20 = 16.2932, whereas the critical value is
χ21−0.05,17 = 27.5871.

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 3

These results indicate that the ARMA(1,2) model

(1 − 0.923L)xt = (1 + 0.438L − 0.350L2 )ut ut ∼ WN(0, 0.85)

with xt = (1 − L)2 log(yt ) where yt is the original series, fits


the data well.

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 3

Now, we consider the MA(1) model.

Sample 1955:1–2000:4. Dependent Variable: second difference


of log of GNP deflator

Variabile Coefficient Std. error t statistic p-value


const 8,79573e-06 0,000116929 0,0752 0,9400
θ1 -0,466072 0,0615454 -7,5728 0,0000

Umberto Triacca Lesson 15: Building ARMA models. Examples


The correlograms and the Box-Pierce statistics
(Q20 = 21.6819) indicate that the residuals behave as white
noise processes.

Figure : SACF and SACFP of residuals from the model MA(1)

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 3

Thus we conclude that also the model

xt = (1 − 0.466L)ut ut ∼ WN(0, 0.89),

fits the data well.

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 3

Let us look at the forecasting performace of the two models.


In particular, we forecast the future values of our time series,
log(yt ), from 2001:1 to 2001:4.

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 3

First, we consider the model

(1 − 0.923L)xt = (1 + 0.438L − 0.350L2 )ut ut ∼ WN(0, 0.85)

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 3

The 1-step, 2-step, 3-step and 4-step forecasts are presented


in the following table.

Table : ARMA(1,2) forecasts

Step ahead Actual Forecast Std. error


2001:1 4,499576 4,498700 0,002913
2001:2 4,506344 4,504065 0,005289
2001:3 4,509474 4,509945 0,007403
2001:4 4,512517 4,515367 0,009934

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 3

Table presents the forecast obtained by using the MA(1) model

xt = (1 − 0.466L)ut ut ∼ WN(0, 0.89),

Table : MA(1) forecasts

Step ahead Actual Forecast Std. error


2001:1 4,499576 4,498286 0,002956
2001:2 4,506344 4,503785 0,005413
2001:3 4,509474 4,509293 0,008166
2001:4 4,512517 4,514810 0,011218

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 3

Given these results we may conclude that the performance of


two models is very similar. Which model should be prefered?

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 3

It is usual to choose a parsimonious model, that is a model


that describes all of the features of the data of interest using
as few parameters as possible.

Umberto Triacca Lesson 15: Building ARMA models. Examples


Example 3

Thus we choose the MA(1) model

xt = (1 − 0.466L)ut ut ∼ WN(0, 0.89),

Umberto Triacca Lesson 15: Building ARMA models. Examples

You might also like