Grocer Function
NAME
garch_grad - Generates garch gradient
CALLING SEQUENCE
[g,dht,gradt]=garch_grad(parm,nar,nma,y,x)
PARAMETERS
Input
-
parm= vector of parameters (beta, a0, ar and ma in that order)
-
nar = # of ar parameters
-
nma = # of ma parameters
-
y = (n x 1) vector of the endogenous variable
-
x = (n x k) vector of the exogenous variables
Output
-
g = (k+nar+nma+1 x 1) -gradient at param
- dht = (nobs x nar+nma+1) derivative of sigt w.r.t a0, ar, ma
- scores = (k+nar+nma+1 x 1) sub-gradient at each date
DESCRIPTION
Generates garch likelihood gradient with respect to the true garch parameters. This in not the function used for maximisation, because maximised parameters are transformed in order to insure the positivity of the variance.
EXAMPLE
[g,dht,scores]=garch_grad(parmd,nar,nma,grocer_y,grocer_x)
Example taken from function garch().
AUTHOR
Eric Dubois 2002