Linear and Nonlinear equations mixed.New Keynesian Model.

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.

Linear and Nonlinear equations mixed.New Keynesian Model.

Postby petros_varth » Fri Mar 05, 2010 12:47 am

Hi all,

I use the standard New Keynesian model in order to calculate steady-state and moments. However, i have found only log-linear examples. I try to mix the non-linear equations with a linear Taylor rule and the approximated forward looking NKPC. So all endogenous variables are in Levels except inflation and the marginal cost. Could anyone verify if this approach is correct or not?

Thanks a lot in advance.

Petros
Attachments
stagprices_nonlinear.mod
(2.51 KiB) Downloaded 675 times
petros_varth
 
Posts: 45
Joined: Wed Sep 30, 2009 5:35 pm

Re: Linear and Nonlinear equations mixed.New Keynesian Model.

Postby AssiaEzzeroug » Sun Mar 07, 2010 3:32 pm

Hi,

why don't you write down the non linear Phillips curve instead? You can find a recent post on the Dynare forum about that.

Best
AssiaEzzeroug
 
Posts: 83
Joined: Tue Nov 24, 2009 3:48 pm

Re: Linear and Nonlinear equations mixed.New Keynesian Model.

Postby petros_varth » Mon Mar 08, 2010 5:58 pm

Hi,

I checked the forum but i didn't find any example of the non linear New Keynesian PC only a post that is referred to some papers(not named),did you know if there is any example with the non-linear version of the NKPC??? However, i also use in this script a linear Taylor rule. I compare this with the log-linearized version of the New Keynesian mod file (model (linear) ) moments and IRFs and are very very similar, they have only infinitesimal differences. This approximation is incorrect?

Anyway thanks a lot for your time.

Petros
petros_varth
 
Posts: 45
Joined: Wed Sep 30, 2009 5:35 pm

Re: Linear and Nonlinear equations mixed.New Keynesian Model

Postby jonathanb » Thu Apr 25, 2013 8:44 am

I am interested too
viewtopic.php?f=2&t=4600
jonathanb
 
Posts: 54
Joined: Wed Sep 17, 2008 8:52 pm
Location: New York

Re: Linear and Nonlinear equations mixed.New Keynesian Model

Postby jpfeifer » Sat Apr 27, 2013 6:37 pm

The attached mod-file, which may soon be delivered in the Dynare examples, is entered non-linearly. It is based on Fernandez-Villaverdes Baseline DSGE model. The reference can be found in the header of the mod-file.
Attachments
NK_baseline.mod
Mod-file
(9.15 KiB) Downloaded 999 times
NK_baseline_steadystate.m
Steady state file
(2.72 KiB) Downloaded 649 times
------------
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: Linear and Nonlinear equations mixed.New Keynesian Model

Postby richardgu26 » Wed May 22, 2013 6:50 am

jpfeifer wrote:The attached mod-file, which may soon be delivered in the Dynare examples, is entered non-linearly. It is based on Fernandez-Villaverdes Baseline DSGE model. The reference can be found in the header of the mod-file.


@jpfeifer, I have a question regarding this model: in Fernandez-Villaverdes's paper (2006), variables are rescaled by technology growth rate so that rescaled variables would be stationary (correct me, if wrong). No problems with codes as posted. My confusion goes to fitting the model into real data: in this case, do I have to rescale real time series as well? Or this stochastic growth trend generated by technology is already included in nonlinear FOCs, so there is no further data rescaling problem.

Thanks in advance.
richardgu26
 
Posts: 13
Joined: Wed May 22, 2013 6:41 am

Re: Linear and Nonlinear equations mixed.New Keynesian Model

Postby jpfeifer » Wed May 22, 2013 6:19 pm

The model is only calibrated. If you want to estimate it, you still need to define a measurement equation that maps the stationary model variables to the data. In case of the Baseline DSGE model, Fernandez-Villaverde uses first differences.
------------
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: Linear and Nonlinear equations mixed.New Keynesian Model

Postby richardgu26 » Thu May 23, 2013 1:11 am

jpfeifer wrote:The model is only calibrated. If you want to estimate it, you still need to define a measurement equation that maps the stationary model variables to the data. In case of the Baseline DSGE model, Fernandez-Villaverde uses first differences.


Thanks!
richardgu26
 
Posts: 13
Joined: Wed May 22, 2013 6:41 am

Re: Linear and Nonlinear equations mixed.New Keynesian Model

Postby zahra2309 » Sun May 26, 2013 12:36 pm

Hi
I am fresh student in DSGE models. I have question about the attached mod file.
As I know the equilibrium conditions Just wrote in NK_baseline.mod (correct me, if wrong), but there is no initial values, so why this does not lead to errors( as mine)?
please help me about this.
Thank you in advance
zahra2309
 
Posts: 22
Joined: Sat Feb 23, 2013 10:54 am

Re: Linear and Nonlinear equations mixed.New Keynesian Model

Postby jpfeifer » Sun May 26, 2013 12:49 pm

Because there is a steady state file supplying the analytical steady state.
------------
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: Linear and Nonlinear equations mixed.New Keynesian Model

Postby zahra2309 » Mon May 27, 2013 10:38 am

Thank you a lot.
So If I have the log-linearized model,I can find the IRFs. I mean it is not necessary to have a steady state file too. am I right?
Thank you.
zahra2309
 
Posts: 22
Joined: Sat Feb 23, 2013 10:54 am

Re: Linear and Nonlinear equations mixed.New Keynesian Model

Postby jpfeifer » Mon May 27, 2013 12:36 pm

If your model is log-linearized, it has steady state 0. You don't need a steady state file in this case.
------------
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: Linear and Nonlinear equations mixed.New Keynesian Model

Postby zahra2309 » Sat Jun 01, 2013 11:52 am

jpfeifer wrote:If your model is log-linearized, it has steady state 0. You don't need a steady state file in this case.

Thank you very much!
zahra2309
 
Posts: 22
Joined: Sat Feb 23, 2013 10:54 am

Re: Linear and Nonlinear equations mixed.New Keynesian Model

Postby hfukate » Wed Oct 05, 2016 2:27 pm

jpfeifer wrote:The attached mod-file, which may soon be delivered in the Dynare examples, is entered non-linearly. It is based on Fernandez-Villaverdes Baseline DSGE model. The reference can be found in the header of the mod-file.


Thanks for providing the code. I have downloaded both files and run the dynare code on my computer. However, I got a warning message regarding some steady state parameters.

Warning: Some of the parameters have no value (gammma1, Rbar, Lambdax) when using
steady. If these parameters are not initialized in a steadystate file, Dynare may not
be able to solve the model...
> In test_for_deep_parameters_calibration (line 46)
In steady (line 33)
In NK_baseline (line 351)
In dynare (line 180)


The programme has finished without error message. It seems like steady state has been found by "fsolve" function. My question is, shall I worry about the warning message above? Thanks a lot!

Hsuan

Equation solved.

fsolve completed because the vector of function values is near zero
as measured by the default value of the function tolerance, and
the problem appears regular as measured by the gradient.
hfukate
 
Posts: 2
Joined: Wed Oct 05, 2016 2:20 pm

Re: Linear and Nonlinear equations mixed.New Keynesian Model

Postby jpfeifer » Wed Oct 05, 2016 4:23 pm

No, you should not worry. The warning is
Code: Select all
If these parameters are not initialized in a steadystate file

but these parameters are indeed set in the steadystate-file.
------------
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

Next

Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 8 guests