Detrend non stationary variables

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Detrend non stationary variables

Postby xuyongdeng » Mon Nov 09, 2015 4:03 pm

Hi there, I have a two country DSGE model. There is one equation involving foreign asset, which is nonstationary and increases at a stochastic rate. I am not sure how can I detread this. The equation is:

b_f[t]=(1 + r_f[t])*b_f[t-1] + 0.37(EX[t-1] - Q[t-1]) -0.385*IM[t-1]

where b_f is foreign asset, r_f is the foreign interest rate which is exogenous. EX, Q and IM are defined as usual. Other equations in the DSGE model are not written here.

All the variables in the system are stationary, except b_f. Apparently, I have to detrend b_f before running dynare. Dose anyone have experience to detrend this?

Any help are highly appreciated.

Regards
Yongdeng Xu
xuyongdeng
 
Posts: 13
Joined: Mon Aug 10, 2015 9:08 pm

Re: Detrend non stationary variables

Postby jpfeifer » Tue Nov 10, 2015 8:12 pm

Your setup looks strange. Are you sure that your other variables are stationary in this setup? If for example consumption is a function of foreign assets, it will inherit the nonstationarity.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Detrend non stationary variables

Postby xuyongdeng » Sat Nov 14, 2015 12:09 am

Hi jpfeifer,

Thank you for your reply. Yes, bf is the only non-stationary variables. Consumption is a function of output, EX, IM,K, and government spending. It is a stationary variable.

I am thinking may be I can use an auxiliary variable B[t] = b_f[t] - (1 + r_f[t])*b_f[t-1]. And re-write the equation as B[t]= 0.37(EX[t-1] - Q[t-1]) -0.385*IM[t-1]. Then all the variables in the model are stationary. Dynare should solve the model. Does it work?

Thanks
Yongdeng
xuyongdeng
 
Posts: 13
Joined: Mon Aug 10, 2015 9:08 pm

Re: Detrend non stationary variables

Postby jpfeifer » Sat Nov 14, 2015 9:02 am

I don't understand your answer. Net exports are typically a function of net foreign assets. If they are not stationary, so are net exports and consumption and all other variables. What is the mechanism that guarantees that net foreign assets are the only non-stationary variable in the model?
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Detrend non stationary variables

Postby xuyongdeng » Sat Nov 14, 2015 11:49 pm

Hi jpfeifer,

Thank you very for your reply. Could you please have a look at my .mod file? I think the problem comes from eq (9) in .mod file.
q[t]=E(q[t+1]) +rf+r.
I've tried to multiply the RHS of the above equation by 0.999. Dynare can solve it then. But if I multiply the RHS by any number that is bigger or equal to zero, dynare cannot solve it. I want to keep this equation. Any suggestion to deal with this problem?
Thanks again for your help.

Regards
Yongdeng
Attachments
OpenEconomy.mod
(3.42 KiB) Downloaded 94 times
xuyongdeng
 
Posts: 13
Joined: Mon Aug 10, 2015 9:08 pm

Re: Detrend non stationary variables

Postby jpfeifer » Sun Nov 15, 2015 3:32 pm

I cannot stress this enough: you need to understand the economic logic of your model. It will provide an answer to your question. As is, your model does not uniquely determined one of the variables.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests