Kiyotaki and Moore (2008) - theoretical vs simulated moments


I am new to Dynare and I am trying to simulate the model by Kiyotaki and Moore - Liquidity, business cycles and monetary policy. I was having much trouble in obtaining reasonable RBC moments, that were in line with those presented in King & Rebelo (1999), until I realized that I was computing the simulated moments rather than the theoretical ones, once I read this post: [King and Rebelo (1999)).

Even though I am well aware that this is a very trivial question, I must ask you: why do these two methods of computation lead to so disparate results? Shouldn’t the approximation be similar to the theoretical version? What prevents this from happening?

Please be so kind to reply to this post, as I cannot be sure my simulation is working fine until I understand why this is happening.

Best regards,
Pedro Henriques


in order 1, theoretical moments ie moments computed from the exact theoretical formula should lead to similar results than the simulated ones that are computed from simulated data.

could you post the mod-file in order to replicate the comparison plz?


I have attached the model file and the steady state generator. Since I have not computed the steady state accurately, I first simulate the model and then use the policy functions to upload the steady state with the .m file attached and run the model again in log deviations from this simulated steady state.

Thank you
ssGEN_shockA_KM.m (431 Bytes)
shockA_KM.mod (7.32 KB)

I think I have spotted the problem. It has to do with the hp filter option. When I simulate for theoretical moments without the hp filter I get the same moments as in the simulated model. I wonder why the hp filter is important in a stationary model though. Indeed it reduces the standard deviation, but I don’t really understand why.

i noticed you have a
load shockA_KM_RBCss;
line, what do you have in hockA_KM_RBCss? sorry if my question is naive

The mod-file says in its preamble what you have to do. But you might need Wouter Den Haan’s dynarerocks-function.

Regarding the original question: it is common to treat the empirical and model data in the same way (both HP-filtered) although the model is theoretically already stationary. It is similar to the Cogley-Sims-Nason discussion on VARS

thank you so much for your answer. yes, i read the introduction, and tried to run first simulated version (@#define moments = 0)
and got this:

??? Attempt to execute SCRIPT solve1 as a function:

Error in ==> dynare_solve at 130
bad_cond_flag, varargin{:});

Error in ==> evaluate_steady_state at 66
[ys,check] = dynare_solve([M.fname ‘_static’],…

Error in ==> steady_ at 54
[steady_state,params,info] =
Error in ==> steady at 81
[steady_state,M_.params,info] = steady_(M_,options_,oo_);

Error in ==> shockA_KM at 182

Error in ==> dynare at 120
evalin(‘base’,fname) ;
in the console…
is it because i dont have a special script?

No, it looks like a naming conflict. There should not be a solve1.m in the examples folder.

thanks a lot you were right!!! i erased the thingie in the examples, and replaced disp_dr.m for the one dynare-rock powered and it run. thanks for everything. i just noticed that i had to do it on 4.2.0, as there was no disp_dr.m with dynarerocks for 4.3.+ versions.

I have a question regarding the shock. It seems this is a productivity positive shock, as I see from
varexo e_A;
which enters only in the equation of A.
My question is, assuming we want a liquidity shock, we only need to erase the e_A from the equation of A, and insert it in the parts where the liquidity parameter appears? In this case, the parameter phi is liquidity, so it would become (phi+e_A)?