TSNotes 2
TSNotes 2
TSNotes 2
• Univariate time series models are class of specifications where one attempts to
model and to predict financial variables using only information contained in
their own past values and possibly current and past values of an error term.
• This practice can be contrasted with structural models, which are multivariate in
nature, and attempt to explain changes in a variable by reference to the
movements in the current or past values of others (explanatory) variables. Time
series models may be useful when a structural model is inappropriate.
• In order to define, estimate and use ARIMA models, we first need to specify the
notation and to define several important concepts.
2
Some Notation and Concepts
i.e. the probability measure for the sequence {yt} is the same as that for {yt+m}
m.
• So if the process is covariance stationary, all the variances are the same and all
the covariances depend on the difference between t1 and t2. The moments
, s = 0,1,2, ...
are known as the covariance function.
• The covariances, s, are known as autocovariances since they are the
covariances of y with its own previous values.
• However, the value of the autocovariances depend on the units of measurement
of yt. It is thus more convenient to use the autocorrelations which are the
autocovariances normalised by dividing by the variance:
, s = 0, 1, 2, .....
4
Correlogram for UK HP Data
• Thus the autocorrelation function will be zero apart from a single peak of 1
at s = 0. approximately N(0, 1/T) where T = sample size.
6
Joint Hypothesis Tests
• We can also test the joint hypothesis that all m of the k correlation coefficients
are simultaneously equal to zero using the Q-statistic developed by Box and
Pierce:
• However, the Box Pierce test has poor small sample properties, so a variant
has been developed, called the Ljung-Box statistic:
An ACF Example
• Question:
Suppose that a researcher had estimated the first 5 autocorrelation coefficients
using a series of length 100 observations, and found them to be (from 1 to 5):
0.207, -0.013, 0.086, 0.005, -0.022.
Test each of the individual coefficient for significance, and use both the Box-
Pierce and Ljung-Box tests to establish whether they are jointly significant.
• Solution:
A coefficient would be significant if it lies outside (-0.196, +0.196) at the 5%
level, so only the first autocorrelation coefficient is significant.
Q=5.09 and Q*=5.26
Compared with a tabulated 2(5)=11.1 at the 5% level, so the 5 coefficients
are jointly insignificant.
8
Moving Average Processes
• The simplest class of time series model is that of the moving average process
• Let ut (t=1,2,3,...) be a sequence of independently and identically distributed
(iid) random variables with E(ut)=0 and Var(ut)= 2, then
yt = + ut + 1ut-1 + 2ut-2 + ... + qut-q
10
Example of an MA Problem
11
Solution
Var(Xt) = E[Xt-E(Xt)][Xt-E(Xt)]
= E[(Xt)(Xt)] (E(Xt) = 0)
= E[(ut + 1ut-1+ 2ut-2)(ut + 1ut-1+ 2ut-2)]
= E[ +cross-products]
12
Solution (cont’d)
So Var(Xt) = 0= E [ ]
=
=
13
Solution (cont’d)
2 = E[Xt-E(Xt)][Xt-2-E(Xt-2)]
= E[Xt][Xt-2]
= E[(ut +1ut-1+2ut-2)(ut-2 +1ut-3+2ut-4)]
= E[( )]
=
3 = E[Xt-E(Xt)][Xt-3-E(Xt-3)]
= E[Xt][Xt-3]
= E[(ut +1ut-1+2ut-2)(ut-3 +1ut-4+2ut-5)]
=0
So s = 0 for s > 2.
14
Solution (cont’d)
(iii) For 1 = -0.5 and 2 = 0.25, substituting these into the formulae above
gives 1 = -0.476, 2 = 0.190.
15
ACF Plot
16
Autoregressive Processes
• or
or where .
17
18
Wold’s Decomposition Theorem
• States that any stationary series can be decomposed into the sum of two
unrelated processes, a purely deterministic part and a purely stochastic
part, which will be an MA().
where,
19
20
Sample AR Problem
21
Solution
22
Solution (cont’d)
23
Solution (cont’d)
Var(yt) = E[yt-E(yt)][yt-E(yt)]
but E(yt) = 0, since we are setting = 0.
Var(yt) = E[(yt)(yt)]
= E[ ]
= E[
= E[
=
=
=
24
Solution (cont’d)
(iii) Turning now to calculating the acf, first calculate the autocovariances:
1 = Cov(yt, yt-1) = E[yt-E(yt)][yt-1-E(yt-1)]
Since a0 has been set to zero, E(yt) = 0 and E(yt-1) = 0, so
1 = E[ytyt-1]
1 = E[ ]
= E[
=
25
Solution (cont’d)
26
Solution (cont’d)
• If these steps were repeated for 3, the following expression would be
obtained
3 =
s =
27
Solution (cont’d)
0 =
1 = 2 =
3 =
…
s =
• Note that use of the Yule-Walker Equations would have given the same answer.
28
The Partial Autocorrelation Function (denoted kk)
• So kk measures the correlation between yt and yt-k after removing the effects
of yt-k+1 , yt-k+2 , …, yt-1 .
29
• The pacf is useful for telling the difference between an AR process and an
ARMA process.
• In the case of an AR(p), there are direct connections between yt and yt-s only
for s p.
30
ARMA Processes
where
and
or
with
31
32
Some sample acf and pacf plots
for standard processes
The acf and pacf are not produced analytically from the relevant formulae for a model of that
type, but rather are estimated using 100,000 simulated observations with disturbances drawn
from a normal distribution.
ACF and PACF for an MA(1) Model: yt = – 0.5ut-1 + ut
33
34
ACF and PACF for a slowly decaying AR(1) Model:
yt = 0.9yt-1 + ut
35
36
ACF and PACF for a more rapidly decaying AR(1)
Model with Negative Coefficient: yt = -0.5yt-1 + ut
37
38
ACF and PACF for an ARMA(1,1):
yt = 0.5yt-1 + 0.5ut-1 + ut
39
• Box and Jenkins (1970) were the first to approach the task of estimating an
ARMA model in a systematic manner. Their approach was a practical and
pragmatic one, involving 3 steps:
Step 1. Identification
Step 2. Estimation
Step 1:
- Involves determining the order of the model.
- Use of graphical procedures (e.g . plotting the acf and pacf)
40
Building ARMA Models
- The Box Jenkins Approach (cont’d)
Step 2:
- Estimation of the parameters of the model specified in step 1.
- Can be done using least squares or maximum likelihood depending
on the model.
Step 3:
- Model checking – i.e. determining whether the model specified and
estimated is adequate.
41
• Identification would typically not be done using graphical plots of the acf
and pacf.
• Reasons:
- variance of estimators is inversely proportional to the number of degrees of
freedom.
- models which are profligate might be inclined to fit to data specific features
• This gives motivation for using information criteria, which embody 2 factors
- a term which is a function of the RSS
- some penalty for adding extra parameters
42
Information Criteria for Model Selection
• The information criteria vary according to how stiff the penalty term is.
• The three most popular criteria are Akaike’s (1974) information criterion
(AIC), Schwarz’s (1978) Bayesian information criterion (SBIC), and the
Hannan-Quinn criterion (HQIC).
43
44
Forecasting/ Prediction
• Why forecast?
Forecasts are made essentially because they are useful! Financial decisions
often involve a long-term commitment of resources, the returns to which will
depend upon what happens in the future. In this context, the decisions made
today will reflect forecasts of the future state of the world, and the more
accurate those forecasts are, the more utility (or money!) is likely to be
gained from acting on them.
45
• Say we have some data - e.g. monthly FTSE returns for 120 months:
1990M1 – 1999M12. We could use all of it to build the model, or keep
some observations back:
• A good test of the model since we have not used the information from
1999M1 onwards when we estimated the model parameters.
46
How to produce forecasts
• The two simplest naïve forecasting “methods” (Box 6.3, on page 288)
1. Assume no change : ft.s = yt
2. Forecasts are the long term average ft.s =
47
• Structural models
e.g. y = X + u
=
But what are etc.? We could use , so
= !!
48
Models for Forecasting (cont’d)
• Models include:
• simple unweighted averages
• ARMA models
• Non-linear models – e.g. threshold models, GARCH, bilinear models, etc.
49
50
Forecasting with MA Models
51
ft, 4 = E(yt+4 t ) =
52
Forecasting with AR Models
53
54
Forecasting in EViews
• Suppose that the AR(2) model selected for the house price percentage
changes series were estimated using observations Feb 1991 ~ Dec 2010,
leaving 29 remaining observations to construct forecasts for and to test
forecast accuracy (i.e. for the period Jan 2011 ~ May 2013)
55