Page 1 of 1

Theoretical moments vs. simult_ simulation

PostPosted: Fri Nov 25, 2016 9:16 am
by econ86
Dear Dynare users,

my question is the following: what is the difference between theoretical moments that are displayed in the Command window and moments that are calculated as follows:

1. First, shocks are randomly generated from normal distribution with mean zero and standard deviation set equal to the posterior mean
eps_epsilon = [normrnd(0,oo_.posterior_mean.shocks_std.epsilon_epsilon,[1 400])]';
etc....
In the end I have ex_=[eps_epsilon and other shocks.......]

2. Time series are then simulated as:
Z=simult_(ss,dr,ex_,iorder);

This is repeated, for example, 10.000 times.

Then I calculate the standard deviation of time series which I'm interested in. Finally, I calculate the average standard deviation over the 10.000 samples.

Thank you for your answer.

Re: Theoretical moments vs. simult_ simulation

PostPosted: Sat Nov 26, 2016 6:41 am
by jpfeifer
What do you mean with "what is the difference"?
Theoretical moments are computed as the unconditional variances from the state space representation of the model. For examples, the variances are obtained by solving the Lyapunov equation. Theoretical moments are computed from simulations as you do. Asymptotically, the two will coincide. However, in-sample shocks will almost surely display small (auto)-correlations and not be exactly mean 0. For that reason, you need really long simulations, often millions of draws, to get the same moments up to say four digits.