Dynare codes for Christiano, Motto and Rostagno (2010)

Dear Dynare users,

for those of you interested in the Christiano, Motto and Rostagno (2010) model (DSGE model with a banking sector),

on my website ( fabioverona.rvsteam.net/research_papers_5.html ) you can find the Dynare codes as well as some technical notes on the implementation of that model.

I hope you find these notes useful (any comments are welcome of course)


1 Like

Thanks very much!

MatlabNerd :open_mouth:

thanks very much

im slightly confused as to why the net worth equation (eq 13) not being log-linearized in this code? other equations seem to have been linearized. am i missing something?

my fault. its not just the networth equation but all of them are in the non-linearized form as in the CMR appendix. Thanks!

This information provided by you is very constructive for correct planning. I like your work for providing information to the other.

Thanks for your suggestion. I really appreciate that you took all this time to try and help us. Keep up the good work. Keep on taking action.

Hi Fabio

I am experiencing a minor problem when I use your code for the model.

I am using the DYNARE CODE and the notes that you have posted on your website.

Now I want to simulate the model in DYNARE with different parameter values. (I.e. in a loop where a parameter have 3 different values, in order to see the how it for example changes the IRFs)

The code works fine when i USE the steady state file ss_CMR_baseline_US.mat that is in the folder already. However, when I try to change the parameter values in ss_CMR_baseline_US.mat in the workspace and run the mod file no changes occurs. I have also tried to run ss_CMR_baseline.m to create a new steady state file (And I have removed the % signs at the bottom where it saves the parameter values) with different parameters, but when I try to run the code for ss_CMR_baseline.m an error occurs that says:

Error using erfc
Input must be real and full.

Error in normcdf>localnormcdf (line 124)
p(todo) = 0.5 * erfc(-z ./ sqrt(2));

Error in normcdf (line 46)
[varargout{1:max(1,nargout)}] = localnormcdf(uflag,x,varargin{:});

Error in funcontract2CMR (line 9)
WW = 

Error in @(x)funcontract2CMR(x,RkXUU,sigmaUU,ReXUU,muUU)

Error in trustnleqn (line 200)
    F = feval(funfcn{3},reshape(xTrial,sizes.xRows,sizes.xCols),varargin{:});

Error in fsolve (line 366)

Error in SS_CMR_baseline (line 108)
p = fsolve(@(x) funcontract2CMR(x,RkXUU,sigmaUU,ReXUU,muUU), x0, ...

So it seems to me that the error occurs when calculating the values in ss_CMR_baseline.m, and I don’t know how to fix this.

So my questions are:

  1. What am I missing? Why can’t I just change the parameter in the workspace for the file ss_CMR_baseline_US.mat in order to change the values of the parameters and get different results?

  2. Do you(or any in the forum) know how to fix the problem when running ss_CMR_baseline.m

  3. Is there another way to change the values of the parameters than through the steady state file?

I would really appreciate all the help I can get.

Best regards

The parameters of the model can not changed,so it’s author’s wrong,it can not use for another place.