Output error while estimating realized garch model

For questions regarding programming in the EViews programming language.

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

mectricsdonk
Posts: 29
Joined: Fri Oct 01, 2010 2:51 pm

Output error while estimating realized garch model

Postby mectricsdonk » Fri Nov 26, 2010 5:54 am

{eviews-6}

Hello everyone,
I modified the GARCH example file in eviews 6 to be able to estimate a realized garch model. The model is defined as:

Image
with rt=returns
ht=conditional variance
xt=realized kernel (high frequency data variable)
zt~nid(0,1)
ut~nid(0,sig.u)
and zt uncorrelated with ut

After running the program I get the following error:
OUTPUT is not a valid view for LOGL1 in "SHOW LOGL1.OUTPUT"

plus it gives my loglikelihood a value > zero, which shows that my program isn't correct.
What does this mean? I've uploaded the workfile as well.
Any suggestions and comments would be much appreciated.

here's the code:

Code: Select all

%path = @runpath
cd %path

load realizedlibrary

sample s0 7/02/1999 7/02/1999
sample s1 7/05/1999 2/27/2009
smpl s1

'declaration of coefficient vectors to use in RealGARCH likelihood

coef(1) omega = 0.1
coef(1) beta = 0.1
coef(1) gamma = 0.1
coef(1) xi = 0.1
coef(1) phi = 0.1
coef(2) tau = 0.1

'starting values

smpl s0
series sig = -0.000319459705762157
series nl_rk = 0.00003463251778157428

'set up Realized GARCH likelihood

logl logl1
logl1.append @logl logl
logl1.append sig = omega(1)+beta(1)*sig(-1)+gamma(1)*nl_rk(-1)
logl1.append stdz = nl_returns/@sqrt(sig)
logl1.append res = nl_rk-xi(1)-phi(1)*sig-tau(1)*stdz-tau(2)*(stdz^2-1)
logl1.append ressig = res^2
logl1.append logl = -0.5*(log(ressig)+res^2/ressig+log(sig)+nl_returns^2/sig)

'estimate and display results

smpl s1
logl1.ml(showopts, m=1000, c=1e-5)
show logl1.ouput


thanks in advance :eviews6:
Attachments
realizedlibrary.wf1
(483.35 KiB) Downloaded 408 times

trubador
Did you use forum search?
Posts: 1518
Joined: Thu Nov 20, 2008 12:04 pm

Re: Output error while estimating realized garch model

Postby trubador » Fri Nov 26, 2010 8:19 am

Your program is running fine. You forgot the letter "t" in the final line of the code:
show logl1.output

mectricsdonk
Posts: 29
Joined: Fri Oct 01, 2010 2:51 pm

Re: Output error while estimating realized garch model

Postby mectricsdonk » Fri Nov 26, 2010 11:25 am

thank you very much :mrgreen:

sibelcelik
Posts: 3
Joined: Sat Jan 01, 2011 11:20 am

Re: Output error while estimating realized garch model

Postby sibelcelik » Wed Jan 26, 2011 4:52 am

Hi mectricsdonk ,

I am currently working on Realized GARCH model, I need some codes about it. I wonder you have codes or adjust your code which you attached here? Because likelihood value is positive. Be grateful if you share your codes with me.

sibelcelik
Posts: 3
Joined: Sat Jan 01, 2011 11:20 am

Re: Output error while estimating realized garch model

Postby sibelcelik » Thu Feb 24, 2011 1:04 am

Hello mectricsdonk;

I am trying to estimate Realized GARCH for a long time , however I have some problems with the code. Your code is working well with your data. But, when I estimate it using my data, standard error and t values are Non-available (NA). I explored the causes of this problem and I think that this problem is due to initial values of coefficients in the model. I realized that you use the initial values of coef(1) omega = 0.1, coef(1) beta = 0.1, coef(1) gamma = 0.1, coef(1) xi = 0.1,coef(1) phi = 0.1, coef(2) tau = 0.1 as the original GARCH model. In addition, the initial value of series nl_rk is the first observation in you nl_rk series. There exists no problem with this. However, for the initial values of sig, you used series sig = -0.000319459705762157.

My question is how you determine the initial values of sig series as -0.000319459705762157. I know that sig values can take only positive values, but you take it negative. Is there any method to choose this value? İf yes, which method you used?

Be grateful if you look at my questions.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 21 guests