GARCH unit root

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

theeco
Posts: 3
Joined: Thu Aug 19, 2010 11:23 am

GARCH unit root

Postby theeco » Tue Sep 21, 2010 4:27 pm

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

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Re: GARCH unit root

Postby EViews Gareth » Tue Sep 21, 2010 4:49 pm

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

theeco
Posts: 3
Joined: Thu Aug 19, 2010 11:23 am

Re: GARCH unit root

Postby theeco » Tue Sep 21, 2010 5:12 pm

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


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest