[R-SIG-Finance] issues with NGARCH in rgarch package

Liviu Andronic landronimirc at gmail.com
Sun May 3 01:45:37 CEST 2009


Dear Alexios,

We are currently using rgarch from R-forge to compute basic GARCH(1,1)
and more fancy NGARCH(1,1) models. For the simple garch(1,1) we get
different results from tseries::garch(), fGarch::garchFit() and
rgarch::ugarchfit(), however fairly comparable; if you're interested,
I could post self-contained code highlighting the differences.

For the NGARCH (via fGARCH), however, we get funny results and I
believe it would be a bug in the code. If you look at the Hentschel's
"Family GARCH" model [1], NGARCH is obtained when lambda is fixed and
=2 (page 9 and 11 of the .pdf). However ugarchfit() seems to try to
estimate this guy.
A second issue, ugarchfit() will not try to estimate the assymetry
shift: `theta' in our econometrics class, `b' in the article (page 11
of the .pdf), or `fb' in the rgarch package (see `ugarchspec-methods
{rgarch}' help page). Looking at the source code (internal-fgarch.R,
line 31), it seems that fb is hard-set to 0:
	NGARCH   =list(parameters=list(lambda=2, delta=0, fb=0, fc=0, fk=1),

		indicator=c(1,0,0,0,0), garchtype = 4),
 although we believe it should be one of the freely estimated
parameters (instead of lambda, as currently it seems to be).

Would there be any easy way to work around this issue? For code
highlighting the problem, please look below.
Thank you,
Liviu

[1] http://en.wikipedia.org/wiki/Autoregressive_conditional_heteroskedasticity#fGARCH

### Code ###
> return=vector()
> zigma=vector()
> return[1]=0
> zigma[1]=0
> normvector=rnorm(499,mean=0,sd=1)
> #simulate random returns for predefined NGARCH parameters
> for(i in 2:500)
+ {
+ zigma[i]=(0.01+0.05*(return[i-1]-2*zigma[i-1])^2+0.6*zigma[i-1]^2)^0.5
+ return[i]=zigma[i]*normvector[i-1]
+ }
> head(return)
[1]  0.00000  0.08726 -0.02434  0.26456  0.19681 -0.01039
> # Fitting Non-linear GARCH
> require(rgarch)
> spec.NGARCH <- ugarchspec(variance.model=list(model="fGARCH",
+ garchOrder=c(1,1), submodel="NGARCH"), mean.model=list(armaOrder=c(0,0),
+ include.mean=FALSE), distribution.model="snorm")
> fit.NGARCH <- ugarchfit(data=return, spec=spec.NGARCH)
> fit.NGARCH at fit$coef
  omega  alpha1   beta1  lambda
0.04276 0.06191 0.87457 0.43634
> fit.NGARCH


GARCH Model Spec
--------------------------
Model : fGARCH Sub-Model : NGARCH

Exogenous Regressors in variance equation: none

Mean Equation :
Include Mean :  FALSE
AR(FI)MA Model : (0,0,0)
Garch-in-Mean :  FALSE
Exogenous Regressors in mean equation: none
Conditional Distribution:  norm

GARCH Model Fit
--------------------------
Optimal Parameters:
        Estimate  Std. Error  t value Pr(>|t|)
omega    0.04276    0.030425   1.4054 0.159894
alpha1   0.06191    0.028462   2.1752 0.029613
beta1    0.87457    0.061289  14.2695 0.000000
lambda   0.43634    0.171291   2.5474 0.010854

Robust Standard Errors:
        Estimate  Std. Error  t value Pr(>|t|)
omega    0.04276    0.034747   1.2306 0.218473
alpha1   0.06191    0.036494   1.6965 0.089795
beta1    0.87457    0.076156  11.4839 0.000000
lambda   0.43634    0.179153   2.4356 0.014868

LogLikelihood : 62.65

Information Criteria:
Akaike       0.26660
Bayes        0.30032
Shibata      0.26648
Hannan-Quinn 0.27983


Q-Statistics on Standardized Residuals:
      statistic p-value
Lag10     6.161  0.8016
Lag15    13.434  0.5688
Lag20    21.480  0.3694

H0 : No serial correlation

Q-Statistics on Standardized Squared Residuals:
      statistic p-value
Lag10     7.032  0.7224
Lag15    10.325  0.7988
Lag20    17.254  0.6364

ARCH LM Tests:
             Statistic DoF P-Value
ARCH Lag[2]     0.1076   2  0.9476
ARCH Lag[5]     6.0089   5  0.3054
ARCH Lag[10]    8.0694  10  0.6221

Joint Statistic of the Nyblom stability test: 0.9012

Individual Nyblom Statistics:
omega  0.2906
alpha1 0.2260
beta1  0.2734
lambda 0.2845

Sign Bias Test
                   t-value    prob sig
Sign Bias           0.7199 0.47193
Negative Sign Bias  1.0525 0.29308
Positive Sign Bias  1.6822 0.09316   *
Joint Effect        5.5168 0.13764

Chisq Goodnes of Fit Test
[1] "under revision"


Elapsed time : 1.298

### End of code ###



More information about the R-SIG-Finance mailing list