Page 1 of 1
Recursive modelling approach
Posted: Fri Aug 03, 2012 4:33 pm
by RouzbehR
hello
Re: Recursive modelling approach
Posted: Fri Aug 03, 2012 4:39 pm
by EViews Gareth
I don't follow where your 512 models come from. What are the combinations?
Re: Recursive modelling approach
Posted: Fri Aug 03, 2012 5:07 pm
by RouzbehR
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
Re: Recursive modelling approach
Posted: Fri Aug 03, 2012 5:52 pm
by EViews Gareth
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
Posted: Sat Aug 04, 2012 1:52 am
by RouzbehR
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
Recursive modelling approach
Posted: Sat Aug 04, 2012 6:25 am
by EViews Gareth
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
Re: Recursive modelling approach
Posted: Sat Aug 04, 2012 5:08 pm
by RouzbehR
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
Recursive modelling approach
Posted: Sat Aug 04, 2012 5:39 pm
by EViews Gareth
Sure.
Re: Recursive modelling approach
Posted: Sun Aug 05, 2012 1:46 am
by RouzbehR
Could you please refer to an example I could look at?
Best,
Rouzbeh
Re: Recursive modelling approach
Posted: Sun Aug 05, 2012 3:14 pm
by EViews Gareth
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
Posted: Sun Aug 05, 2012 3:20 pm
by RouzbehR
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
Re: Recursive modelling approach
Posted: Sun Aug 05, 2012 3:37 pm
by EViews Gareth
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.