Roll Add-in
Moderators: EViews Gareth, EViews Moderator, EViews Esther
Roll Add-in
Hi,
I am trying to do some rolling forecasts using EGARCH with the Roll add-in function and am getting the following error message and wondered if someone could give me some direction on how to use it.
I keep getting the following error message. I have about 5000 observations and am trying to use the first 2500 to estimate and then do rolling forecasts week on week for the last 2500. Any help would be greatly appreciated. The error message I am getting says invalid (or out of range coefficient) or matrix index 3.
Thanks
E
I am trying to do some rolling forecasts using EGARCH with the Roll add-in function and am getting the following error message and wondered if someone could give me some direction on how to use it.
I keep getting the following error message. I have about 5000 observations and am trying to use the first 2500 to estimate and then do rolling forecasts week on week for the last 2500. Any help would be greatly appreciated. The error message I am getting says invalid (or out of range coefficient) or matrix index 3.
Thanks
E
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Roll Add-in
Hard to tell without the data/specification.
Re: Roll Add-in
Hi Gareth,
Thanks for your reply.
I have managed to do some rolling forecasts but only one coefficient has saved down. I would have hoped that all coefficients would be listed
The data I am using is spx data from 2002 to 2012 (attached).
I have tried two things. First I tried using the standard EGARCH module with closing prices from the SPX estimate the first half of the data and then after that my intention was to forecast vol over the rest of the period.
I ran EGARCH from the built on module for 4/03/1992 until 4/01/2002 (mean equation dlog(closing) c). Once the equation window is open I have tried running the add-in, advanced rolling regression where I have listed the variables in the specification box and then in the specification and storage options I have tried to roll using a window size of the first 250 days, the last date as 1/04/2002 and a step size of 5.
Also, can you tell me if the roll function can produce rolling forecasts
Thanks
E
Thanks for your reply.
I have managed to do some rolling forecasts but only one coefficient has saved down. I would have hoped that all coefficients would be listed
The data I am using is spx data from 2002 to 2012 (attached).
I have tried two things. First I tried using the standard EGARCH module with closing prices from the SPX estimate the first half of the data and then after that my intention was to forecast vol over the rest of the period.
I ran EGARCH from the built on module for 4/03/1992 until 4/01/2002 (mean equation dlog(closing) c). Once the equation window is open I have tried running the add-in, advanced rolling regression where I have listed the variables in the specification box and then in the specification and storage options I have tried to roll using a window size of the first 250 days, the last date as 1/04/2002 and a step size of 5.
Also, can you tell me if the roll function can produce rolling forecasts
Thanks
E
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Roll Add-in
No, it does not perform rolling forecasts.
I just ran your specification (I think), and it worked.
When you say:
I just ran your specification (I think), and it worked.
When you say:
what exactly do you mean?I have listed the variables in the specification box
Re: Roll Add-in
Hi Gareth,
Thanks again for replying
I list C(2) C(3) C(4) C(5). I have tried with adding nothing to this box and get the same results. Can you let me know what you populate this box with and maybe post a sample of your results. Appreciate your help
Thanks
E
Thanks again for replying
I list C(2) C(3) C(4) C(5). I have tried with adding nothing to this box and get the same results. Can you let me know what you populate this box with and maybe post a sample of your results. Appreciate your help
Thanks
E
Re: Roll Add-in
I have attached screenprints of a step by step of what I'm doing.
One more thing. Would I have to code up EGARCH from scratch to do rolling forecasts?
Again your help is very much appreciated. I'm trying to write a paper and am a complete beginnner to Eviews and there is no help available in college
Thanks
Eoin
One more thing. Would I have to code up EGARCH from scratch to do rolling forecasts?
Again your help is very much appreciated. I'm trying to write a paper and am a complete beginnner to Eviews and there is no help available in college
Thanks
Eoin
- Attachments
-
- screenprints.docx
- (527 KiB) Downloaded 634 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Roll Add-in
The Add-in can only roll the mean equation coefficients. Thus there is only one thing you can enter into that box, the default value of "C".
Re: Roll Add-in
Hi Gareth,
Thank you for the helpful add-in! I have several questions on how to properly use it to calculate rolling regression. Please see below and attachments for screenshots (in the order of my steps) and my workfile
* The workfile has 4 variables (a, b, d01, e_b), a dependent variable y, and a constant c, 151 observations (151 months)
* The regression is setup via "Equation Estimation": (Equation specification) y a b d01 e_b c
Estimation Command:
=========================
LS Y A B D01 E_B C
Estimation Equation:
=========================
Y = C(1)*A + C(2)*B + C(3)*D01 + C(4)*E_B + C(5)
Substituted Coefficients:
=========================
Y = -0.358140856565*A - 0.270110448492*B - 0.221401402092*D01 + 0.0104240253105*E_B + 3.15588663944
* I then highlight the equation and select "advanced rolling regression", with fixed length window
Question 1: do I put all the variables as "variables that can change"? It is the same data that I imported into the workfile, what does it mean that the variables can change?
Question 2: Should I exclude the constant C? If I exclude C, the rollcoefs are all "NA", if I exclude everything, EViews crashes. I believe this is because I don't really understand what "variables that can change" means
* Assuming I proceed with all variables including the constant, I get the following coefficients: rollcoefs_a, rollcoefs_b, rollcoefs_c, rollcoefs_d01, rollcoefs_e_b.
I would like to use the rolling coefficients to recompute a new Y. This Y will be my model Y, which can be compared against the input Y. The residual will be the difference between the two.
Question 3: how do I correctly compute the new Y? I thought about going to View > Show and input a formula such as:
NewY = rollcoefs_a * a + rollcoefs_b * b + rollcoefs_d01 * d01 + rollcoefs_e_b * e_b + rollcoefs_c
... do I have to multiply c with rollcoefs_c?
Thanks!
Victor
Thank you for the helpful add-in! I have several questions on how to properly use it to calculate rolling regression. Please see below and attachments for screenshots (in the order of my steps) and my workfile
* The workfile has 4 variables (a, b, d01, e_b), a dependent variable y, and a constant c, 151 observations (151 months)
* The regression is setup via "Equation Estimation": (Equation specification) y a b d01 e_b c
Estimation Command:
=========================
LS Y A B D01 E_B C
Estimation Equation:
=========================
Y = C(1)*A + C(2)*B + C(3)*D01 + C(4)*E_B + C(5)
Substituted Coefficients:
=========================
Y = -0.358140856565*A - 0.270110448492*B - 0.221401402092*D01 + 0.0104240253105*E_B + 3.15588663944
* I then highlight the equation and select "advanced rolling regression", with fixed length window
Question 1: do I put all the variables as "variables that can change"? It is the same data that I imported into the workfile, what does it mean that the variables can change?
Question 2: Should I exclude the constant C? If I exclude C, the rollcoefs are all "NA", if I exclude everything, EViews crashes. I believe this is because I don't really understand what "variables that can change" means
* Assuming I proceed with all variables including the constant, I get the following coefficients: rollcoefs_a, rollcoefs_b, rollcoefs_c, rollcoefs_d01, rollcoefs_e_b.
I would like to use the rolling coefficients to recompute a new Y. This Y will be my model Y, which can be compared against the input Y. The residual will be the difference between the two.
Question 3: how do I correctly compute the new Y? I thought about going to View > Show and input a formula such as:
NewY = rollcoefs_a * a + rollcoefs_b * b + rollcoefs_d01 * d01 + rollcoefs_e_b * e_b + rollcoefs_c
... do I have to multiply c with rollcoefs_c?
Thanks!
Victor
Last edited by VictorX on Wed Aug 01, 2012 4:25 pm, edited 1 time in total.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Roll Add-in
Variables that can change are the variables that you're rolling. In most cases you'll want to enter all of the variables.
Since c is a column of ones, you don't need the multiplication.
Since c is a column of ones, you don't need the multiplication.
Re: Roll Add-in
Got it, thanks! Now that I want to save the new Y, are there better ways besides View > Show and input the formula >>>NewY = rollcoefs_a * a + rollcoefs_b * b + rollcoefs_d01 * d01 + rollcoefs_e_b * e_b + rollcoefs_c<<<? I was hoping to save the new Y as an equation similar to the original regression, but I can't get that to work.Variables that can change are the variables that you're rolling. In most cases you'll want to enter all of the variables.
Since c is a column of ones, you don't need the multiplication.
Victor
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Roll Add-in
What does new Y mean?
Re: Roll Add-in
With the new coefficients for each observations, I can recalculate the dependent variable using coefficients for a, b, d01, e_b, as well as a, b, d01, and e_b, such as this:
Y2 for July 2012: rollcoefs_a * a + rollcoefs_b * b + rollcoefs_d01 * d01 + rollcoefs_e_b * e_b + rollcoefs_c
Y2 for June 2012: rollcoefs_a * a + rollcoefs_b * b + rollcoefs_d01 * d01 + rollcoefs_e_b * e_b + rollcoefs_c
Y2 for May 2012: rollcoefs_a * a + rollcoefs_b * b + rollcoefs_d01 * d01 + rollcoefs_e_b * e_b + rollcoefs_c
Y2 for April 2012: rollcoefs_a * a + rollcoefs_b * b + rollcoefs_d01 * d01 + rollcoefs_e_b * e_b + rollcoefs_c
....
Y2 for July 2001: rollcoefs_a * a + rollcoefs_b * b + rollcoefs_d01 * d01 + rollcoefs_e_b * e_b + rollcoefs_c
Since Y is part of the input, the differences between Y (from input) and the new Y2 would be the residual (Y2 is my model fit using the rolling regression - the regular regression has its actual data vs fit data, and the difference between the two being residual - I am just recalculating a new fit using rolling regression)
Victor
Y2 for July 2012: rollcoefs_a * a + rollcoefs_b * b + rollcoefs_d01 * d01 + rollcoefs_e_b * e_b + rollcoefs_c
Y2 for June 2012: rollcoefs_a * a + rollcoefs_b * b + rollcoefs_d01 * d01 + rollcoefs_e_b * e_b + rollcoefs_c
Y2 for May 2012: rollcoefs_a * a + rollcoefs_b * b + rollcoefs_d01 * d01 + rollcoefs_e_b * e_b + rollcoefs_c
Y2 for April 2012: rollcoefs_a * a + rollcoefs_b * b + rollcoefs_d01 * d01 + rollcoefs_e_b * e_b + rollcoefs_c
....
Y2 for July 2001: rollcoefs_a * a + rollcoefs_b * b + rollcoefs_d01 * d01 + rollcoefs_e_b * e_b + rollcoefs_c
Since Y is part of the input, the differences between Y (from input) and the new Y2 would be the residual (Y2 is my model fit using the rolling regression - the regular regression has its actual data vs fit data, and the difference between the two being residual - I am just recalculating a new fit using rolling regression)
Victor
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Roll Add-in
For each roll (set of coefficient) there is a complete series of Y values. Do you want to save the complete series for each roll, or just one observation of that series, and if so, which observation?
Who is online
Users browsing this forum: No registered users and 1 guest
