Time Series Analysis
Time Series Analysis
Henrik Madsen 1
H. Madsen, Time Series Analysis, Chapmann Hall
Henrik Madsen 2
H. Madsen, Time Series Analysis, Chapmann Hall
physical insight
2. Estimation
(of the model parameters)
No 3. Model checking
Is the model OK ?
Yes
Henrik Madsen 3
H. Madsen, Time Series Analysis, Chapmann Hall
0 20 40 60 80 100
Henrik Madsen 4
H. Madsen, Time Series Analysis, Chapmann Hall
N −|k|
1 X
CY Y (k) = C(k) = γ
b(k) = (Yt − Y )(Yt+|k| − Y )
N
t=1
Henrik Madsen 5
H. Madsen, Time Series Analysis, Chapmann Hall
Henrik Madsen 6
H. Madsen, Time Series Analysis, Chapmann Hall
Henrik Madsen 7
H. Madsen, Time Series Analysis, Chapmann Hall
0 5 10 15 20 25
Henrik Madsen 7
H. Madsen, Time Series Analysis, Chapmann Hall
Henrik Madsen 8
H. Madsen, Time Series Analysis, Chapmann Hall
1 1.2 2
0
1.1
−1
−2
0 20 40 60 80 100
1.0
•
1
0.2
1.0
0.1
0.60.9
Partial ACF
ACF
0.0
0.8 0.2
−0.1
−0.2
−0.2
Henrik Madsen 9
H. Madsen, Time Series Analysis, Chapmann Hall
4
21.2
0
−21.1
0 20 40 60 80 100
1.0
•
1
1.0
0.6
0.60.9
0.4
Partial ACF
ACF
0.2
0.8 0.2
0.0
−0.2
−0.2
Henrik Madsen 10
H. Madsen, Time Series Analysis, Chapmann Hall
4
1.2
2
0
1.1 −2
−4
−6
0 20 40 60 80 100
1.0
•
1
1.0
0.8
0.9
0.6
Partial ACF
0.4
ACF
−0.2 0.8 0.2
0.0 −0.4
Henrik Madsen 11
H. Madsen, Time Series Analysis, Chapmann Hall
4
1.2
2
01.1
−2
−4
0 20 40 60 80 100
1.0
•
1
1.0
0.2
−0.2 0.0
0.9
0.5
Partial ACF
ACF
0.0
−0.50.8
−0.6
Henrik Madsen 12
H. Madsen, Time Series Analysis, Chapmann Hall
3
1.2
2
1
0
1.1
−1
−2
0 20 40 60 80 100
1.0
•
1
1.0
0.6
0.60.9
0.4
Partial ACF
ACF
0.2
0.8 0.2
0.0
−0.2
−0.2
Henrik Madsen 13
H. Madsen, Time Series Analysis, Chapmann Hall
3
1.2
1
02
1.1
−1
−2
0 20 40 60 80 100
1.0
•
1
0.4
1.0
0.60.9
0.2
Partial ACF
ACF
0.0
0.8 0.2
−0.2
−0.2
Henrik Madsen 14
H. Madsen, Time Series Analysis, Chapmann Hall
0 20 40 60 80 100
1.0
•
1
1.0
0.8
0.60.9
Partial ACF
0.4
ACF
0.8 0.2
0.0 −0.4
−0.2
Henrik Madsen 15
H. Madsen, Time Series Analysis, Chapmann Hall
4
1.2
2
01.1
−2
−4
0 20 40 60 80 100
1.0
•
1
1.0
0.2
−0.2 0.0
0.9
0.5
Partial ACF
ACF
0.0
−0.50.8
−0.6
Henrik Madsen 16
H. Madsen, Time Series Analysis, Chapmann Hall
1.10
−40 1.2 80
20 40 60
0 20 40 60 80 100
1.0
•
1
1.0
1.0
0.60.9
0.6
Partial ACF
ACF
0.2
0.8 0.2
−0.2
−0.2
Henrik Madsen 17
H. Madsen, Time Series Analysis, Chapmann Hall
2 1.2 4
0 −2
−4 1.1
0 20 40 60 80 100
1.0
•
1
1.0
0.6
0.9
0.6
Partial ACF
ACF
0.2
0.8 0.2
−0.2
−0.2
Henrik Madsen 18
H. Madsen, Time Series Analysis, Chapmann Hall
Henrik Madsen 19
H. Madsen, Time Series Analysis, Chapmann Hall
0.3
0.1
−0.1
−0.5
1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996
Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3
1990 1991 1992 1993 1994 1995 1996
Henrik Madsen 20
H. Madsen, Time Series Analysis, Chapmann Hall
Henrik Madsen 21
H. Madsen, Time Series Analysis, Chapmann Hall
Henrik Madsen 22
H. Madsen, Time Series Analysis, Chapmann Hall
Henrik Madsen 23
H. Madsen, Time Series Analysis, Chapmann Hall
physical insight
2. Estimation
(of the model parameters)
No 3. Model checking
Is the model OK ?
Yes
Henrik Madsen 24
H. Madsen, Time Series Analysis, Chapmann Hall
Estimation
We have an appropriate model structure AR(p), M A(q),
ARM A(p, q), ARIM A(p, d, q) with p, d, and q known
Task: Based on the observations find appropriate values of
the parameters
The book describes many methods:
Moment estimates
LS-estimates
Prediction error estimates
• Conditioned
• Unconditioned
ML-estimates
• Conditioned
• Unconditioned (exact)
Henrik Madsen 25
H. Madsen, Time Series Analysis, Chapmann Hall
Example
Using the autocorre-
lation functions we
agreed that
ŷt+1|t = a1 yt + a2 yt−1
Henrik Madsen 26
H. Madsen, Time Series Analysis, Chapmann Hall
Example
Using the autocorre-
lation functions we
agreed that
ŷt+1|t = a1 yt + a2 yt−1
To comply with the notation of the book we will write the 1-step
forecasts as ŷt+1|t = −φ1 yt − φ2 yt−1
Henrik Madsen 26
H. Madsen, Time Series Analysis, Chapmann Hall
Henrik Madsen 27
H. Madsen, Time Series Analysis, Chapmann Hall
e3|2 = y3 + φ1 y2 + φ2 y1
e4|3 = y4 + φ1 y3 + φ2 y2
e5|4 = y5 + φ1 y4 + φ2 y3
..
.
eN |N −1 = yN + φ1 yN −1 + φ2 yN −2
Henrik Madsen 27
H. Madsen, Time Series Analysis, Chapmann Hall
e3|2 = y3 + φ1 y2 + φ2 y1
e4|3 = y4 + φ1 y3 + φ2 y2
e5|4 = y5 + φ1 y4 + φ2 y3
..
.
eN |N −1 = yN + φ1 yN −1 + φ2 yN −2
y3 −y2 −y1 e3|2
.. .. .. φ1
. = . . + ...
φ2
yN −yN −1 −yN −2 eN |N −1
Henrik Madsen 27
H. Madsen, Time Series Analysis, Chapmann Hall
e3|2 = y3 + φ1 y2 + φ2 y1
e4|3 = y4 + φ1 y3 + φ2 y2
e5|4 = y5 + φ1 y4 + φ2 y3
..
.
eN |N −1 = yN + φ1 yN −1 + φ2 yN −2
y3 −y2 −y1 e3|2 Or just:
.. .. .. φ1
. = . . + ... Y = Xθ + ε
φ2
yN −yN −1 −yN −2 eN |N −1
Henrik Madsen 27
H. Madsen, Time Series Analysis, Chapmann Hall
Solution
To minimize the sum of the squared 1-step prediction errors εT ε we
use the result for the General Linear Model from Chapter 3:
b = (X T X)−1 X T Y
θ
With −y2 −y1 y3
.. .. ..
X= . . and Y = .
−yN −1 −yN −2 yN
The method is called the LS-estimator for dynamical systems
The method is also in the class of prediction error methods
since it minimize the sum of the squared 1-step prediction
errors
Henrik Madsen 28
H. Madsen, Time Series Analysis, Chapmann Hall
Solution
To minimize the sum of the squared 1-step prediction errors εT ε we
use the result for the General Linear Model from Chapter 3:
b = (X T X)−1 X T Y
θ
With −y2 −y1 y3
.. .. ..
X= . . and Y = .
−yN −1 −yN −2 yN
The method is called the LS-estimator for dynamical systems
The method is also in the class of prediction error methods
since it minimize the sum of the squared 1-step prediction
errors
How does it generalize to AR(p)-models?
Henrik Madsen 28
H. Madsen, Time Series Analysis, Chapmann Hall
Henrik Madsen 29
H. Madsen, Time Series Analysis, Chapmann Hall
Notation:
θT = (φ1 , . . . , φp , θ1 , . . . , θq )
YtT = (Yt , Yt−1 , . . . , Y1 )
Henrik Madsen 30
H. Madsen, Time Series Analysis, Chapmann Hall
Henrik Madsen 31
H. Madsen, Time Series Analysis, Chapmann Hall
Henrik Madsen 32
H. Madsen, Time Series Analysis, Chapmann Hall
And therefore:
N
X
− N 2−p 1
L(YN ; θ, σε2 ) = (σε2 2π) exp − 2 ε2t (θ)
2σε
t=p+1
Henrik Madsen 33
H. Madsen, Time Series Analysis, Chapmann Hall
ML-estimates
The (conditional) ML-estimate θ b is a prediction error estimate
since it is obtained by minimizing
N
X
S(θ) = ε2t (θ)
t=p+1
Henrik Madsen 35
H. Madsen, Time Series Analysis, Chapmann Hall
1.0
0.8
45
0.6
AR−parameter
0.4
40
0.2
0.0 35
−0.2
30
−0.4
MA−parameter
Henrik Madsen 36
H. Madsen, Time Series Analysis, Chapmann Hall
Moment estimates
Given the model structure: Find formulas for the theoretical
autocorrelation or autocovariance as function of the
parameters in the model
Estimate, e.g. calculate the SACF
Solve the equations by using the lowest lags necessary
Complicated!
General properties of the estimator unknown!
Henrik Madsen 37
H. Madsen, Time Series Analysis, Chapmann Hall
Henrik Madsen 38