Extracting the residual series from MGARCH-M model

Discussions of ARCH, GARCH, and related models
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Extracting the residual series from MGARCH-M model

Unread post by TomDoan »

econo wrote:
TomDoan wrote:it won't because RVECTORS produces a SERIES[VECTOR] which COPY doesn't handle[/i].

to export errors vector, I used this code
EWISE rd(t) = X(t)

## SX11. Identifier X is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>>EWISE rd(t) = X(<<<<

still doesn't work :(
1. What's X?
2. Isn't RD what's being defined by GARCH?
econo
Posts: 32
Joined: Fri Sep 05, 2014 9:16 am

Re: Extracting the residual series from MGARCH-M model

Unread post by econo »

I used this code and just want to export residuals, then in R-program calculate standardized residuals!

Code: Select all

garch(p=1,q=1,model=var1,mv=CC,variance=varma,pmethod=simplex,piters=5,rvectors=rd,hmatrices=hh, MVHSERIES=VarmaHmatrix ) gstart gend O 22

EWISE   X(t)=rd(t)
## SX11. Identifier X is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>>EWISE   X(<<<<
Moreover, I used this code as you said

Code: Select all


garch(p=1,q=1,model=var1,mv=CC,variance=varma,pmethod=simplex,piters=5,rvectors=rd,hmatrices=hh, MVHSERIES=VarmaHmatrix )

dec vect[series] zu(%nvar)
do time=%regstart(),%regend()
   compute %pt(zu,time,%solve(%decomp(hh(time)),rd(time)))
end do time
@mvqstat(lags=40)


# zu

the second code calculates standardized residuals(?!) but this results (with RATS 8.0) differ from the ones I calculated with RATS 9.0 option.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Extracting the residual series from MGARCH-M model

Unread post by TomDoan »

econo wrote:I used this code and just want to export residuals, then in R-program calculate standardized residuals!

Code: Select all

garch(p=1,q=1,model=var1,mv=CC,variance=varma,pmethod=simplex,piters=5,rvectors=rd,hmatrices=hh, MVHSERIES=VarmaHmatrix ) gstart gend O 22

EWISE   X(t)=rd(t)
## SX11. Identifier X is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>>EWISE   X(<<<<
I assume this is what you're trying to do:

dec vect[series] x(%nvar)
do i=1,%nvar
set x(i) = rd(t)(i)
end do i
econo wrote: Moreover, I used this code as you said

Code: Select all


garch(p=1,q=1,model=var1,mv=CC,variance=varma,pmethod=simplex,piters=5,rvectors=rd,hmatrices=hh, MVHSERIES=VarmaHmatrix )

dec vect[series] zu(%nvar)
do time=%regstart(),%regend()
   compute %pt(zu,time,%solve(%decomp(hh(time)),rd(time)))
end do time
@mvqstat(lags=40)
# zu
the second code calculates standardized residuals(?!) but this results (with RATS 8.0) differ from the ones I calculated with RATS 9.0 option.
The STDRESIDS option on GARCH in version 9 will produce exactly the same standardized residuals as the code above computes. Maybe you're using a different number of lags in the @MVQSTAT.
econo
Posts: 32
Joined: Fri Sep 05, 2014 9:16 am

Re: Extracting the residual series from MGARCH-M model

Unread post by econo »

TomDoan wrote: I assume this is what you're trying to do:

dec vect[series] x(%nvar)
do i=1,%nvar
set x(i) = rd(t)(i)
end do i
still gives this error:

## MAT15. Subscripts Too Large or Non-Positive
Error was evaluating entry 2355
The Error Occurred At Location 86, Line 2 of loop/block
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Extracting the residual series from MGARCH-M model

Unread post by TomDoan »

As I said before, you'll need to attach the whole program, not just bits and pieces. You have an issue with the range of your calculations and I can't tell what that is. (There's an "Upload Attachment" tab at the bottom of the posting page).
econo
Posts: 32
Joined: Fri Sep 05, 2014 9:16 am

Re: Extracting the residual series from MGARCH-M model

Unread post by econo »

TomDoan wrote: Maybe you're using a different number of lags in the @MVQSTAT.
yes, It was lags problem.
Now it works perfect and thanx alot
Post Reply