TimeSeriesAnalysisLectureOne
TimeSeriesAnalysisLectureOne
49
A Time Series
400
350
300
250
200
150
100
50
0
0 1000 2000 3000 4000 5000 6000 7000
4
A Time Series
400
350
300
250
200
150
100
50
0
1960 1965 1970 1975 1980 1985 1990
year
5
A Time Series
400
350
300
250
200
$
150
100
50
0
1960 1965 1970 1975 1980 1985 1990
year
6
A Time Series
SP500: 1960−1990
400
350
300
250
200
$
150
100
50
0
1960 1965 1970 1975 1980 1985 1990
year
7
A Time Series
320
300
280
$
260
240
220
1987 1987.05 1987.1 1987.15 1987.2 1987.25 1987.3 1987.35 1987.4 1987.45 1987.5
year
8
A Time Series
25
20
15
10
0
240 250 260 270 280 290 300 310
$
9
A Time Series
320
300
280
$
260
240
220
0 20 40 60 80 100 120
10
Objectives of Time Series Analysis
2. Interpretation.
3. Forecasting.
4. Control.
5. Hypothesis testing.
6. Simulation.
11
Classical decomposition: An example
4
x 10
12
10
0
0 10 20 30 40 50 60 70 80 90
12
Transformed data
12
11.5
11
10.5
10
9.5
8.5
7.5
7
0 10 20 30 40 50 60 70 80 90
13
Trend
12
11.5
11
10.5
10
9.5
8.5
7.5
7
0 10 20 30 40 50 60 70 80 90
14
Residuals
1.5
0.5
−0.5
−1
0 10 20 30 40 50 60 70 80 90
15
Trend and seasonal variation
12
11.5
11
10.5
10
9.5
8.5
7.5
7
0 10 20 30 40 50 60 70 80 90
16
Objectives of Time Series Analysis
4. Control.
5. Hypothesis testing.
6. Simulation.
17
Unemployment data
5
x 10
8
7.5
6.5
5.5
4.5
4
1983 1984 1985 1986 1987 1988 1989 1990
18
Trend
5
x 10
8
7.5
6.5
5.5
4.5
4
1983 1984 1985 1986 1987 1988 1989 1990
19
Trend plus seasonal variation
5
x 10
8
7.5
6.5
5.5
4.5
4
1983 1984 1985 1986 1987 1988 1989 1990
20
Residuals
4
x 10
8
−2
−4
−6
1983 1984 1985 1986 1987 1988 1989 1990
21
Predictions based on a (simulated) variable
5
x 10
8
7.5
6.5
5.5
4.5
4
1983 1984 1985 1986 1987 1988 1989 1990
22
Objectives of Time Series Analysis
Xt = Tt + St + f (Yt ) + Wt .
23
Overview of the Course
24
Overview of the Course
3. Spectral analysis
4. State space models(?)
25
Overview of the Course
3. Spectral analysis
4. State space models(?)
26
Overview of the Course
27
Overview of the Course
28
Time Series Models
Notation:
X1 , X2 , . . . is a stochastic process.
x1 , x2 , . . . is a single realization.
We’ll mostly restrict our attention to second-order properties only:
EXt , E(Xt1 , Xt2 ).
29
Time Series Models
30
Gaussian white noise
Z xt
1 −x2 /2
P [Xt ≤ xt ] = Φ(xt ) = √ e dx.
2π −∞
2.5
1.5
0.5
−0.5
−1
−1.5
−2
−2.5
0 5 10 15 20 25 30 35 40 45 50
31
Gaussian white noise
2.5
1.5
0.5
−0.5
−1
−1.5
−2
−2.5
0 5 10 15 20 25 30 35 40 45 50
32
Time Series Models
0.8
0.6
0.4
0.2
−0.2
−0.4
−0.6
−0.8
−1
0 5 10 15 20 25 30 35 40 45 50
33
Random walk
Pt
St = i=1 Xi . Differences: ∇St = St − St−1 = Xt .
8
−2
−4
0 5 10 15 20 25 30 35 40 45 50
34
Random walk
ESt ? VarSt ?
10
−5
−10
−15
0 5 10 15 20 25 30 35 40 45 50
35
Random Walk
320
300
280
$
260
240
220
1987 1987.05 1987.1 1987.15 1987.2 1987.25 1987.3 1987.35 1987.4 1987.45 1987.5
year
36
Random Walk
0
$
−2
−4
−6
−8
−10
1987 1987.05 1987.1 1987.15 1987.2 1987.25 1987.3 1987.35 1987.4 1987.45 1987.5
year
37
Trend and Seasonal Models
P
Xt = Tt + St + Et = β0 + β1 t + i (βi cos(λi t) + γi sin(λi t)) + Et
6
5.5
4.5
3.5
2.5
0 50 100 150 200 250
38
Trend and Seasonal Models
Xt = Tt + Et = β0 + β1 t + Et
6
5.5
4.5
3.5
2.5
0 50 100 150 200 250
39
Trend and Seasonal Models
P
Xt = Tt + St + Et = β0 + β1 t + i (βi cos(λi t) + γi sin(λi t)) + Et
6
5.5
4.5
3.5
2.5
0 50 100 150 200 250
40
Trend and Seasonal Models: Residuals
0.5
0.4
0.3
0.2
0.1
−0.1
−0.2
−0.3
−0.4
−0.5
0 50 100 150 200 250
41
Time Series Modelling
42
Nonlinear transformations
4
x 10 12
12
11.5
10 11
10.5
8
10
9.5
6
4
8.5
8
2
7.5
0 7
0 10 20 30 40 50 60 70 80 90 0 10 20 30 40 50 60 70 80 90
43
Time Series Modelling
44
Differencing
320
6
4
300
280 0
$
$
−2
260
−4
−6
240
−8
220 −10
1987 1987.05 1987.1 1987.15 1987.2 1987.25 1987.3 1987.35 1987.4 1987.45 1987.5 1987 1987.05 1987.1 1987.15 1987.2 1987.25 1987.3 1987.35 1987.4 1987.45 1987.5
year year
45
Differencing and Trend
∇Xt = β1 + ∇Yt .
Pk
• If Xt = i=0 βi ti + Yt , then
∇k Xt = k!βk + ∇k Yt ,
46
Differencing and Seasonal Variation
∇s Xt = Xt − Xt−s = (1 − B s )Xt ,
∇s Xt = Tt − Tt−s + ∇s Yt .
47
Time Series Modelling
48