Page 1 of 1

Dynare codes for Christiano, Motto and Rostagno (2010)

PostPosted: Thu Sep 27, 2012 10:07 am
by fabiover
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 ( http://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)

Best

Re: Dynare codes for Christiano, Motto and Rostagno (2010)

PostPosted: Tue Oct 09, 2012 11:54 pm
by MatlabNerd
Thanks very much!

MatlabNerd :shock:

Re: Dynare codes for Christiano, Motto and Rostagno (2010)

PostPosted: Tue Apr 02, 2013 11:09 pm
by Mitoa
thanks very much

Re: Dynare codes for Christiano, Motto and Rostagno (2010)

PostPosted: Fri Aug 30, 2013 11:59 am
by ajpirzada
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?

Re: Dynare codes for Christiano, Motto and Rostagno (2010)

PostPosted: Tue Sep 10, 2013 2:53 pm
by ajpirzada
my fault. its not just the networth equation but all of them are in the non-linearized form as in the CMR appendix. Thanks!

Re: Dynare codes for Christiano, Motto and Rostagno (2010)

PostPosted: Sat Oct 26, 2013 7:18 am
by FredGayle
This information provided by you is very constructive for correct planning. I like your work for providing information to the other.

Re: Dynare codes for Christiano, Motto and Rostagno (2010)

PostPosted: Sat Dec 07, 2013 3:54 am
by jasperjus
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.

Re: Dynare codes for Christiano, Motto and Rostagno (2010)

PostPosted: Wed Apr 09, 2014 12:02 pm
by larsen
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:

Code: Select all
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)
    [x,FVAL,JACOB,EXITFLAG,OUTPUT,msgData]=...

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

Re: Dynare codes for Christiano, Motto and Rostagno (2010)

PostPosted: Mon Jun 26, 2017 3:55 pm
by chenp2002
hello,everybody
The parameters of the model can not changed,so it's author's wrong,it can not use for another place.