Recursive modelling approach
Moderators: EViews Gareth, EViews Moderator
Recursive modelling approach
hello
Last edited by RouzbehR on Mon Aug 06, 2012 2:32 pm, edited 2 times in total.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Recursive modelling approach
I don't follow where your 512 models come from. What are the combinations?
Re: Recursive modelling approach
Thank you so much for you reply.
I have nine variables in total. So for first month I am forecasting all the variables against each other. Let me give you an example. Let say I have variable a, b and c.
For first month I will be using data from 1980(1) to 1989(12) and forecast 1990(1). I will run an ols estimation on a and b, b and a, a and c, c and a, b and c, c and b. Then I will choose the highest R-square, AIC and BIC from those models I estimated and put them in each matrix.
The reason for this is to find out which of these model selection criteria is the best to use in order to predict the future returns.
Again, I do really appreciate this forum and your help.
Best
I have nine variables in total. So for first month I am forecasting all the variables against each other. Let me give you an example. Let say I have variable a, b and c.
For first month I will be using data from 1980(1) to 1989(12) and forecast 1990(1). I will run an ols estimation on a and b, b and a, a and c, c and a, b and c, c and b. Then I will choose the highest R-square, AIC and BIC from those models I estimated and put them in each matrix.
The reason for this is to find out which of these model selection criteria is the best to use in order to predict the future returns.
Again, I do really appreciate this forum and your help.
Best
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Recursive modelling approach
Just so I'm 100% certain - you only want to perform univariate regression (i.e. each regression only has one regressor, plus a constant), and you want to do symmetric regressions, i.e. regress A on B, and separately regress B on A and record the R-squared from both?
Re: Recursive modelling approach
Dear Gareth,
You are absolutely correct. But I have nine variables so for each month I will have 512 univariate regressions and each of them have to be forecasted recursivly. Is it possible to make a program where I do everything under the same loop or should I just run a recursive forecast for each combination of the variables?
Thank you for being patient with me. I appreciate your help.
Best
You are absolutely correct. But I have nine variables so for each month I will have 512 univariate regressions and each of them have to be forecasted recursivly. Is it possible to make a program where I do everything under the same loop or should I just run a recursive forecast for each combination of the variables?
Thank you for being patient with me. I appreciate your help.
Best
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- Joined: Tue Sep 16, 2008 5:38 pm
Recursive modelling approach
Writing a program to do it should be easy enough. Read through the first few examples in the programming guide.
http://forums.eviews.com/viewtopic.php?t=1638
http://forums.eviews.com/viewtopic.php?t=1638
Re: Recursive modelling approach
Dear Gareth,
I found out what I needed to do and I managed to program it. Here is the program and my data.
So what I am doing here is that I am running regressions with each combination possible and using the excess return as the dependent variable. So at each time I will have 512 models to handle. Now I can change the smpl to do a manually recursive modelling, so I can just fix the start date and just increase the end date but then I have to do it 360 times. So I was wondering if I can add another loop which is going to recursively estimate the models. In addition I want it to save the r-square, BIC and AIC values in a matrix where I will have 512 values of each of the criteria for each month.
So as a conclusion, I want the code above to move recursively and do the same as it is doing here. I just need to know if it is possible?
Best,
Rouzbeh
I found out what I needed to do and I managed to program it. Here is the program and my data.
So what I am doing here is that I am running regressions with each combination possible and using the excess return as the dependent variable. So at each time I will have 512 models to handle. Now I can change the smpl to do a manually recursive modelling, so I can just fix the start date and just increase the end date but then I have to do it 360 times. So I was wondering if I can add another loop which is going to recursively estimate the models. In addition I want it to save the r-square, BIC and AIC values in a matrix where I will have 512 values of each of the criteria for each month.
So as a conclusion, I want the code above to move recursively and do the same as it is doing here. I just need to know if it is possible?
Best,
Rouzbeh
Last edited by RouzbehR on Mon Aug 06, 2012 2:34 pm, edited 2 times in total.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Recursive modelling approach
Could you please refer to an example I could look at?
Best,
Rouzbeh
Best,
Rouzbeh
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Recursive modelling approach
Just use any of the multitude of rolling regression examples on the forum, and when it comes to doing the actual estimation, insert your loop. The only tricky bit is working out the matrix sizes and placement for the statistics you wish to store.
Re: Recursive modelling approach
Dear,
I have the two codes below and I need to combine these two codes such that I do a recursive forecasting but for all the combinations of the variables using the excess return as the dependent variable.
Do you think you can help me with putting these two together?
I appreciate your help.
Best
I have the two codes below and I need to combine these two codes such that I do a recursive forecasting but for all the combinations of the variables using the excess return as the dependent variable.
Do you think you can help me with putting these two together?
I appreciate your help.
Best
Last edited by RouzbehR on Mon Aug 06, 2012 2:33 pm, edited 1 time in total.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Recursive modelling approach
As I said above, just replace the estimation command in the first program with the for loop of the second program, and then figure out the matrix placement bits.
Who is online
Users browsing this forum: No registered users and 3 guests
