Deterministic Curdia&Woodford

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.

Deterministic Curdia&Woodford

Postby lah89 » Sun Mar 02, 2014 5:30 pm

Hey all,

I am new to Dynare and trying to replicate Curdia&Woodford "Credit Frictions and Optimal Monetary Policy".
The equations are taken from http://www.columbia.edu/~mw2230/credit_Appendix.pdf.
I am modelling it in a deterministic way to later-on deal with OBCs.

How can I get this running ? (at least up to a point where it ll tell me that steady; couldnt find a SS, I m currently reading on how to use fsolve in matlab meanwhile :-P )

Appreciate any comments on current structure etc. !
Last edited by lah89 on Thu Apr 24, 2014 3:44 pm, edited 1 time in total.
lah89
 
Posts: 31
Joined: Tue Jan 28, 2014 1:54 pm

Re: Deterministic Curdia&Woodford

Postby lah89 » Mon Mar 17, 2014 12:40 pm

I would really appreciate any help on this.
Right now it gives me:
line 50, col 64: syntax error, unexpected ';'

??? Error using ==> dynare at 156
DYNARE: preprocessing failed


althought I dont see any ";" missing, thus I guess it is a structural error !?
lah89
 
Posts: 31
Joined: Tue Jan 28, 2014 1:54 pm

Re: Deterministic Curdia&Woodford

Postby jpfeifer » Mon Mar 17, 2014 1:10 pm

Check the brackets in those equations. You have opening brackets that do not close.
------------
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: Deterministic Curdia&Woodford

Postby lah89 » Mon Mar 17, 2014 1:36 pm

jpfeifer wrote:Check the brackets in those equations. You have opening brackets that do not close.


thx for the reply! I m embarrassed ;)

Current error is

Code: Select all
line 64, col 1: syntax error, unexpected INT_NUMBER


updated file attached.
lah89
 
Posts: 31
Joined: Tue Jan 28, 2014 1:54 pm

Re: Deterministic Curdia&Woodford

Postby jpfeifer » Mon Mar 17, 2014 1:58 pm

The steady_state_model-block must define the steady state explicitly, not implicitly. See the examples in "A Guide to Specifying Observation Equations for the Estimation of DSGE Models" at https://sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf.
------------
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: Deterministic Curdia&Woodford

Postby lah89 » Mon Mar 17, 2014 3:01 pm

jpfeifer wrote:The steady_state_model-block must define the steady state explicitly, not implicitly. See the examples in "A Guide to Specifying Observation Equations for the Estimation of DSGE Models" at https://sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf.



Thats what I had guessed and why I opend the topic regarding the steady state model block, thanks a lot!
lah89
 
Posts: 31
Joined: Tue Jan 28, 2014 1:54 pm

Re: Deterministic Curdia&Woodford

Postby lah89 » Mon Mar 17, 2014 4:41 pm

Crossread your paper, thanks again!, find it really well-written by the way.

unfortunately right now no time to solve the system of SS equations by hand towards an explicit form thus I thought I would try running the .mod file without the steady-state-model block (at least up to a point where Dynare tells me that it can not find the SS since I m workin on non-linear level equations without any initvals) but I get this error:
Code: Select all
File: [b]needhelp3.m[/b] Line: 283 Column: 18
The expression to the left of the equals sign is not a valid target for an assignment.

Error in ==> dynare at 162
evalin('base',fname) ;
 


any idea what this might be? Is this already related with the SS computation ?
google said the result could be a mixup between '=' and '==' but I dont see where this applies here.
Also I am running the .mod file as usual, using "dynare needhelp3" and not running it as an .m file (at least not intentionally)

updated file attached.
lah89
 
Posts: 31
Joined: Tue Jan 28, 2014 1:54 pm

Re: Deterministic Curdia&Woodford

Postby jpfeifer » Mon Mar 17, 2014 7:57 pm

Parameters also need to be specified explicitly. You cannot use code like
Code: Select all
(theta - 1)^(-1) = 0.15;

The error message refers to the m-file generated by Dynare. You can open it and see that Dynare translated the above line into:
Code: Select all
(theta - 1)^(-1) = 0.15;

which is not valid Matlab code.
------------
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: Deterministic Curdia&Woodford

Postby lah89 » Thu Apr 10, 2014 1:49 pm

thanks for the hint on the parameters, changed it and also made some further progress (I thought).

Currently trying to fix:
Impossible to find the steady state. Either the model doesn't have a steady state, there
are an infinity of steady states, or the guess values are too far from the solution


--> This most probably comes from a misspecification of the model, right (since I am trying to replicate a paper with a unique SS) ?

Honestly I am not so sure whether I am caputuring http://www.columbia.edu/~mw2230/credit_0709.pdf with regard to the exogenous variables correctly.
Unclear to me are how to treat G,tau,mu_omega,Z, C_bar_i and the fiscal rule for b_G. (Probably this does not belong here, are there any ECON forums where people discuss papers?)


2 MOD-files attached, deterministic and stochastic version(in which I thought I d know how to deal with the exogenous variables)
I would be grateful if someone could have a look at it ! Appreciate any help !
Last edited by lah89 on Tue Apr 22, 2014 2:08 pm, edited 2 times in total.
lah89
 
Posts: 31
Joined: Tue Jan 28, 2014 1:54 pm

Re: Deterministic Curdia&Woodford

Postby jpfeifer » Thu Apr 10, 2014 5:11 pm

It is not necessarily a misspecification issue. Nothing guarantees the steady state to be unique. The important thing is that finding steady states even for correct mod-files is hard and it is always recommended to provide as good starting values as possible. Having said that, it is strange that the steady state finding results in equations 3 and 5 containing NaN because z and mu_omega go to 0. I would focus on those equations.
------------
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: Deterministic Curdia&Woodford

Postby lah89 » Thu Apr 24, 2014 3:46 pm

thanks again!

made some changes/progress again (decided to already include the extensions of the 2010 paper) and now all but 2 of the static equation residuals are zero when computing the steady state.
Already browsed the forums but still not 100% sure about how to approach this (what are the different options?) and whether there are any further measures for error-diagnostics?


Thanks again in advance !

-mod. FILE ATTACHED BELOW
Last edited by lah89 on Mon Apr 28, 2014 12:52 pm, edited 1 time in total.
lah89
 
Posts: 31
Joined: Tue Jan 28, 2014 1:54 pm

Re: Deterministic Curdia&Woodford

Postby lah89 » Mon Apr 28, 2014 8:40 am

I fixed it :)
lah89
 
Posts: 31
Joined: Tue Jan 28, 2014 1:54 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 6 guests