Hello all,
I want to run out-of-sample forecasts with rolling regressions for N countries from September 2008 to August 2017 *************;
********************************************************* Data Set *****************************************
* My dataset is panel monthly data with 10 countries
* Sample period: From December 1996 to August 2017.
Here is an example to show my data set.
Date Country Y X Number Observation
12/31/1996 Australia 1 1
01/31/1997 Australia 1 2
......
.....
.....
08/31/2017 Australia 1 250
12/31/1996 Canada 2 1
........
.......
08/31/2017 Australia 2 250
......
.....
......
12/31/1996 UK 10 1
.......
......
......
08/31/2017 UK 10 250
****************** Modified Data set ********************************************
I modified the above data set by creating a new date variable called 'Rankdate' that shows the ending date in each rolling regression, as follows:
Rankdate Date Country Y X Number Observations
August 2008 12/31/1996 Australia 1 1
August 2008 01/31/1997 Australia 1 2
......
August 2008 08/31/2008 Australia 1
September 2008 01/31/1997 Australia 1
.....
September 2008 09/30/2008 Australia 1
...................
.....................
August 2017 12/31/2005 Australia 1
............
August 2017 08/30/2017 Australia 1
August 2008 12/31/1996 Canada 2
........
.......
......
.....
......
August 2017 08/31/2017 UK 10
************************************ Goal: Run Recursive Regression ************************************
* I want to run several recursive regressions for EACH country (i.e. keeps the starting date (i.e., December 1996) fixed,
and then adding an observation to the end of the sample with every run of the regression).
More specifically, I run the following sas code:
PROC UCM DATA = ma.developingrank(where=(country='CZ')); BY rankdate;
ID DATE INTERVAL=MONTH;
MODEL RETURN = MA;
IRREGULAR;
level var=0;
estimate back=1 outest=ma.OOSRollEst1;*The default is BACK=0,
which means that the forecast starts at the end of the available data;
FORECAST back=1 LEAD=1 outfor=ma.OOSRollRes1 plot=forecasts;
*forecast span;*This reports the one-step ahead out-of-sample forecast;
RUN;
My problem, however, is that the above code gives me forecast for each rolling window, and I don't know which model to report in my paper, and HOW?
Thanks for your help in advance.