Upload
mark-preston
View
219
Download
0
Embed Size (px)
Citation preview
K. Ensor, STAT 4211
Spring 2005
Behavior of constant terms and general ARIMA models
• MA(q) – the constant is the mean• AR(p) – the mean is the constant divided by
the coefficients of the characteristic polynomial
• Random walk with drift – constant is the slope over time of the drift
• As we have seen – differencing can be used to derive a stationary process
• ARIMA models – r(t) is an ARIMA model if the first difference of r(t) is an ARMA model.
K. Ensor, STAT 4212
Spring 2005
Unit-root nonstationary
• Random walk p(t)=p(t-1)+a(t) p(0)=initial value a(t)~WN(0,2)• Often used as model for stock movement (logged stock
prices).• Nonstationary• The impact of past shocks never diminishes – “shocks
are said to have a permanent effect on the series”.• Prediction?
– Not mean reverting– Variance of forecast error goes to infinity as the
prediction horizon goes to infinity
K. Ensor, STAT 4213
Spring 2005
Time
0 50 100 150 200 250
05
10
15
Simulated Random Walk
0 5 10 15 20
01
02
03
04
05
06
0
Histogram
Simulated Random Walk Lag
AC
F
0 5 10 15 20
-1.0
-0.5
0.0
0.5
1.0
ACF
LagA
CF
0 5 10 15 20
-1.0
-0.5
0.0
0.5
1.0
PACF
K. Ensor, STAT 4214
Spring 2005
0 50 100 150 200 250
01
02
03
04
0
50 Simulated Random Walk Paths with Starting Unit of 20
K. Ensor, STAT 4215
Spring 2005
Random Walk with Drift
• Include a constant mean in the random walk model.– Time-trend of the log price p(t) and is
referred to as the drift of the model.– The drift is multiplicative over time p(t)=t + p(0) + a(t) + … + a(1)– What happens to the variance?
K. Ensor, STAT 4216
Spring 2005
Time
0 50 100 150 200 250
20
60
10
01
60
Simulated Random Walk with Drift
0 50 100 150
01
02
03
04
0
Histogram
Simulated Random Walk with Drift Lag
AC
F
0 5 10 15 20
-1.0
-0.5
0.0
0.5
1.0
ACF
LagA
CF
0 5 10 15 20
-1.0
-0.5
0.0
0.5
1.0
PACF
Drift parameter= 0.5Standard Deviation of shocks=2.0
K. Ensor, STAT 4217
Spring 2005
0 50 100 150 200 250
05
01
00
15
02
00
50 Simulated Random Walk Paths with Drift
Drift parameter= 0.5Standard Deviation of shocks=2.0
K. Ensor, STAT 4218
Spring 2005
Unit Root Tests
• The classic test was derived by Dickey and Fuller in 1979. The objective is to test the presence of a unit root vs. the alternative of a stationary model.
• The behavior of the test statistics differs if the null is a random walk with drift or if it is a random walk without drift (see text for details).
K. Ensor, STAT 4219
Spring 2005
Unit root tests continued
• There are many forms. The easiest to conceptualize is the following version of the Augmented Dickey Fuller test (ADF):
• The test for unit roots then is simply a test of the following hypothesis:
against
• Use the usual t-statistic for testing the null hypothesis. Distribution properties are different.
t
p
jjtjttt arrXr
11
0: oH 0: aH
1
K. Ensor, STAT 42110
Spring 2005
Unit root tests
• In finmetrics use the following command
• Without finmetrics you will need to simulate the distribution under the null hypothesis – see the Zivot manual for the algorithm.
unitroot(rseries,trend="c",statistic="t",method="adf",lags=6)
K. Ensor, STAT 42111
Spring 2005
Stationary Tests
• Null hypothesis is that of stationarity. • Alternative is a non-stationary process.
• Null hypothesis is that the variance of ε is 0.
• In finmetrics use command
ttt
tttt rXy
1
stationaryTest(x, trend="c", bandwidth=NULL, na.rm=F)