Dynare codes for Christiano, Motto and Rostagno (2010)

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.

Dynare codes for Christiano, Motto and Rostagno (2010)

Postby fabiover » Thu Sep 27, 2012 10:07 am

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
Fabio Verona
Research Economist
Monetary Policy and Research Department
BANK OF FINLAND
Snellmaninaukio, Helsinki
PO Box 160, FI-00101 HELSINKI, FINLAND
phone +358 10 831 2464
www.bof.fi
http://fabioverona.rvsteam.net/
fabiover
 
Posts: 9
Joined: Wed Sep 26, 2012 10:10 am
Location: Helsinki

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

Postby MatlabNerd » Tue Oct 09, 2012 11:54 pm

Thanks very much!

MatlabNerd :shock:
MatlabNerd
 
Posts: 4
Joined: Tue Oct 09, 2012 4:25 pm

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

Postby Mitoa » Tue Apr 02, 2013 11:09 pm

thanks very much
Mitoa
 
Posts: 1
Joined: Mon Apr 02, 2012 11:18 am

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

Postby ajpirzada » Fri Aug 30, 2013 11:59 am

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?
ajpirzada
 
Posts: 20
Joined: Tue Apr 30, 2013 11:41 am

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

Postby ajpirzada » Tue Sep 10, 2013 2:53 pm

my fault. its not just the networth equation but all of them are in the non-linearized form as in the CMR appendix. Thanks!
ajpirzada
 
Posts: 20
Joined: Tue Apr 30, 2013 11:41 am

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

Postby FredGayle » Sat Oct 26, 2013 7:18 am

This information provided by you is very constructive for correct planning. I like your work for providing information to the other.
FredGayle
 
Posts: 1
Joined: Sat Oct 26, 2013 6:35 am

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

Postby jasperjus » Sat Dec 07, 2013 3:54 am

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.
jasperjus
 
Posts: 1
Joined: Sat Dec 07, 2013 3:40 am

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

Postby larsen » Wed Apr 09, 2014 12:02 pm

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
larsen
 
Posts: 1
Joined: Mon Apr 07, 2014 4:15 pm

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

Postby chenp2002 » Mon Jun 26, 2017 3:55 pm

hello,everybody
The parameters of the model can not changed,so it's author's wrong,it can not use for another place.
chenp2002
 
Posts: 10
Joined: Thu Jun 22, 2017 8:34 am


Return to Dynare contributions and examples

Who is online

Users browsing this forum: No registered users and 3 guests