Documente Academic
Documente Profesional
Documente Cultură
1/60
1
2
I NTRODUCTION
E STIMATION OF ARMA(p, q) PROCESSES
Estimation of AR(p) processes
estimation of an AR(p) for a fixed (and known) p
Estimation of AR() processes
3
4
5
6
2/60
I NTRODUCTION
F ORECASTING
E STIMATION OF
ARMA(p, q) PROCESSES
M ODEL IDENTIFICATION
A SYMPTOTIC
PROPERTIES OF ML
ESTIMATORS AND
INFERENCE
R EFERENCES
I DENTIFICATION OF AN
ARMA PROCESS :
SELECTING p AND q
D IAGNOSTIC CHECKING
3/60
4/60
I NTRODUCTION
F ORECASTING
E STIMATION OF
ARMA(p, q) PROCESSES
M ODEL IDENTIFICATION
A SYMPTOTIC
PROPERTIES OF ML
ESTIMATORS AND
INFERENCE
R EFERENCES
I DENTIFICATION OF AN
ARMA PROCESS :
SELECTING p AND q
D IAGNOSTIC CHECKING
5/60
6/60
Assume for the time being that (p, q) are known. We will consider first
estimation of AR processes (its simpler) and then we will move to
estimation of general ARMA(p, q) processes.
Here we distinguish two cases:
Xt follows an AR(p) for some finite p
Xt follows an AR() process.
6/60
7/60
We now provide a sketch of the proof for the simplest case. Let {Xt } be an
AR(1) process given by
Xt = Xt1 + t
where t is a m.d.s and || < 1 (which implies that {Xt } is stationary and
ergodic).
Then,
P
P
Xt1 t
Xt Xt1
P
ols =
=+ P 2
2
Xt1
Xt1
8/60
Consistency
P
Xt1 t p
p
ols
P 2
0
Xt1
Under the previous assumptions, Xt2 is also stationary and ergodic, thus by
LLN,
2
X Xt1
2
T
(1 2 )
P
As for the numerator, notice that if t is P
a m.d.s, so is Xt1 t . Therefore, a
p
LLN also applies to the numerator and XTt1 t
E(Xt1 t ) = 0. Then
p
var(Xt1 ) =
op (T)
op (1)
ols = +
=+
= + op (1)
Op (T)
Op (1)
9/60
Asymptotic normality
T
1
2
!
P
P
T 1 2 Xt1 t
T 1/2 Xt1 t
P
=
+ op (1)
2
var(Xt )
T 1 Xt1
ols =
T 2
Xt1 t
N 0, var(Xt ) 2
Thus
1
d
T 2 ols
N 0,
2
var(Xt )
= N 0, (1 2 )
10/60
AR(p) (for finite p) are easier to estimate than MA processes since OLS
can be applied.
We know that invertible ARMA process can be written as an AR()
process.
Berk showed that if an AR(k) process is fitted toXt , where k tends to infinity
with the sample size, it is possible to obtain consistent and asymptotically
normally distributed estimators of the relevant coefficients.
More explicitly, k has to verify two conditions:
11/60
12/60
(1)
13/60
The first step is to specify a particular distribution for the white noise
innovations of the process, t . Typically, it will be assumed that t is a
Gaussian white noise, t i.i.dN(0, 2 ).
This assumption is strong but when Gaussianity does not hold , the
estimator computed by maximizing the Gaussian likelihood has, under
certain conditions, the same asymptotic properties as if the process
were indeed normal. In this cases, the estimator of the parameters of a
non Gaussian process computed on a Gaussian likelihood is called
Quasi or Pseudo MLE
The second step would be to calculate the likelihood function (1). The
exact closed form of the likelihood function of a general ARMA
processes is complicated. In the following we will illustrate how the
likelihood is computed for simple AR and MA processes.
The final step is to obtain the values of that maximize the log
likelihood. Unless the process is a pure AR process (in which cas OLS
can be applied), numerical optimization procedures should be applied
in order to obtain the estimates.
14/60
1
2 2 /(1 2 )
1
2 2
(x2 cx1 )2
2 2
15/60
1
2 2
(x3 cx2 )2
2 2
16/60
fXt |Xt1 ,...,X1 (xt |xt1 , ..., x1 ; ) = fXt |Xt1 ,...,X1 (xt |xt1 ; )
fXt |Xt1 ,...,X1 (xt |xt1 ; ) =
1
2 2
(xt cxt1 )2
2 2
(2)
(3)
(4)
= fXt |Xt1 (xt |xt1 ; )fXt1 |Xt2 (xt1 |xt2 ; )...fX1 (x1 ; )
(5)
= fX1 (x1 ; )
T
Y
(6)
t=2
17/60
Taking logs
L() = log(fX1 (x1 ; )) +
T
X
(7)
t=2
18/60
The next step would be to compute the value of for which the exact log
likelihood in (2) is maximized. This amounts to deriving the log likelihood
and equating the first derivatives to zero. The result is a system of non linear
equations on and the sample for which there is no close solution in terms
of (x1 , ..., xT . Then, iterative numerical procedures are needed to obtain .
And alternative procedure is to regard the value of y1 as deterministic and
then
log fXT ,XT1 ,...,X1 (xT , xT1 , ..., x1 ; )
= log fXT |XT1 (xT |xT1 ; )fXT1 |XT2 (xt1 |xt2 ; )...fX1 (x1 ; )
=
T
X
log fXT |XT1 (xT |xT1 ; )
t=2
=
T 1
2
log 2
T
X
(xt c xt1 )2
t=2
2 2
19/60
(xt c xt1 )2
t=2
20/60
(x
x
t
2 =
,
T 1
t=2
21/60
MA PROCESS
1
2 2
(xt t1 )2
2 2
22/60
MA PROCESS
1 = x1
2 = x2 x1
...
t = xt xt1
Then the conditional density is given by
fXt |Xt1 ,...,X1 (xt |xt1 , ..., x1 , 0 = 0; ) = fXt |t1 (xt |t1 )
=
1
2 2
2
t
2 2
23/60
MA PROCESS
X 2t
T
log 2 2
2
2 2
24/60
Once the log likelihood has been computed, the next step is to find the value
that maximizes L(). With the exception of pure AR processes, for which
closed analytical expressions of the estimators are available, numerical
optimization procedures should be employed to obtain the estimates. These
procedures make different guesses for , evaluate the likelihood at these
values and try to infer from these there the value for which is largest. See
Hamilton, section 5.7 for a description of these methods.
The search procedure may be greatly accelerated if the optimization
algorithm begins with parameter values which are close to the optimum
values. For this reason, simple preliminary estimates of are often
employed to begin the search. See Brockwell and Davis, Section 8.2-8.4 for
a description of these preliminary estimators.
25/60
I NTRODUCTION
F ORECASTING
E STIMATION OF
ARMA(p, q) PROCESSES
M ODEL IDENTIFICATION
A SYMPTOTIC
PROPERTIES OF ML
ESTIMATORS AND
INFERENCE
R EFERENCES
I DENTIFICATION OF AN
ARMA PROCESS :
SELECTING p AND q
D IAGNOSTIC CHECKING
26/60
27/60
I = T
|
0 =
which is often calculated numerically. Another popular estimator of the
Fischer information matrix is the so-called outer product estimator
I = T 1
T
X
0
ht ()
ht ()
t=1
28/60
29/60
I NTRODUCTION
F ORECASTING
E STIMATION OF
ARMA(p, q) PROCESSES
M ODEL IDENTIFICATION
A SYMPTOTIC
PROPERTIES OF ML
ESTIMATORS AND
INFERENCE
R EFERENCES
I DENTIFICATION OF AN
ARMA PROCESS :
SELECTING p AND q
D IAGNOSTIC CHECKING
30/60
I NFORMATION CRITERIA
(8)
penalty term
Akaike: C(T) = 2
32/60
I NFORMATION CRITERIA
33/60
I NFORMATION CRITERIA
(9)
In fact, the consistency result (9) holds for any criterion of the type (8)
with limT C(T)/T = 0 and limT C(T) =
34/60
2
3
35/60
I NTRODUCTION
F ORECASTING
E STIMATION OF
ARMA(p, q) PROCESSES
M ODEL IDENTIFICATION
A SYMPTOTIC
PROPERTIES OF ML
ESTIMATORS AND
INFERENCE
R EFERENCES
I DENTIFICATION OF AN
ARMA PROCESS :
SELECTING p AND q
D IAGNOSTIC CHECKING
36/60
(et e)(et+h e)
, h = 1, 2, ...
PT
e)2
t=1 (et
t=1
Assume first that the true parameter values were known. Then, et = t . In
d
this case, we know (see Chapter 1) that T e
N (0, IH ), where
0
= (
(1), ..., (H)) and IH is the H H identity matrix, then the null
hypothesis that the first H autocorrelations are non significant can be tested
using the Box-Pierce Q statistic:
T
H
X
2 (i)
2H
(10)
i=1
38/60
However, in practice the values of the parameters are unknown and they
should be estimated. The fact that the parameters employed to compute et
are not the true ones but are estimates has an impact on the asymptotic
distribution.
More specifically, the asymptotic variance of the sample autocorrelations is
not the identity matrix anymore. Hence, in this case (10) no longer holds.
However, under certain assumptions it is still possible to use the sample
autocorrelations for diagnosis of the model. The following proposition
presents the distribution of the sample autocorrelations of the sample
residuals, when the parameters of the model are estimated.
39/60
P ROPOSITION
Suppose that Yt = Xt0 + t , t = 1, ..., T, where Yt and t are scalar and Xt
and are k 1 vectors. If {Yt , Xt } are jointly stationary and ergodic,
E (Xt Xt0 ) is a full rank matrix,
E (t |t1 , t2 , ..., Xt , Xt1 , ...) = 0
and
E 2t |t1 , t2 , ..., Xt , Xt1 , ... = 2 > 0
then
T e
N (0, IH Q)
E (Xt tk ) / 2
H
X
2e (i)
2(Hpq)
i=1
PH
n(n + 2) i=1 2e (i)
ni
since they claim that the statistics offers a better approximation to the 2
distribution.
41/60
I NTRODUCTION
F ORECASTING
E STIMATION OF
ARMA(p, q) PROCESSES
M ODEL IDENTIFICATION
A SYMPTOTIC
PROPERTIES OF ML
ESTIMATORS AND
INFERENCE
R EFERENCES
I DENTIFICATION OF AN
ARMA PROCESS :
SELECTING p AND q
D IAGNOSTIC CHECKING
42/60
2
2
Asymmetric if 1 6= 2
43/60
Let xt+h
= Et [xt+h ]
Let xt+h be any other value
i
h
h
2 i
2
xt+h xt+h
+ xt+h
xt+h
Et (xt+h xt+h ) = Et
h
2
2 i
= Et xt+h xt+h
+ 2 xt+h xt+h
xt+h xt+h + xt+h
xt+h
h
2 i
= Vt [xt+h ] + 2 xt+h
xt+h Et xt+h xt+h
+ Et xt+h
xt+h
h
2 i
= Vt [xt+h ] + 2 xt+h
xt+h .0 + Et xt+h
xt+h
= Vt [xt+h ] + (xt+h
xt+h )2
44/60
45/60
F ORECAST EVALUATION
46/60
F ORECAST EVALUATION
H0 : = 0, = 1, = 0; H1 : 6= 0 6= 1 j 6= 0
zt must be in the time t information set
Important when working with macro data
47/60
A
B
Two forecasts, xt+h|t
and xt+h|t
Two losses
ltA = (yt+h yAt+h|t )2 and ltB = (yt+h yBt+h|t )2
Losses do not need to be MSE
48/60
DM = q
]
V[
L
X
1
l=1
l
l
L+1
49/60
DM = q
]
V[
A
B
Using the two forecasts, xt+h|t
and xt+h|t
, compute t = ltA ltB
Reject if |t| > C where C is the critical value for a 2 sided test using
a normal distribution with a size of . If significant, reject in favor of
model A if test statistic is negative or in favor of model B if test statistic
is positive.
50/60
I NTRODUCTION
F ORECASTING
E STIMATION OF
ARMA(p, q) PROCESSES
M ODEL IDENTIFICATION
A SYMPTOTIC
PROPERTIES OF ML
ESTIMATORS AND
INFERENCE
R EFERENCES
I DENTIFICATION OF AN
ARMA PROCESS :
SELECTING p AND q
D IAGNOSTIC CHECKING
51/60
52/60
53/60
Step 3. Compute the ACF and PACF of the transformed variable to identify
p and q.
Identifying the order of sample AR or MA polynomials is, in theory, easy
with the table above. However, it is more difficult to identify the orders of an
ARMA process. In these cases, other model selection mechanisms, such as
information criteria (see below) can be implemented.
Step 4. Test the deterministic trend term when d > 0.
If d > 0 and a trend in the data not suspected should not be included.
However, if there is a reason to believe that a trend should be include, one
can include this term in the model and the, discard it if the coefficient is not
significant.
For some interesting exemples, see Wei, Chapter 6 and Brockwell and
Davies, Chapter 9.
54/60
ESTIMATION
55/60
I NTRODUCTION
F ORECASTING
E STIMATION OF
ARMA(p, q) PROCESSES
M ODEL IDENTIFICATION
A SYMPTOTIC
PROPERTIES OF ML
ESTIMATORS AND
INFERENCE
R EFERENCES
I DENTIFICATION OF AN
ARMA PROCESS :
SELECTING p AND q
D IAGNOSTIC CHECKING
56/60
Diagnostic Checking
A first step in diagnostic checking of fitted models is to analyze the residuals
from the fit for any signs of randomness. R has the function tsdiag(), which
produces a diagnostic plot of fitted time series model
tsdiag(fit)
it produces output containing a plot of the residuals, the autocorrelation of
the residual and the p- values of the Ljung-Box statistic for the first 10 lags.
The function Box.test() computes the test statistic for a given lag
Box-test(fit$residuals, lag=1)
58/60
Prediction of ARMA-Models
predict( ) can be used for predicting future values of the levels under the
model
AR.pred<-predict(fit,n.ahead=8)
AR.pred is a list containing two entries, the predicted values AR.pred$pred
and the standard errors of the prediction AR.pred$se. Using a rule of thumb
for an approximate confidence interval (95% of the prediction),i.e.
prediction 2SE, one can plot the AR data, predicted values and an
approximate confidence interval:
plot(sim.ar)
lines(AR.pred$pred,col="red")
lines(AR.pred$pred+2*AR.pred$se,col="red",lty=3)
lines(AR.pred$pred-2*AR.pred$se,col="red",lty=3)
59/60
I NTRODUCTION
F ORECASTING
E STIMATION OF
ARMA(p, q) PROCESSES
M ODEL IDENTIFICATION
A SYMPTOTIC
PROPERTIES OF ML
ESTIMATORS AND
INFERENCE
R EFERENCES
I DENTIFICATION OF AN
ARMA PROCESS :
SELECTING p AND q
D IAGNOSTIC CHECKING
60/60
60/60