Chapter 14
Chapter 14
Chapter 14
Problem 1. The plots and output are below. The time series plot of Tbill does not seem
mean-reverting and the ACF plot has a slow decay also suggesting that the
series is nonstationary.
The time series plot of Tbill.diff seems mean reverting and the ACF plot
decays to 0 reasonably fast, suggesting a stationary series.
For Tbill, the ADF test accepts nonstationarity and the KPSS test rejects
stationarity, so the tests agree with the plots that the series is nonstationary.
For Tbill.diff, the ADF test rejects nonstationarity and the KPSS test ac-
cepts stationarity, so the tests agree with the plots that the series is stationary.
Tbill.diff shows two different types of heteroscedasticity. First, there is
volatility clustering, seen as random bursts of high volatility. Second, there
is more volatility when the mean of the t-bill rate is higher in the late 1970’s
and early 1980’s. The volatility clustering can be accommodated by a GARCH
model. The increased volatility where the mean is higher could be removed by
a transformation, perhaps the log.
12
2
Tbill.diff
0
Tbill
−6 −4 −2
4
0
Time Time
0.6
ACF
ACF
0.4
0.2
0.0
−0.2
0 1 2 3 4 5 0 1 2 3 4 5
Lag Lag
1
> adf.test(Tbill)
data: Tbill
Dickey-Fuller = -2.5622, Lag order = 6, p-value =
0.3395
alternative hypothesis: stationary
> kpss.test(Tbill)
data: Tbill
KPSS Level = 1.3192, Truncation lag parameter = 3,
p-value = 0.01
Warning message:
In kpss.test(Tbill) : p-value smaller than printed p-value
> adf.test(Tbill.diff)
data: Tbill.diff
Dickey-Fuller = -6.3425, Lag order = 6, p-value =
0.01
alternative hypothesis: stationary
Warning message:
In adf.test(Tbill.diff) : p-value smaller than printed p-value
> kpss.test(Tbill.diff)
data: Tbill.diff
KPSS Level = 0.15565, Truncation lag parameter = 3,
p-value = 0.1
Warning message:
In kpss.test(Tbill.diff) : p-value greater than printed p-value
Problem 2. (a) The model is yt − mu = ar1 ∗ (yt−1 − mu) + at where at = σt t , and σt2 =
omega + alpha1 ∗ a2t−1 + beta1 ∗ σt−1
2
. Parameters in a Roman font are in the R
output. Also, 1 , 2 , . . . is an iid white noise process.
(b) The estimates are listed below under “Optimal Parameters.” For example,
the estimate of mu is 0.0186.
> library(xts)
> library(rugarch)
> arma.garch.norm = ugarchspec(mean.model=list(armaOrder=c(1,0)),
+ variance.model=list(garchOrder=c(1,1)))
> Tbill.arma.garch.norm = ugarchfit(data=Tbill.diff, spec=arma.garch.norm)
> show(Tbill.arma.garch.norm)
*---------------------------------*
* GARCH Model Fit *
*---------------------------------*
2
-----------------------------------
GARCH Model : sGARCH(1,1)
Mean Model : ARFIMA(1,0,0)
Distribution : norm
Optimal Parameters
------------------------------------
Estimate Std. Error t value Pr(>|t|)
mu 0.018556 0.032524 0.57054 0.568312
ar1 0.139618 0.069092 2.02075 0.043306
omega 0.016961 0.010715 1.58296 0.113430
alpha1 0.383655 0.065991 5.81378 0.000000
beta1 0.615345 0.041021 15.00090 0.000000
LogLikelihood : -223.8331
Information Criteria
------------------------------------
Akaike 1.9475
Bayes 2.0211
Shibata 1.9466
Hannan-Quinn 1.9772
3
------------------------------------
Statistic Shape Scale P-Value
ARCH Lag[3] 2.114e-05 0.500 2.000 0.9963
ARCH Lag[5] 7.739e-01 1.440 1.667 0.8010
ARCH Lag[7] 1.014e+00 2.315 1.543 0.9113
Problem 3. (a) acf(res) is the ACF of the unstandardized residuals. The unstandardized
residuals exhibit some autocorrelation suggesting that the AR(1) model for
the conditional mean might be misspecified, but the Ljung-Box test of the
standardized residuals has reasonably large p-values so it seems that the AR(1)
model for the conditional mean is adequate.
(b) acf(res^2) is the ACF of the squared unstandardized residuals. We see
substantial autocorrelation, which indicates conditional heteroscedasticity and
4
the need for a GARCH model. Since we are fitting a GARCH model, this
autocorrelation is not a concern.
(c) acf(res_std^2) is the ACF of the squared standardized residuals. The
standardized residuals are the residuals divided by the estimates based on the
GARCH(1, 1) model of the conditional standard deviations. We see little au-
tocorrelation, which indicates that the GARCH(1,1) model for the conditional
standard deviation is adequate. The autocorrelation seen in (b) is accommo-
dated by the GARCH(1,1) model.
(d) The time series plot of the standardized residuals seems to have heavy tails,
but a time series plot is not ideal for checking tail weight. A QQ-plot could be
used to investigate further.
The standardized residuals at the end of the series are unusually small. The
time series plot of the t-bill series shows unusually low volatility at the end of the
series. It might be that the conditional standard deviations are overestimated
there.
The plot below was created by the code above which was taken from the book.
5
Series 1 Series 1
1.0
1.0
4
0.8
0.8
2
0.6
0.6
Series 1
ACF
ACF
0.4
0.4
−2
0.2
0.2
−4
0.0
−6
−0.2
1960 1980 2000 0 1 2 3 4 5 0 1 2 3 4 5
Series 1 Series 1
1.0
1.0
0.8
0.8
2
0.6
0.6
Series 1
ACF
ACF
0.4
0.4
0.2
−2
0.2
−0.2 0.0
0.0
−4
Problem 4. Below are the output and plots using the log transformed series. There are
no major differences except for hte conditional standard deviations; these are
discussed below.
*---------------------------------*
* GARCH Model Fit *
*---------------------------------*
Optimal Parameters
------------------------------------
Estimate Std. Error t value Pr(>|t|)
mu 0.015687 0.009638 1.6277 0.10360
ar1 0.100402 0.074611 1.3457 0.17841
omega 0.004274 0.001434 2.9813 0.00287
alpha1 0.497553 0.093795 5.3047 0.00000
beta1 0.501447 0.073451 6.8270 0.00000
LogLikelihood : 52.01162
Information Criteria
------------------------------------
Akaike -0.40010
Bayes -0.32649
Shibata -0.40098
6
Hannan-Quinn -0.37042
7
acf(res.log)
acf(res.log^2)
plot(res.std.log)
acf(res.std.log)
acf(res.std.log^2)
graphics.off()
1.0
1.0
1.0
0.8
0.8
0.6
0.6
0.0
Series 1
ACF
ACF
0.4
0.4
−1.0
0.2
0.2
0.0
0.0
−2.0
Series 1 Series 1
1.0
1.0
0.8
0.8
2
0.6
0.6
Series 1
ACF
ACF
0.4
0.4
0.2
−2
0.2
−0.2 0.0
0.0
−4
The plot below shows the two conditional standard deviations series. The high
volatility around 1980 in the untransformed series shows up as large condtional
standard deviations around that date. Since the log transformation stabilizes
the variance in this example, the logged transformed series does not high volatil-
ity around 1980 and its conditional standard deviation are not usually large
around that time.
Thus, we see that the high volatility around 1980 can be accommodated in two
ways.
pdf("TbillGarchPlotlog.pdf",width=8,height=5)
par(mfrow=c(1,2))
plot(Tbill.arma.garch.norm,which=3)
plot(Tbill.arma.garch.norm.log,which=3)
graphics.off()
8
Conditional SD (vs |returns|) Conditional SD (vs |returns|)
2.0
6
5
1.5
4
Volatility
Volatility
1.0
3
2
0.0
0
Time Time