Time Series Analysis
Time Series Analysis
Time Series Analysis
Spring 2021
1/106
Time Series Analysis
This course covers Time Series models.
We will use R/RStudio
Assignments 3-4
Two take-home exams
These slides are being updated! if you catch a typo/error please
send an email to [email protected]! Thank you!
2/106
Time Series Analysis
Definitions
3/106
Time Series Analysis
Definitions
3/106
Time Series Analysis
Introduction
Time
We mean by time:
Seconds, hours, years,...
4/106
Time Series Analysis
Introduction
Time
We mean by time:
Seconds, hours, years,...
Spatial: 1st machine in a row, 2nd machine,...
4/106
Time Series Analysis
Introduction
Time
We mean by time:
Seconds, hours, years,...
Spatial: 1st machine in a row, 2nd machine,...
Depth: one millimetre down, two millimetre down,...
4/106
Time Series Analysis
Introduction
Time
We mean by time:
Seconds, hours, years,...
Spatial: 1st machine in a row, 2nd machine,...
Depth: one millimetre down, two millimetre down,...
The important point here is to have an ordered variable like time
that there is a meaning of direction in its values. Then from a
given observation, past, present and future have a meaning.
4/106
Time Series Analysis
Introduction
5/106
Time Series Analysis
Introduction
5/106
Time Series Analysis
Introduction
5/106
Time Series Analysis
Introduction
5/106
Time Series Analysis
Introduction
5/106
Time Series Analysis
Introduction
5/106
Time Series Analysis
Introduction
Example 1: U.S.A. population at ten year intervals from 1790-1990
There is a upward trend
There is a slight change in shape/structure
Nonlinear behavior 250
Population of the U.S.A (Millions)
200
150
100
50
0
7/106
Time Series Analysis
Introduction
Example 3: Global Warming
The data are the global mean land-ocean temperature index from 1880 to
2009. We note an apparent upward trend in the series during the latter part of
the 20th century that has been used as an argument for the global warming
hypothesis (whether the overall trend is natural or whether it is caused by some
human-induced interface)
8/106
Time Series Analysis
Introduction
Example 4: Airline passengers from 1949-1961
Trend? Seasonality? Heteroskedasticity? ...
Upward trend, seasonality on a 12 month interval, increasing variability
Monthly totals of internaional airline passengers 1949−1961
600
500
400
300
200
100
Time
9/106
Time Series Analysis
Introduction
Example 5: Monthly Employed persons from 1980-1991
Trend? Seasonality? Heteroskedasticity? ...
Upward trend, seasonality with a structural break
10/106
Time Series Analysis
Introduction
Example 6: Monthly Beer Production in Australia
Trend? Seasonality? Heteroskedasticity? breaks?... no trend in last 100
Months, no clear seasonality
11/106
Time Series Analysis
Introduction
Example 7: Annual number of Candadian Lynx trapped near
McKenzie River
Trend? Seasonality? Heteroskedasticity? breaks?... no trend, no clear
seasonality as it does correspond to a known period, periodicity
12/106
Time Series Analysis
Introduction
Example 8: Yield from a controlled chemical batch process
Trend? Seasonality? Heteroskedasticity? breaks?... Negative dependence:
successive observations tend to lie on opposite sides of the mean.
13/106
Time Series Analysis
Introduction
Example 9: Monthly real exchange rates between U.S and Canada
Trend? Seasonality? Heteroskedasticity? breaks?...
14/106
Time Series Analysis
Introduction
Example 9: Monthly real exchange rates between U.S and Canada
Trend? Seasonality? Heteroskedasticity? breaks?...
Remarks
The issue of distinguishing between dependence and trend is
difficult: There is no unique decomposition of a series into trend
and dependence behaviors.
The issue that tampers this question: we have only one realization.
If we had many realizations, we might be able to average to
determine trend.
15/106
Time Series Analysis
Introduction
Objectives
What do we hope to achieve with time series analysis?
Provide a model of the data (testing of scientific hypothesis,
etc.)
16/106
Time Series Analysis
Introduction
Objectives
What do we hope to achieve with time series analysis?
Provide a model of the data (testing of scientific hypothesis,
etc.)
Predict future values (very common goal of analysis)
16/106
Time Series Analysis
Introduction
Objectives
What do we hope to achieve with time series analysis?
Provide a model of the data (testing of scientific hypothesis,
etc.)
Predict future values (very common goal of analysis)
Produce a compact description of the data (a good model can
be used for "data compression")
16/106
Time Series Analysis
Introduction
Modeling
We take the approach that the data is a realization of random
variable. However, many statistical tools are based on assuming any
R.V. are IID.
In Times Series:
R.V. are usually not independent (affected by trend and
seasonality)
17/106
Time Series Analysis
Introduction
Modeling
We take the approach that the data is a realization of random
variable. However, many statistical tools are based on assuming any
R.V. are IID.
In Times Series:
R.V. are usually not independent (affected by trend and
seasonality)
Variance may change significantly
17/106
Time Series Analysis
Introduction
Modeling
We take the approach that the data is a realization of random
variable. However, many statistical tools are based on assuming any
R.V. are IID.
In Times Series:
R.V. are usually not independent (affected by trend and
seasonality)
Variance may change significantly
R.V. are usually not identically distributed
The first goal in time series modeling is to reduce the analysis
needed to a simpler case: Eliminate Trend, Seasonality, and
heteroskedasticity then we model the remainder as dependent but
Identically distributed
17/106
Time Series Analysis
Introduction
18/106
Time Series Analysis
Introduction
18/106
Time Series Analysis
Introduction
and correlation
Cov (X , Y )
corr (X , Y ) =
SX SY
19/106
Time Series Analysis
Some properties of Expectation and Variances/Covariances
20/106
Time Series Analysis
Introduction
21/106
Time Series Analysis
Some zero-Mean Models
iid Noise
The simplest model for a times series: no trend or seasonal component and in
which the observations are IID with zero mean.
We can write, for any integer n and real numbers x1 , x2 ,...,xn ,
It plays an important role as a building block for more complicated time series
models
white noise
3
2
1
w
0
−1
−2
Time
22/106
Time Series Analysis
Some zero-Mean Models
Random Walk
The random walk {St }, t = 0, 1, 2, .... is obtained by cumulatively summing iid
random variables, S0 = 0
St = X1 + X2 + · · · + Xt , t = 1, 2, ....
where Xt is iid noise. It plays an important role as a building block for more
complicated time series models
Random walk
10 15 20 25
x
5
0
−5
Time
23/106
Time Series Analysis
Models with Trend
250
Population of the U.S.A (Millions)
200
150
100
50
0
Time
In this case a zero-mean model for the data is clearly inappropriate. The graph
suggests trying a model of the form:
Xt = mt + Yt
where mt is a function known as the trend component and Yt has a zero mean.
Estimating mt ?
24/106
Time Series Analysis
Models with Trend
25/106
Time Series Analysis
Models with Seasonality
In this case a zero-mean model for the data is clearly inappropriate. The graph
suggests trying a model of the form:
Xt = St + Yt
27/106
Time Series Analysis
Stationary and Autocorrelation function
µX (t) = E (Xt )
28/106
Time Series Analysis
Stationary and Autocorrelation function
Definitions
1 Xt is strictly stationary if {X1 , . . . Xn } and {X1+h , . . . Xn+h } have the
same joint distributions for all integers h and n > 0.
29/106
Time Series Analysis
Stationary and Autocorrelation function
Definitions
1 Xt is strictly stationary if {X1 , . . . Xn } and {X1+h , . . . Xn+h } have the
same joint distributions for all integers h and n > 0.
2 Xt is weakly stationary if
µX (t) is independent of t.
γX (t + h, t) is independent of t for each h.
29/106
Time Series Analysis
Stationary and Autocorrelation function
Definitions
1 Xt is strictly stationary if {X1 , . . . Xn } and {X1+h , . . . Xn+h } have the
same joint distributions for all integers h and n > 0.
2 Xt is weakly stationary if
µX (t) is independent of t.
γX (t + h, t) is independent of t for each h.
3 Let Xt be a stationary time series. The autocovariance function (ACVF)
of Xt at lag h is
γX (h) = Cov (Xt+h , Xt )
The autocorrelation function (ACF) of Xt at lag h is
γX (h)
ρX (h) = = Cor (Xt+h , Xt )
γX (0)
29/106
Time Series Analysis
Stationary and Autocorrelation function
iid Noise
If Xt is iid noise and E (Xt2 ) = σ 2 < ∞, then The process Xt is strictly
stationary since the joint distribution can be written, for any integer n and real
numbers c1 , c2 ,...,cn , as follows:
30/106
Time Series Analysis
Stationary and Autocorrelation function
White Noise
If Xt is a sequence of uncorrelated random variables, each with zero mean and
variance σ 2 , then clearly Xt is stationary with the same autocovariance function
as the iid noise. We can write
Xt ∼ WN(0, σ 2 )
31/106
Time Series Analysis
Stationary and Autocorrelation function
Random Walk
If {St } is the random walk with Xt is a IID(0, σ 2 ) sequence, then The random
walk {St }, t = 0, 1, 2, .... is obtained by cumulatively summing iid random
variables, S0 = 0
St = X1 + X2 + · · · + Xt , t = 1, 2, ....
where Xt is iid noise. It plays an important role as a building block for more
complicated time series models
Random walk
10 15 20 25
x
5
0
−5
Time
32/106
Time Series Analysis
Stationary and Autocorrelation function
33/106
Time Series Analysis
Stationary and Autocorrelation function
where Zt is WN(0, σ 2 ) noise, |Φ| < 1, and Zt is uncorrelated with Xs for each
s < t.
E (Xt )?
γX (t + h, h)?
34/106
Time Series Analysis
The Sample Autocorrelation function
In practical problems, we do not start with a model, but with observed data
(x1 , x2 , . . . , xn ). To assess the degree of dependence in the data and to select
a model for the data, one of the important tools we use is the sample
autocorrelation function (Sample ACF).
Definition
Let x1 , x2 , . . . , xn be observations of a time series. The sample mean of
x1 , x2 , . . . , xn is
Xn
x = 1/n xi
t=1
Remarks
1 The sample autocorrelation function (ACF) can be computed for any data
set and is not restricted to observations from a stationary time series.
2 For data containing a Trend, |ρ̂(h)| will display slow decay as h increases.
3 For data containing a substantial deterministic periodic component,
|ρ̂(h)| will exhibit similar behavior with the same periodicity.
36/106
Time Series Analysis
The Sample Autocorrelation function
Remarks
1 White Noise => Zero
2 Trend => Slow decay
3 Periodic => Periodic
4 Moving Average (q) => Zero for |h| > q
5 AutoRegression (p) => Decay to zero exponentially
37/106
Time Series Analysis
The Sample Autocorrelation function
Examples with R
38/106
Time Series Analysis
Estimation and Elimination of Trend and Seasonal
Components
The first step in the analysis of any time series is to plot the data. Inspection
of the graph may suggest the possibility of representing the data as follows (the
classical decomposition):
Xt = mt + st + Yt
where
mt is the trend component
st is the seasonal component
Yt random noise component / Residuals
if seasonal and noise fluctuations appear to increase with the level of the
process => Eliminate by using a preliminary transformation of the data
(natural log,...).
39/106
Time Series Analysis
Estimation and Elimination of Trend and Seasonal
Components
Approaches
1 Estimate and eliminate the trend and the seasonal components in the
hope that the residual Yt will turn out to be a stationary time series =>
Find a Model using stationary process theory.
2 Box and Jenkins (1976) proposed to apply differencing operators to the
series until the differenced observations resemble a realization of some
stationary time series.
40/106
Time Series Analysis
Estimation and Elimination of Trend and Seasonal
Components
Trend Estimation
Moving average and spectral smoothing are an essentially nonparametric
methods for trend (or signal) estimation
Xt = mt + Yt , E (Yt ) = 0
41/106
Time Series Analysis
Estimation and Elimination of Trend and Seasonal
Components
42/106
Time Series Analysis
Estimation and Elimination of Trend and Seasonal
Components
and m̂1 = X1
With R (smooth.exp{itsmr})
43/106
Time Series Analysis
Estimation and Elimination of Trend and Seasonal
Components
With R (smooth.fft{itsmr})
44/106
Time Series Analysis
Nonseasonal Model With Trend: Estimation
45/106
Time Series Analysis
Estimation and Elimination of Trend and Seasonal
Components
46/106
Time Series Analysis
Estimation and Elimination of Trend and Seasonal
Components
B j (Xt ) = Xt−j
Example: ∇2 Xt ?
Xt = mt + st + Yt
= st , and dj=1 sj = 0
P
where E (Yt ) = 0, st+d
48/106
Time Series Analysis
Estimation: Both Trend and Seasonal [Method 1]
Suppose we have observations x1 , x2 , ...xn
1 The trend is first estimated by applying a moving average filter specially
to eliminate the seasonal component of period d
if the period is even, say d=2q then
m̂t = (0.5xt−q + xt−q+1 , . . . , 0.5xt+q )/d q < t ≤ n − q
if the period is odd, say d=2q+1 then we use the simple
moving average
2 Estimate the seasonal component; for each k=1,..., d, we compute the
average wk of the deviation xk+jd − m̂k+jd , q < k + jd ≤ n − q; and we
estimate the seasonal component as follows:
Pd
wi
ŝk = wk − i=1 ; k = 1, . . . , d
d
and ŝk = ŝk−d ; k>d
3 The deseasonalized data is then dt = xt − ŝt t=1,...n
4 Reestimate the trend from the deseasonalized data using one of the
methods already described.
49/106
Time Series Analysis
Eliminating: Both Trend and Seasonal [Method 2]
We can use the Differencing operator to eliminate the trend and the seasonal
component
1 Eliminate the seasonality of period d using ∇d Xt = Xt − Xt−d
Xt = mt + st + Yt Applying ∇d Xt = mt − mt−d + Yt − Yt−d
2 Eliminate the trend mt − mt−d using ∇k Xt
50/106
Time Series Analysis
Testing Noise squence
Remember that as you increase the number of tests, the probability of at least
one rejects the null hypothesis when it is true increases.
51/106
Time Series Analysis
Summary
52/106
Time Series Analysis
Stationary Processes
Remarks
1 A key role in time series analysis is given by processes whose properties
do not vary with time.
2 If we wish to make predictions then clearly we must assume that
somehting does not vary with time
3 In time series analysis, our goal is to predict a series that contains a
random component, if this random component is stationary (weakly )
then we can develop powerful techniques to forecast its future values.
53/106
Time Series Analysis
Stationary Processes
Basic Properties
1 The autocovariance function (ACVF)
γ(h) = Cov (Xt+h , Xt ), h = 0, ±1, ±2, . . .
γ(h)
2 The autocorrelation function (ACF) ρ(h) = γ(0)
3 γ(0) ≥ 0
4 |γ(h)| ≤ γ(0), for all h (ρ(h) ≤ 1) or (Cauchy-Schwarz inequality
E (XY )2 ≤ E (X 2 )E (Y 2 ))
5 γ(h) = γ(−h)
54/106
Time Series Analysis
Stationary Processes
Prediction
The ACF and ACVF provide a useful measure of the degree of dependence
among the values of a time series at different times => Very important if we
consider the prediction of future values of the series in terms of the past and
present values.
55/106
Time Series Analysis
Stationary Processes
Prediction
The ACF and ACVF provide a useful measure of the degree of dependence
among the values of a time series at different times => Very important if we
consider the prediction of future values of the series in terms of the past and
present values.
Question
What is the role of the autocorrelation function in prediction?
55/106
Time Series Analysis
Stationary Processes
Question
What is function of Xn that gives us the best predictor of Xn+h ?
Answer
The best predictor of Xn+h in terms of MSE is given by
E (Xn+h |Xn ) = µ + ρ(h)(Xn − µ)
56/106
Time Series Analysis
Stationary Processes
Answer
The best linear predictor of l(Xn ) in terms of MSE is given by
l(Xn ) = µ + ρ(h)(Xn − µ)
The fact that the best linear predictor depends only on the mean and the ACF
of the series Xt means that it can be calculated without more detailed
knowledge of the series Xt
57/106
Time Series Analysis
Stationary Processes: Examples
Xt = Zt + θ1 Zt−1 + · · · + θq Zt−q
Remarks
If Xt is a stationary q-correlated time series with mean 0, then it can be
represented as the MA(q) process
58/106
Time Series Analysis
Stationary Processes: Examples
59/106
Time Series Analysis
Stationary Processes: Properties
for some real-valued function g (., . . . , .). We can say that Xt is q-dependent.
Remarks
IID is 0-dependent
WN is 0-correlated
A stationary time series is q-correlated if γ(h) = 0 whenever lhl > q
MA(1) is 1-correlated
MA(q) is q-correlated
60/106
Time Series Analysis
Stationary Processes: Properties
Xt = Zt + θ1 Zt−1 + · · · + θq Zt−q
61/106
Time Series Analysis
Stationary Processes: Properties
The class of Linear time series models, which includes the class of
Autoregressive Moving-Average (ARMA) models, provides a general framework
for studying stationary processes.
Linear processes
The time series Xt is a Linear process if it has the representation:
∞
X
Xt = ψj Zt−j (2)
j=−∞
2
P∞all t, where Zt ∼ WN(0, σ ) and ψj is a sequence of constants with
for
j=−∞ | ψj |< ∞
P∞
j=−∞ | ψj |< ∞ ensures the infinite sum in (2) converges
1 The condition
62/106
Time Series Analysis
Stationary Processes: Linear Process
Proposition
Let
P∞Yt be a stationary series with mean 0 and autocovariance function γy . If
j=−∞ | ψj |< ∞, then the time series
∞
X ∞
X
Xt = ψj Yt−j = ψj B j Yt = ψ(B)Yt (3)
j=−∞ j=−∞
63/106
Time Series Analysis
Stationary Processes: Properties
64/106
Time Series Analysis
Stationary Processes: Properties
65/106
Time Series Analysis
Stationary Processes: Properties
66/106
Time Series Analysis
Stationary Processes: Properties
67/106
Time Series Analysis
Stationary Processes: Properties
1
√ X | h |
(X n − µ) n ∼ AN(0, 1− γ(h))
n
|h|<n
√
2 In this case, the confidence Intervals for µ are given X n ± Z1−α/2 √v̂n ,
P |h|
where v̂ = |h|<√n 1 − √ n
γ̂(h). For ARMA processes, this is a good
approximation of v for large n.
Example
What are the approximate 95% confidence intervals for the mean of AR(1)?
"AN" means Asymptotically Normal
68/106
Time Series Analysis
Stationary Processes: Properties
γ̂(h)
ρ̂(h) =
γ̂(0)
1 For h slightly smaller than n, the estimate of γ(h) and ρ(h) are
unreliable. Since there few pairs (Xt+h , Xt ) available (only one if h=n-1).
A practical guide is to have at least n=50 and h ≤ n/4
69/106
Time Series Analysis
Stationary Processes: Properties
W
ρ̂ = (ρ̂(1), . . . , ρ̂(k))0 ∼ AN(ρ,
)
n
where ρ = (ρ(1), . . . , ρ(k)), and W is the covariance matrix whose (i, j)
element is given by Bartlett’s formula:
∞
X
wij = {ρ(k + i) + ρ(k − i) − 2ρ(i)ρ(k)} × {ρ(k + j) + ρ(k − j) − 2ρ(j)ρ(k)}
k=1
1 IID Noise?
70/106
Time Series Analysis
Stationary Processes: Properties ACF
71/106
Time Series Analysis
Stationary Processes: Forecasting
Forecasting Pn Xn+h
Now we consider the problem of predicting the values Xn+h ; h > 0. Let’s
assume Xt is a stationary time series with µ and γ.
The goal is to find the linear combination of 1, Xn , . . . , X1 that minimizes the
mean squared error. We will denote
Pn Xn+h = a0 + a1 Xn + · · · + an X1
E ((Xn+h − a0 − a1 Xn − · · · − an X1 )2 )
72/106
Time Series Analysis
Stationary Processes: Forecasting
Forecasting Pn Xn+h
We can show that Pn Xn+h is given by:
n
X
Pn Xn+h = µ + ai (Xn+1−i − µ)
i=1
and
E ((Xn+h − Pn Xn+h )2 ) = γ(0) − a 0n γn (h)
where a n satisfies
Γna n = γn (h)
. . . γ(n − 1)
γ(0) γ(1)
γ(1) γ(0) . . . γ(n − 2)
where a n = (a1 , . . . , an )0 , Γn = .. .. .. ;
..
. . . .
γ(n − 1) γ(n − 2) . . . γ(0)
γn (h) = (γ(h), γ(h + 1), . . . , γ(h + n − 1))0 ; and a0 = µ(1 − ni=1 ai )
P
73/106
Time Series Analysis
Stationary Processes: Forecasting
Prediction Algorithms
The following prediction algorithms use the idea of one-step predictor Pn Xn+1
based on n previous observations would be used to calculate Pn+1 Xn+2 . This
said to be recursive.
1 The Durbin-Levinson Algorithm (well suited to forecasting AR(p))
2 The Innovations Algorithm (well suited to forecasting MA(q))
74/106
Time Series Analysis
ARMA(p,q) models
ARMA(p, q) process
Xt is an ARMA(p, q) process if Xt is stationary and if for every t,
75/106
Time Series Analysis
ARMA Models
We can write:
φ(B)Xt = θ(B)Zt
where φ(.) and θ(.) are the pth and qth degree polynomials:
φ(z) = 1 − φ1 z − · · · − φp z p
and
θ(z) = 1 + θ1 z + · · · + θq z q
and B is the backward shift operator B j Xt = Xt−j , j = 0, ±1, ...
76/106
Time Series Analysis
ARMA models
ARMA(1, 1) process
Xt is an ARMA(1, 1) process if Xt is stationary and if for every t,
Xt − φ1 Xt−1 = Zt + θ1 Zt−1
where Zt ∼ WN(0, σ 2 )
77/106
Time Series Analysis
ARMA models
An
P∞ARMA(p,q) process Xt P is causal if there exist constant ψj such that
∞
j=0 | ψj |< ∞ and Xt = j=0 ψj Zt−j , for all t. Causality is equivalent
to the condition:
78/106
Time Series Analysis
ARMA models
∞
X
γX (h) = σ 2 ψj ψj+|h|
j=0
ψ0 = 1; ψj = (φ + θ)φj−1 , j ≥1
79/106
Time Series Analysis
ARMA models
80/106
Time Series Analysis
ARMA models
81/106
Time Series Analysis
Modeling ARMA models
Examples with R
82/106
Time Series Analysis
Modeling ARMA models (Chapter 5)
83/106
Time Series Analysis
Modeling ARMA models (Chapter 5)
84/106
Time Series Analysis
Modeling ARMA models (Chapter 5)
When p and q are known and the time series is mean-corrected, good
estimators of vectors φ and θ can be found imaging the data to a stationary
Gaussian time series and maximizing the likelihood with respect to the
p + q + 1 parameters ( φ1 , . . . , φp , θ1 , . . . , θq and σ 2 ). We can estimate these
parameters using:
85/106
Time Series Analysis
Modeling ARMA models (Chapter 5)
Properties
The Burg’s algorithm usually gives higher likelihoods than the
Yule-Walker equations for AR(p)
For pure MA processes, the Innovations algorithm usually gives higher
likelihoods than the Hannan-Rissanen procedure
For ARMA models, the Hannan-Rissanen is more successful in finding
causal models
These preliminary estimations are required for initialization of the likelihood
maximization.
86/106
Time Series Analysis
Modeling ARMA models (Chapter 5)
Yule-Walker Estimation
The Sample Yule-Walker equations are:
and
σ̂ 2 = γ̂(0) 1 − ρ̂0p R̂p−1 ρ̂p
87/106
Time Series Analysis
Estimation ARMA models (Chapter 5)
MA(q) Estimation
q Pj−1
2
θ̂mi
Confidence intervals of θj are θ̂mj ± z1−α/2 i=0
n
88/106
Time Series Analysis
Estimation ARMA Models (Chapter 5)
S(φ̂, θ̂)
σ̂ 2 =
n
Pn (Xj −X̂j )2
where S(φ̂, θ̂) = j=1 rj−1
,
and φ̂, θ̂ are the values of φ, θ that minimize:
n
X
l(φ, θ) = ln n−1 S(φ, θ) + n−1 ln rj−1
j=1
89/106
Time Series Analysis
ARMA Models
Order selection
The Akaike Information criterion bias-corrected (AICC) is defined as follows:
2(p + q + 1)n
AICC := −2 ln(LX (β, SX (β)/n) +
n−p−q−2
It was designed to be an approximately unbiased estimate of the
Kullback-Leibler index of the fitted model relative to the true model.
We select p and q values for our fitted model to be those that minimize
AICC (β̂).
90/106
Time Series Analysis
Modeling ARMA models
Paramater Redundancy
Consider a white noise process Xt = Zt . We can write this as
0.3Xt−1 = 0.3Zt−1
Xt − 0.3Xt−1 = Zt − 0.3Zt−1
91/106
Time Series Analysis
Forecasting ARMA models
92/106
Time Series Analysis
Forecasting ARMA models
Examples
For AR(1): Pn Xn+1 = φXn
For AR(1) with nonzero-mean: Pn Xn+h = µ + φh (Xn − µ)
For AR(p): if n>p then Pn Xn+1 = φ1 Xn + · · · + φp Xn+1−p
Pmin(n,q)
For MA(q): Pn Xn+1 = j=1 θnj (Xn+1−j − X̂n+1−j )
For ARMA(p,q): if n > m = max(p, q) then for all h ≥ 1
p q
X X
Pn Xn+h = φi Pn Xn+h−i + θn+h−1,j (Xn+h−j − X̂n+h−j )
i=1 j=h
93/106
Time Series Analysis
ARIMA models
We have already seen the importance of the class of ARMA models for
representing stationary time series. A generalization of this class, which
includes a wide range of nonstationry series, is provided by the ARIMA
(AutoRegressive Integrated Moving Average)models.
Definition
If d is a nonnegative integer, then Xt is an ARIMA(p,d,q) process if
Yt := (1 − B)d Xt
94/106
Time Series Analysis
ARIMA models
Example
Consider Xt is an ARIMA(1,1,0) process of for φ ∈ (−1, 1),
95/106
Time Series Analysis
ARIMA models
96/106
Time Series Analysis
ARIMA models
97/106
Time Series Analysis
ARIMA models
98/106
Time Series Analysis
ARIMA models
99/106
Time Series Analysis
SARIMA models
We have already seen the how difference the series Xt at lag s is convenient
way of eliminating a seasonal component of period s.
Definition
If d and D are nonnegative integers, then Xt is a seasonal
ARIMA(p, d, q)x(P, D, Q)s process with period s if the difference series
Yt = (1 − B)d (1 − B s )D Xt is a causal ARMA process defined by
The process Yt is causal if and only if φ(z) = 0 and Φ(z) = 0 for | z |> 1
100/106
Time Series Analysis
SARIMA models
101/106
Time Series Analysis
Forecasting Techniques
102/106
Time Series Analysis
Regression with ARMA errors
Yt = βXt + Rt where,
Rt = φ1 Rt−1 + · · · + φp Rt−p − θ1 zt−1 − · · · − θq zt−q + zt
103/106
Time Series Analysis
STL decomposition
104/106
Time Series Analysis
Financial time series models
105/106
Time Series Analysis
ARCH model
The idea of the ARCH (autoregressive conditional
heteroscedasticity) model is to incorporate the sequence ht in the
model by:
p
Zt = hT et , et ∼ IIDN(0, 1) (5)
ht is known as the volatility and related to the past values of Zt2
via the ARCH(p) model:
p
X
2
ht = α0 + αi Zt−i , (6)
i=1
The GARCH(p,q) (generalized ARCH) is given by:
p
X q
X
2
ht = α 0 + αi Zt−i + βi ht−i , (7)
i=1 i=1
α0 > 0 and αi ≥ 0, βi ≥ 0.
106/106
Time Series Analysis