how to get levels from forecasted differenced data

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

Fregensburg
Posts: 38
Joined: Tue Jan 21, 2014 4:04 am

how to get levels from forecasted differenced data

Postby Fregensburg » Fri Feb 21, 2014 9:26 am

Hi all,

I have non-stationary series, say bond data, that are logged and differenced.
(raw data: ust10y, from which dlnust10y=lnust10y-lnust10y(-4)).
From that, I get a series of forecasted values (dlnust10yf).
Since what I want is actual yields, I need to back out the unlogged levels.To do this, I need first to un-difference, then take exponentials. The second step is obvious (i.e. series ust10yf = exp(lnust10yf) . What about the first?
So I want lnust10yf = dlnust10yf + lnust10yf(-4) but all I have is dlnust10yf, because I forecasted the dlnust10y rather than lnust10y (Duh! –just trying to be pendantically clear).
Any thoughts? Is it possible? If so how?

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

Re: how to get levels from forecasted differenced data

Postby EViews Gareth » Fri Feb 21, 2014 10:09 am

Easiest just to estimate the equation with dlog(ust10y,4) as the dependent variable, and let EViews handle the forecasting for you.

Fregensburg
Posts: 38
Joined: Tue Jan 21, 2014 4:04 am

Re: how to get levels from forecasted differenced data

Postby Fregensburg » Fri Feb 21, 2014 10:15 am

Easiest just to estimate the equation with dlog(ust10y,4) as the dependent variable, and let EViews handle the forecasting for you.

Could you be more precise? I'm not sure I follow you. Maybe I'm being a little dense, but is there references in the manuals for this? And, what you mention is something that can be done with all type of models?

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

Re: how to get levels from forecasted differenced data

Postby EViews Gareth » Fri Feb 21, 2014 10:17 am

You have a series called ust10y. From that, I assume, you created a new series called dlnust10y which is equal to the 4-period difference of the logs of ust10y. You then estimated an equation using dlnust10y as the dependent variable.

I'm saying don't do that. Simply estimate the equation with dlog(ust10y,4) as the dependent variable. When you forecast from that equation EViews will recognise that you have a function as the dependent variable and will ask whether you want to forecast the function or the underlying variable. In your case you want to forecast the underlying variable. EViews will do the de-log and the de-difference for you.

Fregensburg
Posts: 38
Joined: Tue Jan 21, 2014 4:04 am

Re: how to get levels from forecasted differenced data

Postby Fregensburg » Fri Feb 21, 2014 10:20 am

You have a series called ust10y. From that, I assume, you created a new series called dlnust10y which is equal to the 4-period difference of the logs of ust10y. You then estimated an equation using dlnust10y as the dependent variable.

I'm saying don't do that. Simply estimate the equation with dlog(ust10y,4) as the dependent variable. When you forecast from that equation EViews will recognise that you have a function as the dependent variable and will ask whether you want to forecast the function or the underlying variable. In your case you want to forecast the underlying variable. EViews will do the de-log and the de-difference for you.
Ok, got you. so I'm assuming a dialogue window will crop up- if I'm running a program what lines do I need to tell eviews what to do?

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

Re: how to get levels from forecasted differenced data

Postby EViews Gareth » Fri Feb 21, 2014 10:48 am

Nothing really. By default EViews will forecast the underlying series

Fregensburg
Posts: 38
Joined: Tue Jan 21, 2014 4:04 am

Re: how to get levels from forecasted differenced data

Postby Fregensburg » Fri Feb 21, 2014 2:16 pm

Nothing really. By default EViews will forecast the underlying series
thanks. I noticed however that the VAR R^2 (not that I care much about that, trusting R^2 is a bit getting news from the Sun) shoots up from 0.65 (prior value) to 0.8 now that I express the tranformed series as functions. Can't check the rest of it because I've gone home now, but I suspect this type of discrepancy carries through in the rest of the analysis. That worries me. I imagine a statistic like that shouldn't change, and it's just something I overlooked, right?

thanks ever so much.

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

Re: how to get levels from forecasted differenced data

Postby EViews Gareth » Fri Feb 21, 2014 5:16 pm

Should give identical results in every way. For example:

Code: Select all

create m 1990 2020 rndseed 1 series ust10y = rnd series exog = nrnd series lust = log(ust10y) series dlust = d(lust,4) equation eq1.ls dlog(ust10y,4) c exog equation eq2.ls dlust c exog show eq1 show eq2

Fregensburg
Posts: 38
Joined: Tue Jan 21, 2014 4:04 am

Re: how to get levels from forecasted differenced data

Postby Fregensburg » Mon Feb 24, 2014 10:29 am

I'm unsure why, but in my program, when I compare estimations, it turns out that only way to get the equivalent of using series such as:

dlnust10y = lnust10y-lnust10y(-4))

is to use expressions that involve taking seasonal differences, i.e:

dlnust10y = dlog(ust10y,0,4)

rather than resorting to dlog(ust10y,4).

When I do use the expression for seasonal differences, the estimations I get are equivalent to what I got from using the 1st specification (i.e: dlnust10y = lnust10y-lnust10y(-4)), and that doesn't square with what you posted and with what the manual says (UserGuide I, p. 170-171).

The estimates, however, are not equivalent when I estimate a state space model -the model simply fails to converge. Previously, that estimation seemed to be working completely fine. So my question is: why would that be the case?


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests