Forecast averaging

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

Katjes
Posts: 55
Joined: Thu Oct 02, 2008 5:46 am

Forecast averaging

Postby Katjes » Wed May 29, 2019 5:07 am

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?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 12419
Joined: Tue Sep 16, 2008 5:38 pm

Re: Forecast averaging

Postby EViews Gareth » Wed May 29, 2019 7:24 am

I'm not sure I understand the question.
Follow us on Twitter @IHSEViews

Katjes
Posts: 55
Joined: Thu Oct 02, 2008 5:46 am

Re: Forecast averaging

Postby Katjes » Wed May 29, 2019 3:53 pm

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


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 8 guests