Deterministic Curdia&Woodford

Hey all,

I am new to Dynare and trying to replicate Curdia&Woodford “Credit Frictions and Optimal Monetary Policy”.
The equations are taken from 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 :stuck_out_tongue: )

Appreciate any comments on current structure etc. !

I would really appreciate any help on this.
Right now it gives me:

althought I dont see any “;” missing, thus I guess it is a structural error !?

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

thx for the reply! I m embarrassed :wink:

Current error is

line 64, col 1: syntax error, unexpected INT_NUMBER

updated file attached.

The steady_state_model-block must define the steady state explicitly, not implicitly. See the examples in Pfeifer (2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models”

[quote=“jpfeifer”]The steady_state_model-block must define the steady state explicitly, not implicitly. See the examples in Pfeifer(2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models” .

Thats what I had guessed and why I opend the topic regarding the steady state model block, thanks a lot!

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:

File: **needhelp3.m** 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.

Parameters also need to be specified explicitly. You cannot use code like

(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:

(theta - 1)^(-1) = 0.15;
which is not valid Matlab code.

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

Currently trying to fix:

[quote]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[/quote]

–> 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 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 !

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.

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

I fixed it :slight_smile:

Hi I’ve noticed you have previously worked on Curdia and Woodford (2009) credit frictions and monetary policy. Are you able to share your mod file. I too I’m currently working on the same paper and your file will help so much.

Thanks

Dynare replication of the model can be found on Macroeconomic Model Data Base. Click “Download Replication package” and it’s in there