[R-SIG-Finance] Problem with garch (tseries)
Adrian Trapletti
a.trapletti at swissonline.ch
Fri Aug 18 13:37:34 CEST 2006
The model does not fit the data: Sloppy formulated, your estimated
models are nearly IGARCH (garchall and garch351), and the garch352 is an
IGARCH. Compute the unconditional variance given by
coef(model)[1]/(1-coef(model)[2]-coef(model)[3]) for each of them and
you will see that the last model does not imply a reasonable
unconditional variance (also the first two models do imply unconditional
variances which are "far away" from the observed variance).
The acf of absolute values of your data does not decay exponentially
fast as with a GARCH process. It looks more like "long memory" or
"structural changes".
Best regards
Adrian
>Message: 1
>Date: Thu, 17 Aug 2006 07:52:22 -0700 (PDT)
>From: michael mathews <muckjail at yahoo.com>
>Subject: [R-SIG-Finance] Problem with garch (tseries)
>To: r-sig-finance at stat.math.ethz.ch
>Message-ID: <20060817145222.44724.qmail at web38902.mail.mud.yahoo.com>
>Content-Type: text/plain; charset=iso-8859-1
>
>Hi folks,
>I have been playing with garch models to model the volatility in
>physical natural prices.
>Here is the issue I have a dataset of 801 daily returns (attached).
>If I run
>
>garchall<-garch(hsc)
>
> ***** ESTIMATION WITH ANALYTICAL GRADIENT *****
>
>
>
>
>>> summary(garchall)
>>
>>
>
>Call:
>garch(x = hsc)
>
>Model:
>GARCH(1,1)
>
>Residuals:
> Min 1Q Median 3Q Max
>-4.3424 -0.5734 0.0000 0.6037 4.0501
>
>Coefficient(s):
> Estimate Std. Error t value Pr(>|t|)
>a0 2.507e-05 9.200e-06 2.726 0.00642 **
>a1 1.218e-01 2.085e-02 5.840 5.21e-09 ***
>b1 8.759e-01 1.937e-02 45.212 < 2e-16 ***
>---
>Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
>
>Diagnostic Tests:
> Jarque Bera Test
>
>data: Residuals
>X-squared = 62.7291, df = 2, p-value = 2.387e-14
>
>
> Box-Ljung test
>
>data: Squared.Residuals
>X-squared = 0.0384, df = 1, p-value = 0.8447
>
>Now if we run the same model on a subset say the last 351 days we get
>
>
>>> garch351<-garch(tail(hsc,351))
>>
>>
>
> ***** ESTIMATION WITH ANALYTICAL GRADIENT *****
>
>
>
>
>>> summary(garch351)
>>
>>
>
>Call:
>garch(x = tail(hsc, 351))
>
>Model:
>GARCH(1,1)
>
>Residuals:
> Min 1Q Median 3Q Max
>-4.171521 -0.424628 0.008727 0.532158 3.962116
>
>Coefficient(s):
> Estimate Std. Error t value Pr(>|t|)
>a0 2.511e-05 1.589e-05 1.580 0.114167
>a1 1.043e-01 2.950e-02 3.536 0.000406 ***
>b1 8.957e-01 2.567e-02 34.896 < 2e-16 ***
>---
>Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
>
>Diagnostic Tests:
> Jarque Bera Test
>
>data: Residuals
>X-squared = 76.3704, df = 2, p-value < 2.2e-16
>
>
> Box-Ljung test
>
>data: Squared.Residuals
>X-squared = 1.2806, df = 1, p-value = 0.2578
>
>still ok. Now finally we get t the point of this email lets look at 352
>days of data:
>
>garch352<-garch(tail(hsc,352))
>
> ***** ESTIMATION WITH ANALYTICAL GRADIENT *****
>
>
>Warning message:
>NaNs produced in: sqrt(pred$e)
>
>
>>> summary(garch352)
>>
>>
>
>Call:
>garch(x = tail(hsc, 352))
>
>Model:
>GARCH(1,1)
>
>Residuals:
> Min 1Q Median 3Q Max
>-4.16377 -0.58155 0.01454 0.70886 12.41242
>
>Coefficient(s):
> Estimate Std. Error t value Pr(>|t|)
>a0 2.428e-05 1.556e-05 1.561 0.118632
>a1 1.043e-01 2.947e-02 3.540 0.000400 ***
>b1 8.962e-01 2.556e-02 35.058 < 2e-16 ***
>---
>Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
>
>Diagnostic Tests:
> Jarque Bera Test
>
>data: Residuals
>X-squared = 10993.57, df = 2, p-value < 2.2e-16
>
>
> Box-Ljung test
>
>data: Squared.Residuals
>X-squared = 0.1831, df = 1, p-value = 0.6687
>
>whats up? Any Ideas.
>I have also tried using garchFit from the fSeries package but it locks
>up completely left it running last night and it was still spinning this
>morning when I got back to the office.
>
>thanks in advance
>
>michael
>
>
>
>
>
More information about the R-SIG-Finance
mailing list