STR Fin Etrics Slides4
STR Fin Etrics Slides4
Simon Trimborn
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 1 / 50
Outline for Week 4
Introduction
Stationarity and Autocorrelation
AR Processes
MA and ARMA Processes
Integrated Processes
Forecasting
Unit root testing
Exercises
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 2 / 50
Please register your attendance
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 3 / 50
Time Series Analysis
Financial time series analysis (TSA) is concerned with modelling, estimating, analyzing and
forecasting the behaviour of financial variables over time.
Distinguish univariate time series analysis, which tries to forecast individual time series
from its own past, from multivariate time series analysis, where different time series are
explained by their own and each other’s past.
A time series {yt , t = 1, 2, . . . , T } is a collection of subsequent observations on a particu-
lar variable.
We will focus on univariate TSA
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 4 / 50
Purpose
yt = ϕyt −1 + ϵt ;
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 5 / 50
Example: Dow Jones Index
Time period: 02.01.2000 until 26.07.2022
30000
25000
20000
15000
10000
0 4 8 2 6 0
200 200 200 201 201 202
Date
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 6 / 50
Log return of Dow Jones Index
0.05
0.00
0.05
0.10
0 4 8 2 6 0
200 200 200 201 201 202
Date
E (yt ) = µ,
var(yt ) = γ0 = σ 2 ,
cov(yt , yt −k ) = γk ,
cov(yt , yt −k ) γk
τk = p = , k = 0, 1, . . .
var(yt )var(yt −k ) γ0
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 9 / 50
White Noise I
Important example of a stationary process: white noise, with zero mean and zero autoco-
variances:
E (ϵt ) = 0,
var(ϵt ) = σ2 ,
cov(ϵt , ϵt −k ) = 0, k = 1, 2, . . .
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 10 / 50
White Noise II
White noise
3 4
3
2
2
1
1
0
0
1 1
2 2
3
3 0 200 400 600 800 1000
0 200 400 600 800 1000
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 11 / 50
The Autocorrelation Function (ACF)
From a given time series {y1 , . . . , yT }, we may estimate (under the assumption of station-
arity) µ, γk , and τk by
T T
1 X 1 X γ
bk
µ
b= yt , γ
bk = (yt − ȳ )(yt −k − ȳ ), τk =
b .
T
t =1
T
t =k +1
γ
b0
This implies√that a sample autocorrelation is significantly different from zero if it lies outside
the ±1.96/ T interval.
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 12 / 50
Q-Statistics
∗
Qm ∼ χ2m under H0 : τ1 = . . . = τm = 0.
▶ Will reject under H1 : at least one τk , 1 ≤ k ≤ m is non-zero.
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 13 / 50
Partial ACF (PACF)
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 14 / 50
ACF / PACF for Dow Jones Index
Autocorrelation function of DJI
1.0
0.5
0.0
ACF
0.5
1.0
0 5 10 15 20 25 30 35
0.5
PACF
0.0
0.5
1.0
0 5 10 15 20 25 30 35
Lags
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 15 / 50
ACF / PACF for log returns Dow Jones Index I
Autocorrelation function of RDJI
1.0
0.5
0.0
ACF
0.5
1.0
0 5 10 15 20 25 30 35
0.5
PACF
0.0
0.5
1.0
0 5 10 15 20 25 30 35
Lags
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 16 / 50
ACF / PACF for log returns Dow Jones Index II
Autocorrelation function of RDJI
0.10
0.05
0.00
ACF
0.05
0.10
0 5 10 15 20 25 30 35
0.05
PACF
0.00
0.05
0.10
0 5 10 15 20 25 30 35
Lags
σ2
var(yt ) = .
1 − ϕ21
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 18 / 50
ACF / PACF AR(1)
Autocorrelation function of AR(1) process
1.0
0.5
0.0
ACF
0.5
1.0
0 5 10 15 20 25 30 35
0.5
PACF
0.0
0.5
1.0
0 5 10 15 20 25 30 35
Lags
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 19 / 50
ACF of Stationary AR(1)
yt = µ + ϕ1 yt −1 + ϵt .
First-order autocovariance:
so τ1 = γ1 /γ0 = ϕ1 .
For second-order autocovariance, use backward substitution:
yt = ϕ1 yt −1 + µ + ϵt
= ϕ21 yt −2 + ϕ1 (µ + ϵt −1 ) + µ + ϵt ,
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 20 / 50
Random Walk and Explosive Process
E (yt ) = y 0 + µt ,
var(yt ) = σ2 t ,
p
corr(yt , yt −k ) = (t − k )/t .
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 21 / 50
ACF / PACF Random Walk
Autocorrelation function of random walk
1.0
0.5
0.0
ACF
0.5
1.0
0 5 10 15 20 25 30 35
0.5
PACF
0.0
0.5
1.0
0 5 10 15 20 25 30 35
Lags
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 22 / 50
AR(p) Models
yt = µ + ϕ1 yt −1 + . . . + ϕp yt −p + ϵt .
ϕ1 + . . . + ϕp < 1.
The acf gradually approaches zero, not necessarily with a clear pattern.
Partial autocorrelation function (pacf): τkk = 0, k > p. Can be used to select p!
All autoregressive models are linear regressions, so can be estimated by OLS.
After estimation, residuals should be tested for residual autocorrelation (Breusch-Godfrey
test, Q-tests). If significant, more lags should be added.
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 23 / 50
Where do we stand?
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 24 / 50
MA and ARMA Models
Alternative time series models are the moving average model of order q, MA(q):
yt = µ + ϵt + θ1 ϵt −1 + . . . + θq ϵt −q ,
yt = µ + ϕ1 yt −1 + . . . + ϕq yt −p + ϵt + θ1 ϵt −1 + . . . + θq ϵt −q .
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 25 / 50
ACF / PACF MA(1)
Autocorrelation function of MA(1) process
1.0
0.5
0.0
ACF
0.5
1.0
0 5 10 15 20 25 30 35
0.5
PACF
0.0
0.5
1.0
0 5 10 15 20 25 30 35
Lags
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 26 / 50
ACF / PACF White Noise
Autocorrelation function of white noise
1.0
0.5
0.0
ACF
0.5
1.0
0 5 10 15 20 25 30 35
0.5
PACF
0.0
0.5
1.0
0 5 10 15 20 25 30 35
Lags
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 27 / 50
Integrated Processes
Many financial time series do not seem stationary, displaying a trend in mean, and a vari-
ance increasing with the level. The latter is usually solved by a log-transformation, but then
the series may still be non-stationary.
yt is called integrated of order 1, or I (1), if it is non-stationary, while ∆yt = yt − yt −1 is
stationary. Such processes have acfs close to one, which die out very slowly.
Why integrated?: prior values are ‘integrated’ into other series
Note that if yt = log Pt , with Pt an asset price, then ∆yt is a return. It seems reasonable to
assume stationarity of financial returns and growth rates. This implies that prices are I (1)
and hence nonstationary.
Informal way to check stationarity: inspect the plot and the correlogram of the series. If
the plot displays a tendency to revert to a constant mean, with a more or less constant
variance, and the correlogram converges to zero “exponentially fast”, then stationarity may
be assumed.
A formal test will be introduced later.
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 28 / 50
Properties of Integrated Series
No mean-reversion. Some financial theories (purchasing power parity, term structure mod-
els) imply that certain (combinations of) series should revert to a constant mean.
Persistence of shocks. For I (1) processes, the effect of shocks ϵt on yt +s does not die out
as s increases; for stationary series it will decay exponentially.
Increasing forecast intervals. For I (0) time series, 95% forecast interval for yt +s converges
with horizon s; for an I (1) process, forecasts intervals keep increasing.
Spurious regressions. When regressing two integrated time series onto each other, the R 2
and t-statistic may become large even if they are totally independent. This is avoided if we
regress ∆yt on ∆xt .
Asymptotic properties of estimators and tests. In time-series regressions, t- and F -statistics
have asymptotic t- or F -distributions under the null for stationary time series. In regressions
with I (1) series, different distributions may occur.
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 29 / 50
ARIMA Models
Following patterns for the acf and pacf of AR, MA and ARMA processes:
▶ AR(p): geometrically decaying acf, pacf is zero after p lags;
▶ MA(q): acf is zero after q lags, geometrically decaying pacf;
▶ ARMA(p, q): geometrically decaying acf and pacf.
If yt ∼ I (1), and ∆yt has an ARMA structure, then yt follows an autoregressive-integrated-
moving average or ARIMA(p, d , q) model with d = 1.
General d would imply repeated differencing ∆d yt = ∆ · · · ∆yt to get stationarity, but we
usually only consider d = 1 or d = 0; ARIMA(p, 0, q) = ARMA(p, q).
It is often hard to infer the orders p and q from the correlogram. Therefore, try out model
with low orders (e.g., ARMA(1,1)), and test whether it needs to be extended.
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 30 / 50
Where do we stand?
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 31 / 50
Model Selection Criteria
If more than one model passes diagnostic tests (e.g., both AR(1) and AR(3)), choice is
often based on Akaike information criterion (AIC) or Bayesian information criterion (BIC),
with k the number of parameters:
T
!
1 X 2k
AIC = ln bϵ2t + ,
T T
t =1
T
!
1 X k ln T
BIC = ln bϵ2t + .
T T
t =1
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 32 / 50
AIC & BIC Differentiation I
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 33 / 50
AIC & BIC Differentiation II
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 34 / 50
AIC & BIC Differentiation III
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 35 / 50
AIC/BIC for ARMA models for RDJI
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 36 / 50
Forecasting Terminology
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 37 / 50
One-Step-Ahead and Multi-Step Forecasts
yt +1 = µ + ϕ1 yt + . . . + ϕp yt −p+1 + ϵt +1 ,
yt ,1 = µ + ϕ1 yt + . . . + ϕp yt −p+1 .
b
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 38 / 50
Remarks
p
Possible to construct forecast standard errors SEt ,s = var(yt +s |Ωt ), hence 95% forecast
intervals
yt ,s ± 1.96 × SEt ,s .
b
▶ For stationary processes, forecast interval converges to µ ± 1.96 × σ as s → ∞.
For integrated processes, first forecast stationary ∆yt +s , and then use
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 39 / 50
Forecast log returns Dow Jones Index
0.05
0.00
0.05
0.10
0 4 8 2 6 0
200 200 200 201 201 202
Date
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 40 / 50
Forecast Dow Jones Index
30000
25000
20000
15000
10000
0 4 8 2 6 0
200 200 200 201 201 202
Date
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 41 / 50
Forecast Evaluation
Forecast accuracy measured by mean squared error (MSE) or mean absolute error (MAE):
T T
1 X 1 X
MSE = bϵ2t , MAE = |bϵt | ,
T − T1 T − T1
t =T1 +1 t =T1 +1
ϵt = yt − b
with b yt .
2 2
Forecasts from two competing models can be compared by regressing b ϵ1t − bϵ2t on a con-
stant. Under H0 of equal predictive ability, its t statistic (using HAC standard errors) is
asymptotically N (0, 1) (Diebold-Mariano test).
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 42 / 50
Where do we stand?
Models ✓
Choice of models ✓
Forecast ✓
Now:
▶ Unit root (integrated time series) and how to test for it
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 43 / 50
Unit Root Tests
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 44 / 50
The Dickey-Fuller Test
In AR(1) model
yt = ϕyt −1 + ϵt ,
we wish to test the unit root null hypothesis against a one-sided alternative:
H0 : ϕ = 1, H1 : ϕ < 1 .
Under H0 , yt is a random walk, hence I (1); under the alternative, yt is stationary (provided
ϕ > −1).
Hence, we test for H0 : yt ∼ I (1) against H1 : yt ∼ I (0).
Dickey-Fuller test is based on t-statistic for ψ = ϕ − 1 = 0 in (rewritten) AR(1):
∆yt = ψ yt −1 + ϵt .
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 45 / 50
The Dickey-Fuller Distribution
∆yt = ψ yt −1 + µ + ϵt ,
in which case we call the t-statistic τµ . Relevant if we want to allow for a constant non-zero
mean E (yt ) = −µ/ψ under H1 .
If we want to test a random walk with drift against a trend-stationary alternative, the relevant
regression is
∆yt = ψ yt −1 + µ + λt + ϵt ,
and the t-statistic is called ττ , with 5% critical value ττ,0.05 = −3.41.
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 46 / 50
Choice of Model
▶ The τ
µ test is relevant for series such as interest rates and real exchange rates, where we do
not expect a linear trend (under H0 or H1 ).
▶ Many other financial time series, including (log-) asset prices, display a trend ⇒ ττ .
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 47 / 50
The Augmented Dickey-Fuller Test
yt = ϕ1 yt −1 + . . . + ϕp yt −p + ϵt .
where ψ = ϕ1 + . . . + ϕp − 1, and p∗ = p − 1.
Interpretation of H0 and H1 , role of the constant and trend, and critical values are the same
as AR(1) model.
p is unknown:
▶ must be large enough to avoid autocorrelation, but not too large (test power);
▶ chosen based on AIC, BIC; usually packages have built-in options (also p-values).
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 48 / 50
ADF unit root tests on RDJI
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 49 / 50
Exercises
Simon Trimborn (Introduction to Time-Series Analysis) Financial Econometrics Executive MSc in International Finance (MIF) 50 / 50