Growth Model Using Detrending Commands

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.

Growth Model Using Detrending Commands

Postby diego.gomes » Mon Mar 28, 2016 2:14 pm

Hi all!

I want to implement a standard deterministic neoclassical growth model in Dynare. However, I would like to left the detrending process to Dynare, using the commands: trend_var, growth_factor, and deflator. As usual, this kind of model has two exogenous sources of growth: population growth and technological growth. In this case, the variables should be detrended by these two sources of growth. I couldn't figure it out how to apply the above commands to detrend each variable using both sources of growth.

The example below by Johannes Pfeifer detrends each variable by only one source of growth.

https://github.com/DynareTeam/dynare/bl ... ionary.mod

I hope to hearing from you guys!

Best to all!
diego.gomes
 
Posts: 17
Joined: Sun Oct 28, 2012 7:37 pm

Re: Growth Model Using Detrending Commands

Postby diego.gomes » Mon Mar 28, 2016 2:33 pm

Can anybody confirm if the statements below are correct in this case?

Code: Select all
var gN gA;
trend_var(growth_factor=gN) N;
trend_var(growth_factor=gA) A;
var(deflator=N*A) k c y;


Thanks!
diego.gomes
 
Posts: 17
Joined: Sun Oct 28, 2012 7:37 pm

Re: Growth Model Using Detrending Commands

Postby diego.gomes » Tue Mar 29, 2016 2:55 am

The following link solved the above question:

http://www.dynare.org/DynareWiki/RemovingTrends

However, in the link, the growth factors are endogenous. In my model, the growth factors are exogenous, taken from data. What is the solution for my case? I'm having trouble solving it.

Best to all!
diego.gomes
 
Posts: 17
Joined: Sun Oct 28, 2012 7:37 pm

Re: Growth Model Using Detrending Commands

Postby jpfeifer » Tue Mar 29, 2016 9:28 am

What do you mean with:
Code: Select all
growth factors are exogenous, taken from data
? Are you trying to do estimation? Or why are the data relevant for your modeling? Following the approach at the link, you could within the model simply define
Code: Select all
g=0.02;

if g is constant at 2 percent.
------------
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: Growth Model Using Detrending Commands

Postby diego.gomes » Tue Mar 29, 2016 1:26 pm

Thanks jpfeifer!

In fact, I want to compute the the transition from a point in time (e.g. 1970) to the future (e.g. 2015 or SS) in order to evaluate the performance of the model in replicating the data. Hence, from 1970 to 2015, for example, I want to take as given the TFP and the population data, and check if the endogenous variables become close to data. After 2015, I will consider steady state (constant) growth rates for both variables. I don't know to do this in Dynare.

Attached is a sketch of my code. I know it is not complete, but just for you to see how I am using the detrending commands.

Best!
Attachments
code.mod
(2.13 KiB) Downloaded 67 times
diego.gomes
 
Posts: 17
Joined: Sun Oct 28, 2012 7:37 pm

Re: Growth Model Using Detrending Commands

Postby jpfeifer » Wed Mar 30, 2016 8:31 am

You need to think more about the structure of the exercise you want to conduct. Is it perfect foresight or are innovations to TFP and population growth stochastic and agents react to these surprises? If the latter, the setup is simular to the one conducted via the simult_-function in https://github.com/JohannesPfeifer/DSGE_mod/tree/master/RBC_news_shock_model, where you could feed in a shock sequence for the bivariate shock process
------------
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: Growth Model Using Detrending Commands

Postby diego.gomes » Wed Mar 30, 2016 6:27 pm

Hi jpfeifer!

As mentioned in the first post, I am using a standard deterministic neoclassical growth model, very simple. Hence, it is perfect foresight, no shocks. Below is the Dynare code for the detrended model (I detrended by hand).

So, two things are still not clear:

1) Writing a non-detrended model and use the Dynare detrend commands to solve the model.

2) Considering the historical values of the exogenous variables (TFP and pop growth rates) in the transition computation. I want to use these historical values until a certain date (e.g. 2015) and after that I consider constant values for these growth rates.

Thanks!
Attachments
code2.mod
(1.88 KiB) Downloaded 69 times
diego.gomes
 
Posts: 17
Joined: Sun Oct 28, 2012 7:37 pm

Re: Growth Model Using Detrending Commands

Postby jpfeifer » Tue Apr 05, 2016 3:47 pm

If you are using perfect forsight, there is no reason to detrend the model. Essentially, you just need to provide the exogenous state variable to the solver. That is done via initval, endval, and shocks. Alternatively, you can use an initval file or just manipulate the oo_.exo_var matrix before calling the solver.
------------
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: Growth Model Using Detrending Commands

Postby diego.gomes » Thu Apr 07, 2016 9:28 pm

Hi jpfeifer,

But if I don't detrend my model, there will be no steady state, right? I think I do need to detrend the model.
diego.gomes
 
Posts: 17
Joined: Sun Oct 28, 2012 7:37 pm

Re: Growth Model Using Detrending Commands

Postby jpfeifer » Fri Apr 08, 2016 7:49 am

A steady state is always conditional on the values of the exogenous variables. In a growth model, the BGP is a sequence of steady states. For deterministic simulations you do not necessarily need to transform this sequence of steady steady states into one fixed steady state, because you can easily compute the terminal condition.
------------
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 10 guests