[R-SIG-Finance] garch vs garchFit - minimum sample size

Spencer Graves spencer.graves at pdf.com
Wed Feb 13 16:40:33 CET 2008


      In comparing garch{tseries} with garchFit{fGarch}, it seems that 
the latter is more general, as it allows simultaneous estimation of an 
arma model with possibly nonnormal garch or aparch noise, while 'garch' 
fits only a garch model to a series assumed to have mean zero.  I 
simulated 10,000 observations from the garch(1,1) model given as an 
example in the 'garchSim' help page, and got very similar answers from 
'garch' as from 'garchFit' which I restricted the latter to fit the 
model of the former: 

x10k <- garchSim(n=10000)

summary(fit10k <- garch(x10k))
    Estimate  Std. Error  t value Pr(>|t|)   
a0 1.149e-06   1.467e-07    7.832 4.88e-15 ***
a1 1.032e-01   9.433e-03   10.942  < 2e-16 ***
b1 7.852e-01   2.039e-02   38.499  < 2e-16 ***
# simulated a0=1e-6, a1=0.1, b1=0.8

fit10k. <- garchFit(~garch(1,1), data=x10k, include.mean=FALSE)
summary(fit10k.)
        Estimate  Std. Error  t value Pr(>|t|)   
omega  1.148e-06   1.437e-07     7.99 1.33e-15 ***
alpha1 1.032e-01   9.027e-03    11.44  < 2e-16 ***
beta1  7.853e-01   1.963e-02    39.99  < 2e-16 ***

      With only 100 observations, 'garch' complained 'singular 
information' and quite early with different answers from garchFit: 

summary(fit100 <- garch(x10k[1:100]))
    Estimate  Std. Error  t value Pr(>|t|)
a0 9.842e-06          NA       NA       NA
a1 5.000e-02          NA       NA       NA
b1 5.000e-02          NA       NA       NA

fit100. <- garchFit(~garch(1,1), data=x10k[1:100], include.mean=FALSE)
summary(fit100.)
        Estimate  Std. Error  t value Pr(>|t|)  
omega  2.056e-06   1.677e-06    1.226  0.22022  
alpha1 1.387e-01   1.193e-01    1.163  0.24469  
beta1  6.704e-01   2.045e-01    3.278  0.00105 **

      However, with 500 observations, 'garch' thought it converged and 
again gave answers very similar to garchFit: 

summary(fit500 <- garch(x10k[1:500]))
    Estimate  Std. Error  t value Pr(>|t|)   
a0 1.466e-06   6.432e-07    2.279  0.02265 * 
a1 1.340e-01   4.405e-02    3.042  0.00235 **
b1 7.215e-01   9.292e-02    7.765 8.22e-15 ***
fit500. <- garchFit(~garch(1,1), data=x10k[1:500], include.mean=FALSE)
summary(fit500.)
        Estimate  Std. Error  t value Pr(>|t|)   
omega  1.450e-06   6.162e-07    2.352  0.01867 * 
alpha1 1.340e-01   4.425e-02    3.029  0.00245 **
beta1  7.236e-01   8.430e-02    8.583  < 2e-16 ***

      My conclusion from this is to use 'garchFit'. 

      By the way, the more general syntax for 'garchFit' is illustrated 
by the following: 

library(FinTS)
data(sp500)
library(fGarch)
spFit30.11 <- garchFit(sp500~arma(3,0)+garch(1,1), data=sp500)

      Spencer

tom soyer wrote:
> Spencer, take any data series and run garch vs. garchFit with various 
> sample size, and you will see garch needs a lot more data points to 
> get a good fit. Anyway, it probably doesn't matter if one always use a 
> sample size of >2,000. I was just courious.
>
> On 2/12/08, *Spencer Graves* <spencer.graves at pdf.com 
> <mailto:spencer.graves at pdf.com>> wrote:
>
>     Why do you say that 'garch' requires more observations than
>     'garchFit'?
>     Can you outline documentation or tests you've performed?
>
>     Spencer
>
>     tom soyer wrote:
>     > Hi,
>     >
>     > It seems that the minimum sample size required by garch is much
>     larger than
>     > garchFit, does anyone know why? I am guessing between 1,000 and
>     2,000 for
>     > garch and ~500 for garchFit. Does anyone know the exact minimum
>     sample size
>     > for each?
>     >
>     > Thanks!
>     >
>     >
>
>
>
>
> -- 
> Tom



More information about the R-SIG-Finance mailing list