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

ECONOMETRICS II

TUTORIAL V
The 5th tutorial deals with autocorrelation and partial autocorrela-
tion functions (ACF and PACF ) and their usefulness in detecting the
(stationary) stochastic processes generating the data. We will also deal
with model selection and forecasting issues.

1 ACF and PACF


Definition of autocorrelation function:
γk COV (yt , yt−k )
ρk = CORR(yt , yt−k ) = = (1)
γ0 V AR(yt )


Definition of partial autocorrelation function ρPk : correlation measure
between yt and yt−k after having eliminated the effect of all intermediate
lags yt−1 , yt−2 , ..., yt−k+1 .

You can estimate both functions in EViews through the command:

View...
Correlogram

from the series menu, specifying in the dialog window whether one wants
to analyse the original series or its difference and the maximum number
of lags for ACF, PACF, and Ljung-Box test computation. Notice also
that the dashed bands correspond to
2 1
± √ = ±2 √ = ±2 × s.e.(ρbk ) (2)
T T
Therefore, they provide a test at the α ' 5% level whether each autocor-
relation parameter ρk equals 0 if one also supposes that all the previous
autocorrelation parameters up to lag k − 1 are equal to 0.

Of course, the shape of the ACF and PACF depends on the specific
stochastic process. Let

yt = θ1 yt−1 + θ2 yt−2 + ... + θp yt−p + εt (3)

be a p − th order autoregressive process (AR(p)) and

yt = α1 εt−1 + α2 εt−2 + ... + αq εt−q + εt (4)

1
a q − th order moving average process (M A(q)).
The pattern of ACF and PACF can give some information on the
type of process:

i. For AR(p) processes: the ACF decays, while PACF is zero for lags
t > p.

ii. For M A(q) processes: the ACF is zero for lags t > q, while PACF
decays.

iii. For ARM A(p, q): the ACF decays from lag q, the PACF decays
from lag p.

iv. For White Noise: ACF and PACF are all zero.

v. For Random Walk: ACF all equal to 1, no decay.

Then:

ACF PACF
White noise All ρk = 0 All ρP
k = 0
k P
AR(1), θ1 > 0 direct exponential decady: ρk = θ 1 ρ1 = θ1 , ρP
k = 0 ∀ k > 1
k P
AR(1), θ1 < 0 oscillating decay: ρk = θ 1 ρ1 = θ1 , ρP
k = 0 ∀ k > 1
P
AR(2) (real roots) direct decay ρ k 6= 0 if k ≤ 2; ρP
k = 0 if k > 2
P
AR(2) (complex roots) wavelike decay ρ k 6= 0 if k ≤ 2; ρP
k = 0 if k > 2
P
AR(p) decay towards 0 ρ k 6= 0 if k ≤ p; ρP
k = 0 if k > p

M A(1), α1 > 0 ρ1 > 0; ρk = 0 if k > 1 oscillating decay, ρP


1 > 0

M A(1), α1 < 0 ρ1 < 0; ρk = 0 if k > 1 decay, ρP


1 < 0

M A(q) ρk 6= 0 if k ≤ q; ρk = 0 if k > q decay


ARM A(1, 1), θ1 > 0 exponential decay beginning at lag 1 oscillating decay beginning at lag 1
ARM A(1, 1), θ1 < 0 oscillating decay beginning at lag 1 exponential decay beginning at lag 1
ARM A(p, q) decay (either direct or oscillatory) beginning at lag q decay beginning at lag p
P
NB: ρ1 = ρ 1

Examples
For AR processes it is important to verify they are stationary, i.e.
they have a constant mean and variance.
A way for verifying stationarity is to find the solutions of the charac-
teristic equation:

a. For a simple AR(1) process: yt = ρyt−1 + t

b. Put all y’s on the left: yt − ρyt−1 = t

c. Filter by lag operator: a(L)yt = L0 yt − ρL1 yt

2
d. Take only the equation in L: a(L) = L0 − ρL1 (note L0 = 1)

e. Substitute L with z, and solve the characteristic equation in z:


1 − ρz = 0 → z = 1/ρ

f. If |1/ρ| > 1, the solution(s) to the characteristic equation is (are)


outside the unit circle and the process is stationary.

g. Alternatively we can write the polynomial in m. Starting from the


polynomial in L: a(L) = L0 − ρL1 , substitute L0 = m; L1 = 1
(in the case of an AR(2) process: a(L) = L0 − ρ1 L1 − ρ2 L2 , we
substitute L0 = m2 ; L1 = m; L2 = 1).

h. Solve the new characteristic equation in m: m − ρ = 0 → m = ρ

i. If |ρ| < 1, the solution(s) is (are) inside the unit circle and the
process is stationary.

Example 1. AR(1) process with first order autoregressive coef-


ficient θ1 = 0.7:
yt = 0.7yt−1 + εt
Is it stationary?
a(L)yt = yt − 0.7yt−1
a(L) = 1 − 0.7L
The solution to the equation a(z) = 0 is:

1
a(z) = 1 − 0.7z = 0 ⇔ z = >1
0.7

Alternative verification (polynomial in m):

m − 0.7 = 0 ⇔ m = |0.7| < 1

The ACF will then be equal to ρk = 0.7k with direct decay and the PACF
will be equal to ρP1 = 0.7, ρPk = 0 ∀ k > 1.

Example 2. AR(1) process with first order autoregressive coef-


ficient θ1 = −0.7:
yt = −0.7yt−1 + εt
Is it stationary?
a(L)yt = yt + 0.7yt−1
a(L) = 1 + 0.7L

3
The solution to the equation a(z) = 0 is:
1
a(z) = 1 + 0.7z = 0 ⇔ z = − >1
0.7
Alternative verification (polynomial in m):
m + 0.7 = 0 ⇔ m = |−0.7| < 1
The ACF will then be equal to ρk = −0.7k with oscillating decay and the
PACF will be equal to ρP1 = −0.7, ρPk = 0 ∀ k > 1.
Example 3. AR(2) process with first and second order autore-
gressive coefficients θ1 = 0.7 and θ2 = 0.2:

yt = 0.7yt−1 + 0.2yt−2 + εt
Is it stationary?
a(L)yt = yt − 0.7yt−1 − 0.2yt−2
a(L) = 1 − 0.7L − 0.2L2
The solutions to the equation a(z) = 0 are:
q
2
− (−0.7) ± (−0.7)2 − 4(−0.2)1
a(z) = 1 − 0.7z − 0.2z = 0 ⇔ z1,2 = =
2(−0.2)

0.7 ± 1.29 0.7 ± 1.136
= =
−0.4 −0.4
⇒ |z1 | = |−4.59| > 1 |z2 | = |1.09| > 1
Alternative verification (polynomial in m):
q
− (−0.7) ± (−0.7)2 − 4(−0.2)1
m2 − 0.7m − 0.2 = 0 ⇔ m1,2 = =
2
0.7 ± 1.136
=
2
⇒ m1 = |−0.22| < 1 m2 = |0.92| < 1
The ACF can be computed through the Yule-Walker equations for an
AR(2) process:
γ0 = θ1 γ1 + θ2 γ2 + σε2 (5)
γ1 = θ1 γ0 + θ2 γ1 (6)
γ2 = θ1 γ1 + θ2 γ0 (7)
γ3 = θ1 γ2 + θ2 γ1 (8)
γ4 = θ1 γ3 + θ2 γ2 (9)
...

4
From (6):

γ1 (1 − θ2 ) = θ1 γ0
γ1 θ1 0.7
⇒ ρ1 = = = = 0.875
γ0 1 − θ2 1 − 0.2
From (7):

γ2 = θ1 γ1 + θ2 γ0
θ1
= θ1 γ0 + θ2 γ0 =
1 − θ2
 2
θ1 + θ2 − θ22

= γ0
1 − θ2
γ2 θ2 + θ2 − θ22 0.72 + 0.2 − 0.22
⇒ ρ2 = = 1 = = 0.8125
γ0 1 − θ2 1 − 0.2

From (8):

γ3 = θ1 γ2 + θ2 γ1
γ3 γ2 γ1
⇒ = θ1 + θ2
γ0 γ0 γ0
⇒ ρ3 = θ1 ρ2 + θ2 ρ1
⇒ ρ3 = 0.7 ∗ 0.8125 + 0.2 ∗ 0.875 = 0.74375

From (9):

γ4 = θ1 γ3 + θ2 γ2
⇒ ρ4 = θ1 ρ3 + θ2 ρ2
⇒ ρ4 = 0.7 ∗ 0.74375 + 0.2 ∗ 0.8125 = 0.683125

...

As for the PACF, ρP1 = ρ1 = 0.875, ρP2 = θ2 = 0.2, ρPk = 0 ∀ k > 2.

5
Example 4. AR(2) process with first and second order autore-
gressive coefficients θ1 = −0.7 and θ2 = −0.2:

yt = −0.7yt−1 − 0.2yt−2 + εt
Is it stationary?
a(L)yt = yt + 0.7yt−1 + 0.2yt−2
a(L) = 1 + 0.7L + 0.2L2
The solutions to the equation a(z) = 0 are:
p
2 −0.7 ± 0.72 − 4(0.2)1
a(z) = 1 + 0.7z + 0.2z = 0 ⇔ z1,2 = =
2(0.2)
√ √
−0.7 ± −0.31 −0.7 ± i 0.31
= =
0.4 0.4
⇒ z1 = −1.75 + 1.39i z2 = −1.75 − 1.39i
These roots are inside or outside
p the unit circle? Modulus of a (complex
or real) number: kx + iyk ≡ x2 + y 2 . The stability condition is that
the modulus of each root is outside the unit circle. In our case:
q
kz1 k = (−1.75)2 + 1.392 = 2.24 > 1
q
kz2 k = (−1.75)2 + 1.392 = 2.24 > 1
Alternative verification (polynomial in m):
p
−0.7 ± 0.72 − 4(0.2)1
m2 + 0.7m + 0.2 = 0 ⇔ m1,2 = =
√ 2
−0.7 ± i 0.31
=
2
⇒ m1 = −0.35 + 0.18i m2 = −0.35 − 0.18i
Are these roots inside or outside the unit circle? The stability con-
dition is that the modulus of each root is inside the unit circle. In our
case: q
km1 k = km2 k = (−0.35)2 + 0.182 = 0.39 < 1
The ACF will be
θ1 −0.7
ρ1 = = = −0.583
1 − θ2 1 + 0.2
θ12 + θ2 − θ22 (−0.7)2 − 0.2 − (−0.2)2
ρ2 = = = 0.208
1 − θ2 1 + 0.2
As for the PACF, ρP1 = ρ1 = −0.583, ρP2 = θ2 = −0.2, ρPk = 0 ∀ k > 2.

6
2 Simulation Program for some (stationary and non-
stationary) stochastic processes
Commands to simulate some basic stochastic processes

’ this program is called tutorial5.prg


’ open a workfile with 2,000,000 observations

workfile simulat u 1 2000000

’ we wanto to simulate some stochastic processes to analyse ACF and


PACF

’ fix the random seed generator


rndseed 125

’white noise
series epsilon=@rnorm/20
epsilon.label white noise

’ fix the values of the parameters


scalar rho1=0.7
scalar rho2=0.2
scalar rho3=0.6
scalar rho4=0.5
scalar rho5=0.1
scalar rho6=0.05
scalar rho7=0.99

’ two AR(1), one with coefficient 0.7 (called y5) and the other -0.7
(called y6)
smpl 1 1
series y5=0
series y6=0
smpl 2 @last
series y5=rho1*y5(-1) + epsilon
series y6=-rho1*y6(-1) + epsilon
y5.label ar1 with coeff 0.7
y6.label ar1 with coeff -0.7

’ two AR(2) with coefficients a) 0.7 and 0.2 (called y7); b) -0.7 and
-0.2 (called y8)
smpl 1 2
series y7=0

7
series y8=0
smpl 3 @last
series y7 = rho1*y7(-1) + rho2*y7(-2) + epsilon
series y8 = -rho1*y8(-1) - rho2*y8(-2) + epsilon
y7.label ar2 with coeff 0.7 e 0.2
y8.label ar2 with coeff -0.7 e -0.2

’ two MA(1), one with coefficient 0.7 (called y9) and the other -0.7
(called y10)
smpl 1 1
series y9=0
series y10=0
smpl 2 @last
series y9 = rho1*epsilon(-1)+ epsilon
series y10 = -rho1*epsilon(-1)+ epsilon
y9.label ma1 with coeff 0.7
y10.label ma1 with coeff -0.7

’ ARMA(1,1) with coefficients 0.7 and 0.2 (called y11)


smpl 1 1
series y11=0
smpl 2 @last
series y11 = rho1*y11(-1) + epsilon + rho2*epsilon(-1)
y11.label arma11 with coeff 0.7 e 0.2

’ ARMA(3,3) with coefficients 0.7 -0.6 0.5 e 0.2 0.1 0.05 (called y12)
smpl 1 3
series y12=0
smpl 4 @last
series y12 = rho1*y12(-1) - rho3*y12(-2) + rho4*y12(-3) + epsilon
+ rho2*epsilon(-1) + rho5*epsilon(-2) + rho6*epsilon(-3)
y12.label arma33 with coeff 0.7 -0.6 0.5 e 0.2 0.1 0.05

’ random walk series (called y3): a non stationary process


smpl 1 1
series y3=0
smpl 2 @last
series y3=y3(-1) + epsilon
y3.label random walk

’ AR(1) with coefficient 0.99 (called y4)


smpl 1 1
series y4=0

8
smpl 2 @last
series y4=rho7*y4(-1) + epsilon
y4.label ar1 with coeff 0.99

smpl @all

Analyse the properties of the series (levels, ACF and PACF) first by
selecting the first 100 observations and then by selecting the whole sam-
ple. Being all the processes ergodic stationary (except the random walk ),
empirical moments converge to the theoretical ones.
Y5 Y6

.25 .3

.20
.2
.15
.1
.10

.05 .0

.00
-.1
-.05
-.2
-.10

-.15 -.3
10 20 30 40 50 60 70 80 90 100 10 20 30 40 50 60 70 80 90 100

Y7 Y8

.4 .20

.15
.3
.10
.2
.05

.1 .00

-.05
.0
-.10
-.1
-.15

-.2 -.20
10 20 30 40 50 60 70 80 90 100 10 20 30 40 50 60 70 80 90 100

9
Y9 Y10

.20 .25

.20
.15
.15
.10
.10

.05 .05

.00 .00

-.05
-.05
-.10
-.10
-.15

-.15 -.20
10 20 30 40 50 60 70 80 90 100 10 20 30 40 50 60 70 80 90 100

Y11 Y12

.3 .24

.20

.2 .16

.12

.1 .08

.04

.0 .00

-.04

-.1 -.08

-.12

-.2 -.16
10 20 30 40 50 60 70 80 90 100 10 20 30 40 50 60 70 80 90 100

10
11
Correlogram of Y5

Date: 04/19/12 Time: 12:39


Sample: 1 2000000
Included observations: 2000000

Autocorrelation Partial Correlation AC PAC Q-Stat Prob

1 0.700 0.700 981235 0.000


2 0.491 -0.000 1.E+06 0.000
3 0.343 -0.000 2.E+06 0.000
4 0.240 -0.000 2.E+06 0.000
5 0.168 -0.000 2.E+06 0.000
6 0.117 -0.000 2.E+06 0.000
7 0.082 -0.001 2.E+06 0.000
8 0.056 -0.001 2.E+06 0.000
9 0.039 0.001 2.E+06 0.000
10 0.027 -0.001 2.E+06 0.000
11 0.018 0.000 2.E+06 0.000
12 0.012 -0.001 2.E+06 0.000
13 0.008 0.000 2.E+06 0.000
14 0.006 -0.000 2.E+06 0.000
15 0.004 0.001 2.E+06 0.000
16 0.003 -0.000 2.E+06 0.000
17 0.002 -0.000 2.E+06 0.000
18 0.002 0.001 2.E+06 0.000
19 0.001 -0.001 2.E+06 0.000
20 0.000 -0.001 2.E+06 0.000
21 -0.000 0.001 2.E+06 0.000
22 0.000 0.001 2.E+06 0.000
23 0.001 0.001 2.E+06 0.000
24 0.001 -0.000 2.E+06 0.000
25 0.000 -0.001 2.E+06 0.000
26 -0.000 -0.001 2.E+06 0.000
27 0.000 0.001 2.E+06 0.000
28 0.001 0.001 2.E+06 0.000
29 0.000 -0.001 2.E+06 0.000
30 0.000 0.000 2.E+06 0.000
31 0.001 0.001 2.E+06 0.000
32 0.001 0.000 2.E+06 0.000
33 0.001 -0.000 2.E+06 0.000
34 0.000 -0.001 2.E+06 0.000
35 -0.001 -0.001 2.E+06 0.000
36 -0.002 -0.002 2.E+06 0.000

Correlogram of Y6

Date: 04/19/12 Time: 12:56


Sample: 1 2000000
Included observations: 2000000

Autocorrelation Partial Correlation AC PAC Q-Stat Prob

1 -0.700 -0.700 979369 0.000


2 0.490 0.000 1.E+06 0.000
3 -0.343 0.001 2.E+06 0.000
4 0.239 -0.000 2.E+06 0.000
5 -0.167 0.000 2.E+06 0.000
6 0.117 -0.001 2.E+06 0.000
7 -0.081 0.001 2.E+06 0.000
8 0.056 -0.001 2.E+06 0.000
9 -0.038 -0.000 2.E+06 0.000
10 0.026 -0.001 2.E+06 0.000
11 -0.018 -0.000 2.E+06 0.000
12 0.012 -0.001 2.E+06 0.000
13 -0.008 -0.000 2.E+06 0.000
14 0.005 -0.001 2.E+06 0.000
15 -0.004 -0.001 2.E+06 0.000
16 0.003 0.001 2.E+06 0.000
17 -0.003 -0.000 2.E+06 0.000
18 0.002 -0.000 2.E+06 0.000
19 -0.001 0.002 2.E+06 0.000
20 -0.000 -0.000 2.E+06 0.000
21 0.000 -0.001 2.E+06 0.000
22 -0.001 -0.001 2.E+06 0.000
23 0.001 0.000 2.E+06 0.000
24 -0.001 0.001 2.E+06 0.000
25 0.001 0.001 2.E+06 0.000
26 -0.001 -0.000 2.E+06 0.000
27 -0.000 -0.002 2.E+06 0.000
28 0.001 0.000 2.E+06 0.000
29 -0.000 0.001 2.E+06 0.000
30 -0.001 -0.001 2.E+06 0.000
31 0.001 -0.000 2.E+06 0.000
32 -0.001 0.000 2.E+06 0.000
33 0.002 0.002 2.E+06 0.000
34 -0.002 0.000 2.E+06 0.000
35 0.002 0.001 2.E+06 0.000
36 -0.002 0.000 2.E+06 0.000

12
Correlogram of Y7

Date: 04/19/12 Time: 12:56


Sample: 1 2000000
Included observations: 2000000

Autocorrelation Partial Correlation AC PAC Q-Stat Prob

1 0.875 0.875 2.E+06 0.000


2 0.812 0.200 3.E+06 0.000
3 0.743 -0.001 4.E+06 0.000
4 0.683 -0.001 5.E+06 0.000
5 0.626 -0.000 6.E+06 0.000
6 0.575 -0.000 6.E+06 0.000
7 0.527 -0.000 7.E+06 0.000
8 0.483 -0.001 7.E+06 0.000
9 0.443 0.001 8.E+06 0.000
10 0.407 -0.000 8.E+06 0.000
11 0.373 0.000 8.E+06 0.000
12 0.342 -0.000 9.E+06 0.000
13 0.314 0.001 9.E+06 0.000
14 0.288 0.000 9.E+06 0.000
15 0.265 0.001 9.E+06 0.000
16 0.243 -0.000 9.E+06 0.000
17 0.223 -0.001 9.E+06 0.000
18 0.205 0.001 9.E+06 0.000
19 0.188 -0.001 9.E+06 0.000
20 0.172 -0.001 1.E+07 0.000
21 0.158 0.001 1.E+07 0.000
22 0.145 0.001 1.E+07 0.000
23 0.133 0.001 1.E+07 0.000
24 0.122 -0.001 1.E+07 0.000
25 0.112 -0.001 1.E+07 0.000
26 0.103 -0.001 1.E+07 0.000
27 0.094 0.001 1.E+07 0.000
28 0.087 0.001 1.E+07 0.000
29 0.080 -0.001 1.E+07 0.000
30 0.073 -0.000 1.E+07 0.000
31 0.067 0.001 1.E+07 0.000
32 0.061 -0.000 1.E+07 0.000
33 0.056 -0.001 1.E+07 0.000
34 0.051 -0.002 1.E+07 0.000
35 0.047 -0.001 1.E+07 0.000
36 0.042 -0.002 1.E+07 0.000

Correlogram of Y8

Date: 04/19/12 Time: 12:56


Sample: 1 2000000
Included observations: 2000000

Autocorrelation Partial Correlation AC PAC Q-Stat Prob

1 -0.583 -0.583 680363 0.000


2 0.209 -0.200 767317 0.000
3 -0.029 0.001 769007 0.000
4 -0.021 0.000 769927 0.000
5 0.021 -0.000 770794 0.000
6 -0.011 -0.000 771017 0.000
7 0.004 0.001 771050 0.000
8 -0.002 -0.001 771056 0.000
9 0.001 -0.000 771057 0.000
10 -0.001 -0.001 771058 0.000
11 0.001 0.000 771059 0.000
12 -0.001 -0.001 771061 0.000
13 0.001 0.000 771063 0.000
14 -0.001 -0.001 771067 0.000
15 0.001 -0.001 771068 0.000
16 0.001 0.001 771068 0.000
17 -0.001 -0.001 771073 0.000
18 0.001 -0.000 771076 0.000
19 0.000 0.002 771076 0.000
20 -0.001 0.000 771079 0.000
21 0.001 -0.001 771079 0.000
22 -0.001 -0.001 771081 0.000
23 0.001 -0.000 771083 0.000
24 -0.000 0.000 771083 0.000
25 0.001 0.001 771084 0.000
26 -0.001 0.000 771086 0.000
27 -0.001 -0.002 771087 0.000
28 0.002 0.000 771092 0.000
29 -0.001 0.001 771094 0.000
30 -0.000 -0.000 771094 0.000
31 0.000 -0.000 771094 0.000
32 -0.000 -0.000 771094 0.000
33 0.001 0.002 771097 0.000
34 -0.001 0.000 771100 0.000
35 0.002 0.001 771106 0.000
36 -0.002 0.000 771111 0.000

13
Correlogram of Y9

Date: 04/19/12 Time: 12:57


Sample: 1 2000000
Included observations: 2000000

Autocorrelation Partial Correlation AC PAC Q-Stat Prob

1 0.470 0.470 442472 0.000


2 0.001 -0.283 442474 0.000
3 0.000 0.185 442474 0.000
4 -0.000 -0.126 442474 0.000
5 -0.000 0.087 442474 0.000
6 0.000 -0.060 442474 0.000
7 -0.000 0.041 442474 0.000
8 -0.001 -0.030 442477 0.000
9 -0.001 0.021 442478 0.000
10 -0.001 -0.015 442479 0.000
11 -0.001 0.010 442480 0.000
12 -0.001 -0.008 442481 0.000
13 -0.001 0.005 442484 0.000
14 -0.001 -0.004 442485 0.000
15 0.000 0.004 442485 0.000
16 0.000 -0.003 442486 0.000
17 0.000 0.002 442486 0.000
18 0.002 0.000 442491 0.000
19 0.001 -0.001 442492 0.000
20 -0.001 -0.002 442496 0.000
21 -0.002 -0.000 442502 0.000
22 -0.000 0.000 442503 0.000
23 0.001 0.001 442505 0.000
24 0.001 0.000 442509 0.000
25 0.000 -0.001 442509 0.000
26 -0.002 -0.001 442514 0.000
27 -0.000 0.002 442515 0.000
28 0.001 0.000 442517 0.000
29 0.000 -0.001 442517 0.000
30 -0.001 0.000 442518 0.000
31 0.001 0.001 442519 0.000
32 0.002 0.001 442524 0.000
33 0.002 0.001 442529 0.000
34 0.001 0.000 442532 0.000
35 -0.000 -0.001 442532 0.000
36 -0.002 -0.002 442542 0.000

Correlogram of Y10

Date: 04/19/12 Time: 12:57


Sample: 1 2000000
Included observations: 2000000

Autocorrelation Partial Correlation AC PAC Q-Stat Prob

1 -0.470 -0.470 441439 0.000


2 0.000 -0.283 441439 0.000
3 0.000 -0.185 441439 0.000
4 -0.000 -0.126 441439 0.000
5 -0.000 -0.087 441439 0.000
6 0.000 -0.061 441439 0.000
7 0.001 -0.041 441441 0.000
8 -0.002 -0.030 441445 0.000
9 0.001 -0.020 441447 0.000
10 -0.001 -0.015 441448 0.000
11 0.001 -0.010 441449 0.000
12 -0.001 -0.008 441450 0.000
13 0.001 -0.005 441451 0.000
14 -0.001 -0.005 441454 0.000
15 0.001 -0.003 441456 0.000
16 0.000 -0.001 441456 0.000
17 -0.002 -0.003 441461 0.000
18 0.001 -0.001 441466 0.000
19 0.001 0.001 441467 0.000
20 -0.001 -0.000 441470 0.000
21 0.000 -0.001 441470 0.000
22 -0.001 -0.002 441471 0.000
23 0.001 -0.001 441473 0.000
24 0.000 0.000 441473 0.000
25 0.001 0.001 441474 0.000
26 -0.001 -0.000 441478 0.000
27 -0.000 -0.002 441479 0.000
28 0.002 0.001 441486 0.000
29 -0.001 0.001 441488 0.000
30 -0.001 -0.001 441489 0.000
31 0.000 -0.001 441489 0.000
32 0.000 -0.000 441489 0.000
33 0.001 0.001 441490 0.000
34 -0.001 0.000 441492 0.000
35 0.002 0.002 441497 0.000
36 -0.002 0.001 441502 0.000

14
Correlogram of Y11

Date: 04/19/12 Time: 12:57


Sample: 1 2000000
Included observations: 2000000

Autocorrelation Partial Correlation AC PAC Q-Stat Prob

1 0.940 0.940 2.E+06 0.000


2 0.846 -0.330 3.E+06 0.000
3 0.761 0.128 4.E+06 0.000
4 0.685 -0.052 5.E+06 0.000
5 0.616 0.021 6.E+06 0.000
6 0.554 -0.009 7.E+06 0.000
7 0.498 0.003 7.E+06 0.000
8 0.448 -0.001 8.E+06 0.000
9 0.403 0.001 8.E+06 0.000
10 0.362 -0.001 8.E+06 0.000
11 0.326 0.001 8.E+06 0.000
12 0.293 -0.000 9.E+06 0.000
13 0.264 0.001 9.E+06 0.000
14 0.237 0.000 9.E+06 0.000
15 0.214 0.001 9.E+06 0.000
16 0.193 -0.001 9.E+06 0.000
17 0.173 0.000 9.E+06 0.000
18 0.156 0.000 9.E+06 0.000
19 0.140 -0.002 9.E+06 0.000
20 0.126 0.000 9.E+06 0.000
21 0.113 0.001 9.E+06 0.000
22 0.102 0.001 9.E+06 0.000
23 0.092 0.000 9.E+06 0.000
24 0.083 -0.001 9.E+06 0.000
25 0.075 -0.001 9.E+06 0.000
26 0.067 0.000 9.E+06 0.000
27 0.060 0.002 9.E+06 0.000
28 0.054 -0.001 9.E+06 0.000
29 0.049 -0.001 9.E+06 0.000
30 0.044 0.001 9.E+06 0.000
31 0.040 0.000 9.E+06 0.000
32 0.036 -0.001 9.E+06 0.000
33 0.032 -0.001 9.E+06 0.000
34 0.028 -0.001 9.E+06 0.000
35 0.025 -0.001 9.E+06 0.000
36 0.022 -0.001 9.E+06 0.000

Correlogram of Y12

Date: 04/19/12 Time: 12:57


Sample: 1 2000000
Included observations: 2000000

Autocorrelation Partial Correlation AC PAC Q-Stat Prob

1 0.570 0.570 648732 0.000


2 0.150 -0.258 693891 0.000
3 0.286 0.516 857895 0.000
4 0.395 -0.104 1.E+06 0.000
5 0.179 -0.022 1.E+06 0.000
6 0.032 -0.011 1.E+06 0.000
7 0.112 0.009 1.E+06 0.000
8 0.148 -0.001 1.E+06 0.000
9 0.052 -0.001 1.E+06 0.000
10 0.003 -0.001 1.E+06 0.000
11 0.045 0.001 1.E+06 0.000
12 0.055 -0.001 1.E+06 0.000
13 0.012 0.000 1.E+06 0.000
14 -0.002 0.000 1.E+06 0.000
15 0.019 0.001 1.E+06 0.000
16 0.021 -0.001 1.E+06 0.000
17 0.002 0.001 1.E+06 0.000
18 -0.001 0.001 1.E+06 0.000
19 0.009 -0.001 1.E+06 0.000
20 0.007 -0.000 1.E+06 0.000
21 -0.001 -0.001 1.E+06 0.000
22 -0.001 0.000 1.E+06 0.000
23 0.004 0.002 1.E+06 0.000
24 0.004 0.000 1.E+06 0.000
25 -0.001 -0.001 1.E+06 0.000
26 -0.002 -0.001 1.E+06 0.000
27 0.002 0.001 1.E+06 0.000
28 0.002 -0.000 1.E+06 0.000
29 -0.000 -0.000 1.E+06 0.000
30 -0.001 0.001 1.E+06 0.000
31 0.001 -0.000 1.E+06 0.000
32 0.002 0.000 1.E+06 0.000
33 0.000 0.001 1.E+06 0.000
34 0.000 -0.000 1.E+06 0.000
35 0.000 -0.002 1.E+06 0.000
36 -0.001 -0.002 1.E+06 0.000

3 Estimation of ARMA models


To estimate ARMA models in EViews it is sufficient to include the ex-
pressions ar() and ma() among the regressors of the estimation equation
with the appropriate lags in brackets.

15
Notice how the output reports the value of the roots of the polynomial
and how they can be plotted through the command

View
ARMA Structure

Example 5. Estimate the AR(2) model previously simulated (y7 series).

The output is:

Dependent Variable: Y7
Method: Least Squares
Date: 04/13/11 Time: 21:06
Sample (adjusted): 3 2000000
Included observations: 1999998 after adjustments
Convergence achieved after 3 iterations

Coefficient Std. Error t-Statistic Prob.

C -0.000152 0.000353 -0.430956 0.6665


AR(1) 0.700344 0.000693 1010.775 0.0000
AR(2) 0.199608 0.000693 288.0858 0.0000

R-squared 0.774966 Mean dependent var -0.000153


Adjusted R-squared 0.774965 S.D. dependent var 0.105365
S.E. of regression 0.049983 Akaike info criterion -3.154263
Sum squared resid 4996.604 Schwarz criterion -3.154244
Log likelihood 3154263. Hannan-Quinn criter. -3.154258
F-statistic 3443757. Durbin-Watson stat 1.999702
Prob(F-statistic) 0.000000

Inverted AR Roots .92 -.22

4 Model selection
For model selection, there are three main criteria:
(1) Ljung-Box test: the correlogram of the residuals should be white
noise;
(2) Use Akaike (AIC) and the Schwarz (or BIC) Information Criteria
: the best model is the one with the lowest AIC and BIC;
(3) The additional lags should be statistically significant.

Example 6. After estimating the parameters of an AR(2) process with


the y7 series, verify that residuals are white noise through the command:

View...
Residual tests
Correlogram - Q statistics

The correlogram is:

16
Correlogram of Residuals

Date: 04/13/11 Time: 21:07


Sample: 3 2000000
Included observations: 1999998
Q-statistic probabilities adjusted for 2 ARMA term(s)

Autocorrelation Partial Correlation AC PAC Q-Stat Prob

1 0.000 0.000 0.0438


2 0.001 0.001 1.1844
3 0.000 0.000 1.3729 0.241
4 -0.000 -0.000 1.4385 0.487
5 -0.000 -0.000 1.4386 0.697
6 0.000 0.000 1.5238 0.822
7 0.000 0.000 1.7981 0.876
8 -0.001 -0.001 5.1884 0.520
9 0.000 0.000 5.2027 0.635
10 -0.001 -0.001 5.9087 0.657
11 0.000 0.000 5.9167 0.748
12 -0.001 -0.001 7.0053 0.725
13 -0.000 -0.000 7.0721 0.793
14 -0.001 -0.001 9.3275 0.675
15 0.001 0.001 10.138 0.683
16 0.000 0.000 10.463 0.728
17 -0.001 -0.001 11.341 0.728
18 0.002 0.002 16.060 0.449
19 0.001 0.001 17.190 0.442
20 -0.001 -0.001 21.136 0.273
21 -0.001 -0.001 22.538 0.258
22 -0.001 -0.001 23.057 0.286
23 0.001 0.001 25.180 0.239
24 0.001 0.001 26.417 0.234
25 0.000 0.000 26.738 0.267
26 -0.001 -0.001 31.201 0.148
27 -0.000 -0.000 31.631 0.169
28 0.002 0.002 36.534 0.082
29 -0.000 -0.000 36.838 0.098
30 -0.001 -0.001 37.806 0.102
31 0.000 0.000 38.283 0.116
32 0.001 0.001 39.601 0.113
33 0.001 0.001 42.667 0.079
34 0.000 0.000 42.691 0.098
35 0.001 0.001 44.017 0.095
36 -0.002 -0.002 50.971 0.031

Example 7. Estimate for the same series an AR(1) process and an


AR(3) process.

Notice how in the first case the residuals are not white noise and how in
both cases the Akaike and the Schwarz Information Criterion (or BIC)
lead to (correctly) prefer the AR(2) process. The corresponding outputs
are the following:

Dependent Variable: Y7
Method: Least Squares
Date: 04/13/11 Time: 21:08
Sample (adjusted): 2 2000000
Included observations: 1999999 after adjustments
Convergence achieved after 3 iterations

Coefficient Std. Error t-Statistic Prob.

C -0.000152 0.000289 -0.528070 0.5975


AR(1) 0.875002 0.000342 2556.054 0.0000

R-squared 0.765627 Mean dependent var -0.000153


Adjusted R-squared 0.765627 S.D. dependent var 0.105365
S.E. of regression 0.051010 Akaike info criterion -3.113606
Sum squared resid 5203.947 Schwarz criterion -3.113593
Log likelihood 3113606. Hannan-Quinn criter. -3.113602
F-statistic 6533411. Durbin-Watson stat 2.349314
Prob(F-statistic) 0.000000

Inverted AR Roots .88

17
Correlogram of Residuals

Date: 04/13/11 Time: 21:09


Sample: 2 2000000
Included observations: 1999999
Q-statistic probabilities adjusted for 1 ARMA term(s)

Autocorrelation Partial Correlation AC PAC Q-Stat Prob

1 -0.175 -0.175 61010.


2 0.078 0.049 73151. 0.000
3 0.019 0.042 73906. 0.000
4 0.029 0.036 75554. 0.000
5 0.024 0.032 76716. 0.000
6 0.023 0.028 77744. 0.000
7 0.021 0.025 78646. 0.000
8 0.018 0.020 79264. 0.000
9 0.018 0.018 79904. 0.000
10 0.015 0.016 80369. 0.000
11 0.015 0.014 80818. 0.000
12 0.013 0.012 81138. 0.000
13 0.013 0.011 81454. 0.000
14 0.010 0.008 81661. 0.000
15 0.011 0.009 81907. 0.000
16 0.010 0.008 82104. 0.000
17 0.008 0.006 82226. 0.000
18 0.009 0.007 82404. 0.000
19 0.008 0.006 82532. 0.000
20 0.005 0.003 82592. 0.000
21 0.006 0.003 82660. 0.000
22 0.005 0.002 82713. 0.000
23 0.006 0.004 82789. 0.000
24 0.005 0.003 82842. 0.000
25 0.005 0.003 82891. 0.000
26 0.003 0.001 82906. 0.000
27 0.003 0.001 82927. 0.000
28 0.005 0.003 82977. 0.000
29 0.003 0.001 82990. 0.000
30 0.002 0.000 83000. 0.000
31 0.003 0.001 83019. 0.000
32 0.003 0.001 83035. 0.000
33 0.003 0.002 83056. 0.000
34 0.002 0.001 83062. 0.000
35 0.003 0.001 83079. 0.000
36 -0.000 -0.001 83079. 0.000

Dependent Variable: Y7
Method: Least Squares
Date: 04/13/11 Time: 21:18
Sample (adjusted): 4 2000000
Included observations: 1999997 after adjustments
Convergence achieved after 3 iterations

Coefficient Std. Error t-Statistic Prob.

C -0.000152 0.000353 -0.430329 0.6670


AR(1) 0.700492 0.000707 990.6436 0.0000
AR(2) 0.200127 0.000852 234.9855 0.0000
AR(3) -0.000741 0.000707 -1.047927 0.2947

R-squared 0.774966 Mean dependent var -0.000153


Adjusted R-squared 0.774966 S.D. dependent var 0.105365
S.E. of regression 0.049983 Akaike info criterion -3.154263
Sum squared resid 4996.597 Schwarz criterion -3.154238
Log likelihood 3154262. Hannan-Quinn criter. -3.154256
F-statistic 2295839. Durbin-Watson stat 2.000001
Prob(F-statistic) 0.000000

Inverted AR Roots .92 .00 -.22

5 Forecasting
Expand the range of the workfile from 2, 000, 000 to 2, 000, 100 observa-
tions. Perform a forecast for these 100 observations by using the (correct)
AR(2) process estimated equation. The command to use is:

Procs...
Forecast

from the equation menu. Notice how the forecast tends towards the un-
conditional mean of the process (equal to 0) as the process is stationary.

18
.3

.2

.1

.0

-.1

-.2

-.3
2000025 2000050 2000075 2000100

Y7F ± 2 S.E.

19

You might also like