Page 1 of 2

Linear and Nonlinear equations mixed.New Keynesian Model.

PostPosted: Fri Mar 05, 2010 12:47 am
by petros_varth
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

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

PostPosted: Sun Mar 07, 2010 3:32 pm
by AssiaEzzeroug
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

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

PostPosted: Mon Mar 08, 2010 5:58 pm
by petros_varth
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

Re: Linear and Nonlinear equations mixed.New Keynesian Model

PostPosted: Thu Apr 25, 2013 8:44 am
by jonathanb
I am interested too
viewtopic.php?f=2&t=4600

Re: Linear and Nonlinear equations mixed.New Keynesian Model

PostPosted: Sat Apr 27, 2013 6:37 pm
by jpfeifer
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.

Re: Linear and Nonlinear equations mixed.New Keynesian Model

PostPosted: Wed May 22, 2013 6:50 am
by richardgu26
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.

Re: Linear and Nonlinear equations mixed.New Keynesian Model

PostPosted: Wed May 22, 2013 6:19 pm
by jpfeifer
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.

Re: Linear and Nonlinear equations mixed.New Keynesian Model

PostPosted: Thu May 23, 2013 1:11 am
by richardgu26
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!

Re: Linear and Nonlinear equations mixed.New Keynesian Model

PostPosted: Sun May 26, 2013 12:36 pm
by zahra2309
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

Re: Linear and Nonlinear equations mixed.New Keynesian Model

PostPosted: Sun May 26, 2013 12:49 pm
by jpfeifer
Because there is a steady state file supplying the analytical steady state.

Re: Linear and Nonlinear equations mixed.New Keynesian Model

PostPosted: Mon May 27, 2013 10:38 am
by zahra2309
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.

Re: Linear and Nonlinear equations mixed.New Keynesian Model

PostPosted: Mon May 27, 2013 12:36 pm
by jpfeifer
If your model is log-linearized, it has steady state 0. You don't need a steady state file in this case.

Re: Linear and Nonlinear equations mixed.New Keynesian Model

PostPosted: Sat Jun 01, 2013 11:52 am
by zahra2309
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!

Re: Linear and Nonlinear equations mixed.New Keynesian Model

PostPosted: Wed Oct 05, 2016 2:27 pm
by hfukate
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.

Re: Linear and Nonlinear equations mixed.New Keynesian Model

PostPosted: Wed Oct 05, 2016 4:23 pm
by jpfeifer
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.