How do i store the degr. of freedom in rolling GARCH?

For questions regarding programming in the EViews programming language.

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

oska
Posts: 3
Joined: Wed May 15, 2013 5:45 am

How do i store the degr. of freedom in rolling GARCH?

Postby oska » Wed May 15, 2013 6:08 am

Hello,

I have written some code to be able to forecast conditional variance with a GARCH model (with a rolling estimation window). I am using the t-distribution, and for each regression there's a number for the degrees of freedom. My question is, how do i adjust my code so that the degrees of freedom are stored for each corresponding variance forecast?

Code: Select all

series h_1_step=na series r_1_step=na for !i=1 to 562 smpl !i 949+!i equation eq_01.arch(1, 1, tdist) lth c smpl @all eq_01.forecast r_pred se_pred h_pred smpl 950+!i 950+!i series h_1_step= h_pred 'One-step-ahead of conditional variance series r_1_step= r_pred 'One-step-ahead of actual series next smpl @all
Where lth is the original series.

Thank you in advance,

Ola

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

Re: How do i store the degr. of freedom in rolling GARCH?

Postby EViews Gareth » Wed May 15, 2013 7:45 am

eq.@df ?

oska
Posts: 3
Joined: Wed May 15, 2013 5:45 am

Re: How do i store the degr. of freedom in rolling GARCH?

Postby oska » Wed May 15, 2013 8:01 am

eq.@df ?
Hello Gareth,

I have never done any programming in eviews before, would you mind telling me where to insert the eq@df so that the program would work?

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

Re: How do i store the degr. of freedom in rolling GARCH?

Postby EViews Gareth » Wed May 15, 2013 8:10 am

Wherever it is that you want to use the degree of freedom.

oska
Posts: 3
Joined: Wed May 15, 2013 5:45 am

Re: How do i store the degr. of freedom in rolling GARCH?

Postby oska » Wed May 15, 2013 8:22 am

Well, I want to store the "T-DIST.DOF" number that appears with every regression estimate of my forecasts. I.e. I want to get a series of 561 degrees of freedoms from each estimate that corresponds with the variances that I have forecasted. I am having trouble understanding how to use the eq.@df to make that happen.

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

Re: How do i store the degr. of freedom in rolling GARCH?

Postby EViews Gareth » Wed May 15, 2013 8:28 am

series dof = eq_01.@df


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest