<< garch GARCH models garch_grad2 >>

Grocer >> GARCH models > garch_grad

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

load(GROCERDIR+'/data/garchd.dat')
 
bounds('1949q1','1983q4')
r1 = ols('gnpdef','cte','lagts(gnpdef)','lagts(2,gnpdef)','lagts(3,gnpdef)','lagts(4,gnpdef)');
bet = r1('beta');
s = r1('sige');
[y,namey,x]=explouniv('gnpdef',list('cte','lagts(gnpdef)','lagts(2,gnpdef)','lagts(3,gnpdef)','lagts(4,gnpdef)'));
parm=[bet ; s ; 0 ; 0 ]
[g,dht,scores]=garch_grad(parm,1,1,y,x)
// the gradient, derivate of sigt and scores have been caluclated at ols solution

AUTHOR

Eric Dubois 2002

Report an issue
<< garch GARCH models garch_grad2 >>