Page 1 of 1

VAR-BEKK GARCH one period lag of a variable notation

Posted: Wed Oct 09, 2019 6:59 pm
by leoleo73
Dear Users of RATS

I am using a bivariate BEKK-GARCH Model(please see below) to check volatility spillovers between commodity markets.
Because of time difference between two markets, I use the lag notation like lacc{1} in the model.
However, I got the error SR4(tried to use series number -5, -series n1 n2 triples are no longer legal)
Without the lag notation {1}, the model is OK. With {1}, the model does not work!
Can you please guide me to solve the problem?

I have series sacc, lacc with the same date


*Daily data*
OPEN DATA "/Users/data.xlsx"
DATA(FORMAT=XLSX,ORG=COLUMNS, julian=date) 1 2432 sacc lacc
cal(julian = date)
***var-bekk-daily-total***
*****VAR1 sacc lacc*******
system(model=var1)
variables sacc lacc{1}
lags 1
end(system)
***BEKK***
GARCH(P=1,Q=1, model= var1,mv=bekk, dist=t, robusterrors, pmethod=simplex, piters=20, $
method=bfgs, iters=500, rvectors=rd, hmatrices=hh,$
stdresids=rstd, factorby=eigen) /sacc lacc{1}
GARCH(P=1,Q=1, model= var1,mv=bekk, dist=t, ASYMMETRIC, robusterrors, pmethod=simplex, piters=20, $
method=bfgs, iters=500, rvectors=rd, hmatrices=hh,$
stdresids=rstd, factorby=eigen) /sacc lacc{1}
*clear memory
end(reset)

Re: VAR-BEKK GARCH one period lag of a variable notation

Posted: Wed Oct 09, 2019 7:31 pm
by TomDoan
The dependent variables have to be contemporaneous, so if you need to lag one in order to align them, you have to create a separate series with the lag:

set laglacc = lacc{1}
system(model=var1)
variables sacc laglacc
lags 1
end(system)

etc.

Re: VAR-BEKK GARCH one period lag of a variable notation

Posted: Wed Oct 09, 2019 8:18 pm
by leoleo73
Dear Tom

Thank you for your quick reply

I put the code set laglacc = lacc{1}

but I got error like this
## SX 5. Expected = Here
>>>>>> Set laglacc=lacc{1}<<<<<<<

Would you please help me again?

Regards

Re: VAR-BEKK GARCH one period lag of a variable notation

Posted: Wed Oct 09, 2019 9:27 pm
by TomDoan
You need a space before the = in the SET instruction.

Re: VAR-BEKK GARCH one period lag of a variable notation

Posted: Wed Oct 09, 2019 9:40 pm
by leoleo73
Thank you very much Tom!

It works lovely!

Thank you again!
TomDoan wrote:You need a space before the = in the SET instruction.