Part 3
Part 3
⊲ MATH11131
Time Series
Part 3: Financial
VARMA models
GARCH models
Factor models
Ioannis Papastathopoulos
School of Mathematics, University of Edinburgh
1 / 29
MATH11131 Part 3: Financial Time
Series
⊲ VARMA models
Models for multiple time series
Fitting VARMA models in R–returns
of EU markets
Fitting VARMA models in R
GARCH models
Factor models
VARMA models
2 / 29
Models for multiple time series
ARMA modelling may be extended to multivariate cases, but is much more complicated.
MATH11131 Part 3: Financial Time
Series One simple case is the vector autoregressive (VAR), where with Yt a k × 1 vector,
VARMA models
⊲ Models for multiple time series
we have p
Fitting VARMA models in R–returns iid
X
of EU markets
Fitting VARMA models in R
Yt = µk×1 + Φj Yt−j + wt , wt ∼ N (0k×1 , Σk×k ),
GARCH models j=1
Stochastic Volatility models
Factor models
where Φ1 , . . . , Φp are k × k matrices and Φp 6= 0; such models have a lot of parameters.
The VMA models can be defined likewise.
This extends to the vector autoregressive moving average (VARMA) model,
p p
iid
X X
Yt = µk×1 + Φj Yt−j + wt + Θj wt−j wt ∼ N (0k×1 , Σk×k )
j=1 j=1
3 / 29
Fitting VARMA models in R–returns of EU markets
0.04
VARMA models
Models for multiple time series
0.00
Fitting VARMA models in
⊲
DAX
R–returns of EU markets
−0.04
Fitting VARMA models in R
GARCH models
0.04 −0.08
Stochastic Volatility models
Factor models
0.00
SMI
−0.04
−0.08
0.06
0.02
CAC
−0.02
−0.06
0.04
FTSE
0.00
−0.04
Time
4 / 29
Fitting VARMA models in R
Stochastic Volatility models > VAR.model <- VARMA(returns) ## first calculate returns from data
Factor models
Constant term:
Estimates: 0.0007532118 0.000823424 0.0005525078 0.000473503
5 / 29
MATH11131 Part 3: Financial Time
Series
VARMA models
⊲ GARCH models
Motivation
GARCH models
(G)ARCH theory
FTSE
FTSE returns
Weaknesses
Some extensions
Factor models
GARCH models
6 / 29
Motivation
Many time series show changes in the variance as well as in the mean; this is particularly
MATH11131 Part 3: Financial Time
prominent in financial time series, but arises in many other contexts also.
Series
However (stationary, invertible, causal) Gaussian (V)ARMA models satisfy
VARMA models
GARCH models
⊲ Motivation
GARCH models
Yt | Y−t = y−t ∼ N (µ + Σt,−t Σ−1
−t (y−t − µ), Σt,t − Σ Σ−1
Σ
t,−t −t −t,t ), 1
(G)ARCH theory
FTSE
FTSE returns in an obvious notation: the conditional variance of Yt given the preceding observations
Weaknesses
Some extensions Y−t does not depend on their values, and so does not vary with time.
Stochastic Volatility models
This prompts the search for models that do allow such dependence
Factor models
A prominent class of such models is the generalised autoreressive conditionally
heteroscedastic (GARCH) class, given by
m r
iid
X X
Y t = σt ε t , σt2 = α0 + 2
αj Yt−j + 2
βj σt−j , εt ∼ N (0, 1).
j=1 j=1
7 / 29
GARCH models
GARCH models
Motivation
⊲ GARCH models Lemma 1. A GARCH model has zero mean, and satisfies E(Yt | Ht−1 ) = 0; thus it is an
(G)ARCH theory
FTSE uncorrelated sequence: cor(Yt+h , Yt ) = 0. The quantity Yt is called a martingale
FTSE returns
Weaknesses difference.
Some extensions
8 / 29
(G)ARCH theory
VARMA models
– If 0 ≤ α1 < 1, then {Yt } is white noise and its unconditional distribution is
GARCH models symmetrically distributed around zero. This unconditional distribution is leptokurtic
Motivation
GARCH models (has heavier tails than the normal).
⊲ (G)ARCH theory
FTSE
FTSE returns
Weaknesses
– If in addition 3α12 < 1, then the process follows {Yt2 } follows a causal AR(1) model
Some extensions |h|
Stochastic Volatility models
with ACF ρh = α1 .
Factor models
– If 3α12 ≥ 1 but α1 < 1, then {Yt2 } is strictly stationary with infinite variance.
9 / 29
FTSE
GARCH models
Motivation
GARCH models
(G)ARCH theory
⊲ FTSE
FTSE returns
6000
Weaknesses
Some extensions
Factor models
5000
FTSE Index
4000
3000
Time
10 / 29
FTSE returns
GARCH models
Motivation
GARCH models
(G)ARCH theory
FTSE
⊲ FTSE returns
Weaknesses
Some extensions
4
Factor models
2
FTSE returns (%)
0
−2
−4
Time
11 / 29
Weaknesses
GARCH models
– financial markets react more strongly to negative shocks, but in a GARCH model σt
Motivation
GARCH models
reacts identically to positive and negative shocks;
(G)ARCH theory
FTSE
FTSE returns
⊲ Weaknesses
– they react slowly to large shocks in the return, so may over-predict volatility;
Some extensions
– they may describe the second-order properties, but they are not based on a
financial/economic theory so give no insight into why a series behaves as it does;
12 / 29
Some extensions
|Yt−1 |
GARCH models
2 2α
(G)ARCH theory
σt = σt−1 exp α∗ + γ + θ sign(Yt−1 )
FTSE
FTSE returns σt−1
Weaknesses
⊲ Some extensions
σt2 = α0 + β1 σt−1
2 2
+ (1 − β1 ) Yt−1 ,
13 / 29
MATH11131 Part 3: Financial Time
Series
VARMA models
GARCH models
Factor models
14 / 29
Parameter- and observation-driven models
Factor models
–
– ARCH(m) model with µt = 0, σt2 = α0 + α1 yt−12 2
+ · · · + αp yt−m ;
– AR(1)-ARCH(1) model, with µt = µ + φ(yt−1 − µ), σt2 = α0 + α1 (yt−1 − µ)2 .
Three reasons to like observation-driven models for volatility:
– the likelihood is easily computed, so estimation, testing, model-checking are easy;
– finance theory is often specified through one-step-ahead movements, defined with
respect to economic agents’ information;
– they parallel the very successful ARMA-type models.
15 / 29
Parameter driven models
Factor models – have simpler representations in continuous time (e.g., as diffusions that satisfy
suitable SDEs), which makes them natural in finance where much theory is based on
stochastic differential equations;
but parameter-driven models don’t have simple forms for their density f (yt | Ht ), so
can’t easily write down likelihood . . . so inference becomes more difficult;
Consider simplest such model, based on treatment in Kim, Shephard and Chib (1998),
Review of Economic Studies, 351–393.
16 / 29
Simple stochastic volatility model
GARCH models
Factor models
1 − γ1
17 / 29
Simple stochastic volatility model
GARCH models
– likelihood inference can be replaced by quasi-likelihood inference using the relation
Stochastic Volatility models
Parameter- and observation-driven
log Yt2 = ht + ε2t , where (with εt normal), we have E(log ε2t ) = −1.27 and
models
Parameter driven models
var(log ε2t ) = 4.93, but this doesn’t work well;
Simple stochastic volatility model
⊲ Simple stochastic volatility model – otherwise we can use Bayesian inference and Markov chain Monte Carlo
Bayesian inference
Markov chain Monte Carlo
Example: AR(1) with measurement (MCMC) to estimate the time series {ht}.
error
Full conditional densities
AR(1) with measurement error
Comments – Next few slides explain MCMC and Bayesian inference in the context of an AR(1)
MCMC for SV
Discussion model with measurement error, before returning to stochastic volatility modelling.
Factor models
18 / 29
Bayesian inference
19 / 29
Markov chain Monte Carlo
20 / 29
Example: AR(1) with measurement error
Suppose {ηt} follows an AR(1) process with parameter α and innovation variance τ 2,
MATH11131 Part 3: Financial Time
Series
VARMA models ind
GARCH models
and Yt | η1 , . . . , ηn ∼ N (ηt , σ 2 ), giving an AR(1) with measurement error.
Stochastic Volatility models
21 / 29
Full conditional densities
The full conditional densities π(θi | θ−i ) required to run a Gibbs sampler are:
MATH11131 Part 3: Financial Time
Series
n−1 n
VARMA models 1 1 X
2 1 X
GARCH models α | rest ∼ N (Bα /Aα , 1/Aα ), Aα = 2 + 2 η t , Bα = 2 ηt ηt−1 ,
Stochastic Volatility models
b τ t=1 τ t=2
Parameter- and observation-driven
n
models
( )
Parameter driven models n − 1 1 X
Simple stochastic volatility model τ 2 | rest ∼ IG c + ,d + (ηt − α ηt−1)2 ,
Simple stochastic volatility model
Bayesian inference
2 2 t=2
Markov chain Monte Carlo n
( )
Example: AR(1) with measurement
n 1 X
error
⊲ Full conditional densities σ 2 | rest ∼ IG e + , f + (yt − ηt)2 ,
AR(1) with measurement error 2 2 t=2
Comments
MCMC for SV
2 n−1
Discussion 1 α 1 αη2 y1 X
Factor models η1 | rest ∼ N (B1 /A1, 1/A1 ), A1 = 2 + 2 + 2 , B1 = 2 + 2 , ηt2,
a τ σ τ σ t=1
1 1 + α2 α(ηt−1 + ηt+1 )η2 y1
ηt | rest ∼ N (Bt /At, 1/At ), At = 2 + 2
, Bt = 2
+ 2, t 6= 1, n,
σ τ τ σ
1 1 αηn−1 yn
ηn | rest ∼ N (Bt /At, 1/At ), A n = 2 + 2 , Bn = 2
+ 2.
τ σ τ σ
The next slide shows the results when this is run for R = 10, 000 iterations, preceded by a
‘burn-in’ of length 200. I took a = 100, b = 10, c = d = e = f = 0.01, to give very vague
prior information. The R code for the entire examples, including pictures, is 60 lines.
22 / 29
AR(1) with measurement error
VARMA models
GARCH models
Factor models
Figure 1: Top left: the red line is the posterior mean for η, the grey band are 95% pointwise
credible intervals for η, the blue line is the true η. In the other panels the true value used is
shown by a vertical line.
23 / 29
Comments
Reversible jump MCMC algorithms (Green, 1995. Biometrika, 82, 711–732) can be
used when the number of underlying states is unknown.
24 / 29
MCMC for SV
Factor models A complete sweep involves cycling once through steps 1-4, and we must take
R = O(103 ) at least, perhaps R = O(106 ), so efficient coding and fast algorithms are
essential.
Computing the conditional densities here may be hard, or even impossible, but then we
can use Metropolis-Hastings steps, require only the densities up to a constant of
proportionality.
Once we have the output, we have to check convergence of the algorithm, and if
satisfied we then use the output to estimate the posterior density π(θ | y).
2
Many variant algorithms and procedures exist; this is just the simplest—see Kim et al. (1998).
25 / 29
Discussion
Factor models
26 / 29
MATH11131 Part 3: Financial Time
Series
VARMA models
GARCH models
⊲ Factor models
Factor models
Factor models
Factor models
27 / 29
Factor models
period t be
Assume that (ft )m×1 is a stationary process satisfying E(ft ) = µf , var(ft ) = Σf , and
that the {εit } are uncorrelated white noise series, but with var(εit ) = σi2 .
We can write
rt = αk×1 + βk×m ft + εt , t = 1, . . . , n,
in an obvious notation, and then have var(rt ) = β Σf β T + diag(σ12 , . . . , σk2 ).
28 / 29
Factor models
GARCH models
29 / 29