Nowcasting with partial information into a quarter

For questions regarding programming in the EViews programming language.

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

fsaunders
Posts: 10
Joined: Mon May 15, 2023 4:37 am

Nowcasting with partial information into a quarter

Postby fsaunders » Fri Sep 08, 2023 2:30 am

Hello everybody. I would appreciate your help. I'm currently doing a nowcast, and I'm following this post: https://blog.eviews.com/2020/12/nowcast ... -gets.html

And this is what I have scheduled (it's all in terms of growth rates):

'keep a list of equation names for easier referencing later
%eqlist = "u_midas get_midas bridge"

'create empty forecast series for each equation
group forcs y
for %j {%eqlist}
series y{%j}
forcs.add y{%j}
next

'estimate/nowcast loop
for !i=0 to 20
smpl @first 2017q4+!i

MIDAS1:
equation u_midas.midas(fixedlag=08, midwgt=umidas) y c y(-1) @ monthly\x1(-1) monthly\x2(-1) monthly\x8(-1) weekly\x11(-1) weekly\x12(-1)

MIDAS2:
equation gets_midas.midas(fixedlag=12, midwgt=autogets) y c y(-1) @isperiod("2008Q3") @isperiod("2020Q2") @isperiod("2021Q2") @ monthly\x1(-1) monthly\x2 (-1) monthly\x8(-1) weekly\x11(-1) weekly\x12(-1)

Bridge - Transfer Function:
equation bridge.ls y c ar(1) ma(1) sma(4) @isperiod("2008Q3") @isperiod("2020Q2") @isperiod("2021Q2") x1 x1(-1) x2 x3

'nowcast
smpl 2018q1+!i 2018q1+!i
for %j {%eqlist}
{%j}.forecast temp
y{%j} = temp
d temp
next
next

smpl @all

This is a formal nowcasting evaluation exercise. It is to estimate each model one step ahead, that is, with the information available one month before the publication. The first estimates assumes that we are in February 2018, and we have a sample from 2000Q1 to 2017Q4, and then we forecast for 2018Q1. Then we move forward one quarter, we will assume that we are in May 2018, and we forecast now 2018Q2, and so on until 2023Q1, which means we have twenty rolling nowcasts.

However, I would like to be able to do the same exercise but when I have one month of observations, two months of observations, and three months of observations (as in this case) for a quarter. This is with the objective of being able to evaluate if the RMSE decreases as I add more information.

I have no idea how to program this, even more so because I have monthly and weekly information for the independent variables. I would appreciate any help you can offer me.

Thank you very much in advance!

random_user
Posts: 17
Joined: Wed Jun 23, 2021 1:48 pm

Re: Nowcasting with partial information into a quarter

Postby random_user » Mon Sep 11, 2023 12:04 pm

Well, first you have to decide what you'd do in practice if there's only one month of data (or two months, etc..). If there's just one month of data, you can't use the same equation since you'd have NAs in the explanatory variables. (for example, there might be no data for "monthly\x1(-1)" in your MIDAS, so the equation can no longer be used).

One idea is to modify the lag structure where you lag each explanatory variable by 1 period (x1(-1) becomes x1(-2) for example).

Once you decide what you'd do, then you can achieve what you're after by putting another loop inside your loop. This new loop would modify the equation structure and generate forecasts.

It will require a bit of programming knowledge, though... so you'd have to think it through carefully.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 30 guests