Theoretical moments vs. simult_ simulation

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])]’;
    In the end I have ex_=[eps_epsilon and other shocks…]

  2. Time series are then simulated as:

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.

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.