What are "theoretical moments" referring to?

Hi,

I apologize if this questions has been asked before or if it is trivial. I do not understand what the “THEORETICAL MOMENTS” produced by stoch_simul are.

For reference, I am trying to understand Sims’ tutorial here. I’ve attached the code.

Are the “theoretical moments” the moments from a simulation? If so, how do I access (e.g. plot) this simulation? (Is it the same simulation Sims references?) Are they the moments of the series under the impulse response?

Perhaps this is the essence of my question: If I run a simulation of the model (see the Sims tutorial), should the moments of the simulated series be approximately equal to the theoretical moments?

[size=85]For context, if it helps at all, my goal is:

• simulate the basic New Keynesian model under three different interest rate rules
• examine the variance of inflation/output gap in the simulated models under each interest rate rule
[/size]

Thanks so much!

– BH
Sims.mod (2.38 KB)

If you do “stoch_simul” without doing a simulation (i.e., without specifying “periods=INTEGER”), then Dynare will use perturbation techniques to estimate the “theoretical moments” of your variables.

If you do “stoch_simul(…,periods=INTEGER)” – i.e., you do have Dynare perform a simulation – then Dynare will print the “approximated moments”, which are the empirical moments of your simulation.

(As a side note, you can of course include ‘hpfilter = INTEGER’ to HP filter your model and its moments.)

[size=200]Edit: if anyone can confirm that the above is correct, that would be great.[/size]

At `order=1`, the solution to your model has a the form of a linear state-space model. This can be used to analytically compute the endogenous moments. See e.g. Hamilton (1994): Time Series Analysis. This is what Dynare does when you request theoretical moments (`periods=0`). In case of `order=2`, Dynare provides a second-order accurate approximation to the true second moments based on the linear terms of the second-order solution (see Kim, Kim, Schaumburg and Sims (2008)).

If you specify periods>0, Dynare will instead simulate data series based on the perturbation solution to your model and compute the moments of these simulated series.

Thank you so much Johannes! (And thank you for being so willing to answer questions on this forum.)

Dear Johannes,

I have a question that is highly related to this thread, thus I have chosen to put it here.
The question is what difference does it make for the theoretical moments whether one includes or “ignores” (comment out) the other shochs when looking at a particular shock in the model?

In my model, I got the following shocks:

“shocks;
var eps_a; stderr 1.00; // DK tech shock
// var eps_u; stderr 1; // DK cost push shock
// var eps_g; stderr (100/27); // DK fiscal shock
// var eps_a_os; stderr 1; // Eura Area tech shock
// var eps_v; stderr 0.4; // Euro Area monetary policy shock
// var eps_u_os; stderr 1; // Euro Area monetary policy shock
end;”

I have tried to run my model having either all the shocks “ignored” in dynare (having “//” on all lines of the shocks but one) or activated (no “//” like below)

“shocks;
var eps_a; stderr 1.00; // DK tech shock
var eps_u; stderr 1; // DK cost push shock
var eps_g; stderr (100/27); // DK fiscal shock
var eps_a_os; stderr 1; // Eura Area tech shock
var eps_v; stderr 0.4; // Euro Area monetary policy shock
var eps_u_os; stderr 1; // Euro Area monetary policy shock
end;”

These two methods yield different theoretical moments for my endogenous variables, how come? How should I interpret this?

Looking at the variance decomposition of the first version (with all shocks but one commented out), it seems the other shocks do matter for many of the variables. I don’t follow what exactly is going on. I hope you will have a look at this. Thank you very much.

Attached are my dynare code as well as a pdf having these results I have reported.
help_dynare_forum.pdf (248 KB)

Thank you very much.

Kind regards,
Alexander

I am not sure I understand your question. Your DSGE model essentially is a VARMA process. Say for simplicity, is has a representation as a finite order VAR process. Of course it matters for the moments of this VAR which shocks are present. The same applies to the variance decomposition, which measure the relative contribution of a particular shock to the forecast error variance of the endogenous variables.