Page 1 of 1
Kiyotaki Moore?
Posted:
Mon Aug 31, 2009 10:30 pm
by macroeconomist
Does anybody know how to write dynare mod programs for Kiyotaki-Moore credit cycles model or something similar? Any guidance will be appreciated.
Re: Kiyotaki Moore?
Posted:
Thu Sep 03, 2009 9:06 pm
by macroeconomist
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.
Re: Kiyotaki Moore?
Posted:
Fri Oct 09, 2009 7:06 pm
by davidamdur
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).
Re: Kiyotaki Moore?
Posted:
Fri Oct 30, 2009 1:50 pm
by StephaneLhuissier
I have attached a mod file that reproduces the figure 3 of Kiyotaki and Moore (1997).
Stéphane
Re: Kiyotaki Moore?
Posted:
Mon Aug 27, 2012 4:37 pm
by aledinola
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)
Re: Kiyotaki Moore?
Posted:
Mon Apr 08, 2013 2:32 pm
by asmae
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?
Re: Kiyotaki Moore?
Posted:
Wed Apr 10, 2013 6:57 am
by jpfeifer
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.
Re: Kiyotaki Moore?
Posted:
Mon Jun 17, 2013 11:41 am
by jhonjame
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.
pintus-wen_main
Posted:
Tue Jul 23, 2013 4:10 am
by aghaly
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