2 variables mgarch coding problem

Discussions of ARCH, GARCH, and related models
luxu1983
Posts: 61
Joined: Wed Aug 12, 2009 10:53 pm

2 variables mgarch coding problem

Unread post by luxu1983 »

Dear



* Parameters for the regression function
*


frml hf = d=c+a*u(1){-1}*u(2){-1}+b*d{-1},$
(h11=vc(1)+vav(1)*h(1,1){1}+vbv(1)*uu(1,1){1}),$
(h22=vc(2)+vav(2)*h(2,2){1}+vbv(2)*uu(2,2){1}),$
||h11|(2*(1/1+exp(-d))-1)*sqrt(h11*h22),h22||

* this part ,i think ,do the setting sqrt(h12)=rho*sqrt(h11)*sqrt(h22) ; rho=2*(1/(1+exp(-d)))-1;d=c+u1(-1)*u2(-1)+b*d(-1)
* maybe there are something wrong in this part, but i dont how to modify it

compute vbv=%const(0.05),vav=%const(0.05),vc(1)=vc(2)=0.05,c=a=b=0.05
MAXIMIZE(parmset=meanparms+garchparms,METHOD=SIMPLEX,ITERS=5) LOGL 4 *
MAXIMIZE(parmset=meanparms+garchparms,METHOD=Bfgs,ITERS=100) LOGL 4 *
Last edited by luxu1983 on Mon Aug 24, 2009 3:08 pm, edited 1 time in total.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: 2 variables mgarch coding problem

Unread post by TomDoan »

You wrote 2*(1/1+exp(-d))-1. But 1/1+exp(-d) is (1/1)+exp(-d). You need parens around 1+exp(-d) to get the calculation done in the correct order.
luxu1983
Posts: 61
Joined: Wed Aug 12, 2009 10:53 pm

Re: 2 variables mgarch coding problem

Unread post by luxu1983 »

TomDoan wrote:You wrote 2*(1/1+exp(-d))-1. But 1/1+exp(-d) is (1/1)+exp(-d). You need parens around 1+exp(-d) to get the calculation done in the correct order.
i change ||h11|(2*(1/1+exp(-d))-1)*sqrt(h11*h22),h22|| to ||h11|(2*(1/(1+exp(-d)))-1)*sqrt(h11*h22),h22||
it does not work
## MAT13. Store into Out-of-Range Matrix or Series Element
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: 2 variables mgarch coding problem

Unread post by TomDoan »

d=c+a*u(1){-1}*u(2){-1}+b*d{-1}

is wrong. z{-1} is z(t+1) not z(t-1). Change the {-1}'s to {1}.
Post Reply