Page 1 of 1

GARCH unit root

Posted: Tue Sep 21, 2010 4:27 pm
by theeco
i am trying to run a GARCH unit root test for one variable where dls represents the de-trended log of stock price and lstock is the log of stock,
my main problem is how to make the program include cases like arch(0,1) and arch(1,0). When I use the command for !k= 0to 9 it will not run the program.
Second question, how to output the largest value of AIC from my matrices and which lags it belongs to.

Code: Select all

for !k=1 to 9 matrix(9,9) nls for !i=1 to 9 for !j=1 to 9 equation eq!i!j!k.arch(!i,!j) dls lstock(-1) dls(-1 to -!k) c t nls!k(!i,!j)=eq!i!j!k.@aic next next next

Re: GARCH unit root

Posted: Tue Sep 21, 2010 4:49 pm
by EViews Gareth
I'm not sure I understand the question, but just looking at the code points out one (possibly unrelated) problem - you're creating a matrix called NLS each time, but then referencing a matrix called NLS!k

Re: GARCH unit root

Posted: Tue Sep 21, 2010 5:12 pm
by theeco
thank you for your quick reply, you are right i think i am creating a new matrix called NLS, this way will fix it.

Code: Select all

for !k=1 to 9 matrix(9,9) nls!k for !i=1 to 9 for !j=1 to 9 equation eq!i!j!k.arch(!i,!j) dls lstock(-1) dls(-1 to -!k) c t nls!k(!i,!j)=eq!i!j!k.@aic next next next
the program is outputting the right result and !k represents the number of lags. so for the first matrix it creates a 9x9 matrix of AIC results with one lag and ARCH(1,1)(1,2)......(2,1)(2,2).....(9,9), second matrix will be a matrix with two lags.ARCH(1,1)(1,2)......(2,1)(2,2).....(9,9),
my question is how can i make the program include cases like ARCH(0,1)(0,2)(0,3)....(0,9) or ARCH(1,0) (2,0)because the current programs only start with the case arch(1,1)...............(9,9)
thank you again for your help