Kiyotaki Moore?

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.

Kiyotaki Moore?

Postby macroeconomist » Mon Aug 31, 2009 10:30 pm

Does anybody know how to write dynare mod programs for Kiyotaki-Moore credit cycles model or something similar? Any guidance will be appreciated.
macroeconomist
 
Posts: 10
Joined: Mon Aug 31, 2009 10:27 pm

Re: Kiyotaki Moore?

Postby macroeconomist » Thu Sep 03, 2009 9:06 pm

Hi,

I am using an extension of the above mentioned paper, but to start out I am trying to reproduce a very very simplified form (patient and impatient households with only land as a factor of production and credit constraints) of the original model with Dynare. I have written the mod file, but when I run it, I am getting the following errors:

Maximum number of iterations reached:
increase options.MaxIter.
??? Error using ==> steady_ at 77
STEADY: convergence problems

Error in ==> steady at 52
steady_;

Error in ==> KM1 at 114
steady;

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

What does this mean? Can somebody help? I have attaced my mod file.
Attachments
KM1.mod
(688 Bytes) Downloaded 536 times
macroeconomist
 
Posts: 10
Joined: Mon Aug 31, 2009 10:27 pm

Re: Kiyotaki Moore?

Postby davidamdur » Fri Oct 09, 2009 7:06 pm

That error means that DYNARE cannot find the non-stochastic steady-state of your model. Typically this happens when the initial values you provide are too far from the true steady-state (assuming your model has a steady-state). Can you solve for the steady-state by hand? If so, you can put those values into a file called KM1_steadystate.m in the same directory; DYNARE will then use that steady-state (after it checks to make sure it is valid).
davidamdur
 
Posts: 9
Joined: Fri Jun 26, 2009 6:31 pm

Re: Kiyotaki Moore?

Postby StephaneLhuissier » Fri Oct 30, 2009 1:50 pm

I have attached a mod file that reproduces the figure 3 of Kiyotaki and Moore (1997).

Stéphane
Attachments
KiyotakiMoore97.mod
(1.01 KiB) Downloaded 1042 times
Stéphane Lhuissier
CEPII
http://www.stephanelhuissier.eu
StephaneLhuissier
 
Posts: 20
Joined: Fri Oct 30, 2009 1:47 pm

Re: Kiyotaki Moore?

Postby aledinola » Mon Aug 27, 2012 4:37 pm

pintus_wen_dynarefile.mod
(2.39 KiB) Downloaded 355 times
macroeconomist wrote:Hi,

I am using an extension of the above mentioned paper, but to start out I am trying to reproduce a very very simplified form (patient and impatient households with only land as a factor of production and credit constraints) of the original model with Dynare. I have written the mod file, but when I run it, I am getting the following errors:

Maximum number of iterations reached:
increase options.MaxIter.
??? Error using ==> steady_ at 77
STEADY: convergence problems

Error in ==> steady at 52
steady_;

Error in ==> KM1 at 114
steady;

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

What does this mean? Can somebody help? I have attaced my mod file.


Hi,
I post the code to replicate a very similar paper to Kiotachi-Moore, the authors are Pintus and Wen (basically it is KM97 with habit consumption as a twist), hope is useful!
(Run main m file that calls the mod file)
Attachments
pintus_wen_main.m
(7.68 KiB) Downloaded 386 times
aledinola
 
Posts: 2
Joined: Mon Aug 27, 2012 3:31 pm

Re: Kiyotaki Moore?

Postby asmae » Mon Apr 08, 2013 2:32 pm

Hello,

I'm trying to simulate a RBC model inspirred from KM97 and Pintus and Wen. the files poster in this disscussion were very helpful for me to write my code. However, i still can not any results of my model simulation. i obtain Error using ==> dynare at 114. DYNARE: preprocessing failed.

Please find attached the mod file for my model

Please can you help? :|
Attachments
RBC.mod
(1.61 KiB) Downloaded 258 times
asmae
 
Posts: 14
Joined: Fri Mar 22, 2013 10:57 am

Re: Kiyotaki Moore?

Postby jpfeifer » Wed Apr 10, 2013 6:57 am

Always post full error messages. Dynare says
ERROR: RBC.mod:24.8-12: To use an external function (k) within the model block, you must first declare it via the external_function() statement.

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

The problem is in line 24 at column 8. There, you use a lowercase k, but you only defined uppercase K as a variable. As Dynare is case-sensitive, this gives an error.
------------
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: Kiyotaki Moore?

Postby jhonjame » Mon Jun 17, 2013 11:41 am

I am using an extension of the above mentioned paper, but to start out I am trying to reproduce a very very simplified form (patient and impatient households with only land as a factor of production and credit constraints) of the original model with Dynare.
jhonjame
jhonjame
 
Posts: 1
Joined: Mon Jun 17, 2013 11:32 am

pintus-wen_main

Postby aghaly » Tue Jul 23, 2013 4:10 am

Hi,
I post the code to replicate a very similar paper to Kiotachi-Moore, the authors are Pintus and Wen (basically it is KM97 with habit consumption as a twist), hope is useful!
(Run main m file that calls the mod file)[/quote]


Sorry youo posted the pintus-wen mod file main mod file but unfortunately I could not run it. There's apparently a missing file; I got this message when running the file:

??? Undefined command/function 'steady_ykl'.

Error in ==> pintus_wen_main>@(x) steady_ykl(x,param) at 172
[x,val_eq] = fsolve(@(x) steady_ykl(x,param),x0);

Error in ==> fsolve at 180
fuser = feval(funfcn{3},x,varargin{:});

Error in ==> pintus_wen_main at 172
[x,val_eq] = fsolve(@(x) steady_ykl(x,param),x0);

Could you please attache it? Many thnaks in advance
aghaly
 
Posts: 16
Joined: Fri Mar 26, 2010 4:56 pm


Return to Dynare contributions and examples

Who is online

Users browsing this forum: No registered users and 2 guests