[R-SIG-Finance] FinTS_0.2-5 available & GARCH questions

Spencer Graves spencer.graves at pdf.com
Sat Jan 12 04:40:54 CET 2008


Hi, All:

      FinTS version 0.2-5 is now available on CRAN.  This version
includes script files to produce nearly all the examples, figures and
tables in the first two chapters of Tsay (2005) Analysis of Financial
Time Series, 2nd ed. (Wiley), plus portions of chapters 3 and 11.


NEW FUNCTION

      It also includes "AutocorTest", which is a wrapper for "Box.test"
that supports two modifications:

            (1) Computing the p-value for the Ljung-Box test using
degrees of freedom different from the number of lags, as recommended  by
many sources for the residuals for model fits.

            (2) Computing the Ljung-Box test using ranks, as recommended
by  Patrick Burns (2002) 'Robustness of the Ljung-Box Test and its Rank
Equivalent', <www.burns-stat.com/pages/Working/ljungbox.pdf>, and
references cited therein.


OPEN QUESTIONS:

      I wonder if anyone can help me with the following two issues that
I hope are simple and self-contained given the FinTS package:


LAGRANGE MULTIPLIER TEST FOR CONDITIONAL HETEROSCEDASTICITY

      The S-Plus Finmetrics package includes a function "archTest" to
compute the Langrange multiplier test for conditional heteroscedasticity
described by Engle (1982) Autoregressive Conditional Heteroscedasticity
with estimates of the variance of United Kingdom inflations,
Econometrica, 50:  987-1007.  Tsay (pp. 101-102) discusses this test and
applies it to the monthly log stock returns of Intel corporation from
1973 to 2003.  The simple returns are available in FinTS as
"m.intc7303".  Thus, if "archTest" were available then the following
should produce the answers in the book:

library(FinTS)
data(m.intc7303)
# S-Plus Finmetrics function:
#archTest(log(1+as.numeric(m.intc7303)), lag=12)

#      Tsay reports that this function returned a test statistic of
43.5041, which should follow approximately a ch-square with 12 degrees
of freedom.


PREDICT for garchFit in fGarch

      The 'gardhFit' function seems to work fine, but I'd like a
'predict' function.  The following is a self-contained example discussed
on pp. 118-120 of Tsay:

library(FinTS)
data(sp500)
library(fGarch)
# p. 118
spFit00.11 <- garchFit(sp500~garch(1,1), data=sp500)

#Coefficient(s):
#                       mu        omega       alpha1        beta1
#garchFit{fGarch}:  7.44972e-03  8.06162e-05  1.21975e-01  8.54361e-01
#garch{Finmetrics}: 7.6e-3       8.6e-5       1.216e-1     8.511e-1

# p. 120
# Figure 3.1.  Volatility forecasts
# Horizon       1       2       3       4       5      Inf
# Return     0.0076  0.0076  0.0076  0.0076  0.0076  0.0076
# Volatility 0.0536  0.0537  0.0537  0.0538  0.0538  0.0560


      I hope some of you find the 'AutocorTest' function useful, and I
hope someone is able to help me with 'archTest' and
predict(garchFit(...)).
      Thanks,
      Spencer Graves



More information about the R-SIG-Finance mailing list