Page 1 of 1

Forecast averaging

Posted: Wed May 29, 2019 5:07 am
by Katjes
My forecasts are recursively estimated. Therefore, I think it is reasonable to adjust the training sample for forecast averaging.
Is there an easy command to do this:

Code: Select all

for %weight mse ranks 
smpl 2013.1 2018.1
GDP.forcavg(name=test_{%weight}, wgttype={%weight},trainsmpl="2010Q1 2012Q4") GDP_f*
next


Or do I need to average every period individually with a loop over training sample? e.g. adjusting the training sample for every new forecast quarter?

Re: Forecast averaging

Posted: Wed May 29, 2019 7:24 am
by EViews Gareth
I'm not sure I understand the question.

Re: Forecast averaging

Posted: Wed May 29, 2019 3:53 pm
by Katjes
I now solved the issue with a loop, but was wondering whether there is a more suitable solution:

Code: Select all

'flexible training period"
genr mse_fix=NA
genr mse_all=NA

for !ii=0 to 31
smpl 2011q1+!ii 2011q1+!ii
%train_fix="2011q1+"+@str(!ii)+"-8 2011q1+"+@str(!ii)+"-1"  ''' fixed evaluation mse sample
%train_all="2011q1-1 2011q1+"+@str(!ii)+"-1" 'expanding evaluation mse smpl

gdp.forcavg(name=test_a, wgttype=mse, trainsmpl={%train_fix}) gdp_f1 gdp_f2
mse_fix=test_a

gdp.forcavg(name=test_b, wgttype=mse, trainsmpl={%train_all}) gdp_f1 gdp_f2
mse_all=test_b
next