fGarch: question & suggestion
Yohan Chalabi
chalabi at phys.ethz.ch
Tue Feb 12 15:18:04 CET 2008
>>>> "MM" == michal miklovic <mmiklovic at yahoo.com>
>>>> on Thu, 7 Feb 2008 12:11:00 -0800 (PST)
MM> I would like to ask if was possible to implement in a function
MM> computing gradient in the fGarch package. Or is there a quick
MM> and easy way of implementing a gradient function so that I can
MM> do it myself? Based on the paper 'Parameter Estimation of ARMA
MM> Models with GARCH/APARCH Errors' by Wuertz, Chalabi and Luksan,
MM> I think that a function computing gradient was available for
MM> garch models in Rmetrics in the past. However, I did not find
MM> gradient in fGarch 260.72.
MM> The reason for my question is that I would like to calculate
MM> robust covariance matrix (and robust standard errors) for a garch
MM> model estimated under the assumption of normally distributed
MM> standardised errors, for which I need hessian and gradient. The
MM> robust covariance matrix for such a QML estimator is computed as
MM> hessian^(-1)*OPG*hessian^(-1), where OPG is the outer product
MM> of the gradient, i.e. gradient*(transposed gradient). Clearly,
MM> hessian is available but I do not have the gradient.
Hi Michal,
The gradient of LLH in fGarch is always calculated inside the
optimization routines and different numerical approximation are used
according to the optimization. So, there is no available function in
fGarch which returns the gradient. Nevertheless it is not difficult to
implement the numerical approximation of the gradient in R.
.garchRCDAHessian in fGarch can give you an idea how to do it.
If you have garch model estimated under the assumption of normally
distributed sd error you can even use the analytical gradient. But
this would takes you probably much more time to implement it.
regards,
Yohan
More information about the Rmetrics-core
mailing list