Nowcasting with MIDAS

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

Jackaba_1
Posts: 2
Joined: Tue Jul 11, 2023 2:36 pm

Nowcasting with MIDAS

Postby Jackaba_1 » Wed Jul 12, 2023 2:40 pm

Hello everyone.

How are you?

I'm really struggling with this problem, and I would really appreciate some help.

Suppose that I want to forecast 2022Q3 GDP using a monthly variable for industrial production (let´s call it IP), the first lag of GDP and a constant with MIDAS. Now, let's consider that I'm in July/22 and have the value for the July/22 IP, and I want to forecast my 2022Q3 GDP using all data for IP until July/22 (consider a sample from 2010Q1-2022Q2 for GDP and 2010M1-2022M7 for IP). Considering that, my idea was to use two lags of IP in my Midas estimation. In the next month, with the August/22 IP in hand, I would reduce lag structure to one and so on.

In Eviews, we can can estimate the equation below without problem for the sample 2010Q1-2022Q2:

equation eq_umid.midas(midwgt=umidas, fixedlag=3) gdp c gdp(-1) @monthly\IP(-2)

The problem is when I try to forecast the GDP for 2022Q3, because I receive the message: "Unable to compute due to missing data". But this make no sense to me, given that I have all data that I need with the IP with two lags (as far as I know, the zero lag is equivalent to the last month of the quarter, so with two lags of IP, and considering I want to forecast the GDP for 2022Q3, Eviews should be using the data of IP of 2022M5, 2022M6 and 2022M7 for the prediction).

I don't know if anyone has ever faced a similar problem, but I would really appreciate some help.

Thank you very much.

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

Re: Nowcasting with MIDAS

Postby EViews Gareth » Wed Jul 12, 2023 5:05 pm

What is the date range of the Monthly page?

You are correct that you need to use two lags of IP to handle the offset. However you need space for those two final lags. Two values of July 2022 would need to be held in September 2022, so the page needs to contain those dates.

Here's some code with FRED data that shows it working (as an aside, your post used 2022 instead of 2023, so I went with it).

Code: Select all

close @wf
wfcreate(page=quarterly) q 2010 2022q3
pagecreate(page=monthly) m 2010 2022m9
fetch indpro
pageselect quarterly
fetch gdp
'na out the last value of gdp
smpl @last @last
gdp = na
smpl @all
equation eq_umid.midas(midwgt=umidas, fixedlag=3) gdp c gdp(-1) @ monthly\indpro(-2)
smpl 2022q3 2022q3
eq_umid.forecast gdp_f
Follow us on Twitter @IHSEViews

Jackaba_1
Posts: 2
Joined: Tue Jul 11, 2023 2:36 pm

Re: Nowcasting with MIDAS

Postby Jackaba_1 » Fri Jul 14, 2023 10:20 am

Gareth, thank you very much for the help.

Using the code you provided, I've found the problem: when reading the excel spreadsheet for the quarterly data, Eviews was not using for example 2022Q1, 2022Q2, ..., but instead 03/01/2022, 06/01/2022, ... I think this was messing up with the matching of the quarterly data with the monthly one. Now it's working.

I really appreciate for you time and help!

Best regards!


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 32 guests