Dynare - Number of Simulated Economies?

I am using second-order approximation to the policy functions in Dynare. If one uses his/her own code for the approximation, the conventional approach is to replicate the economy for sufficiently many times, with each economy running for sufficiently many periods. In Dynare, I can specify the number of periods, but I am not sure whether number of simulated economies can be specified. (I know that replic gives out the number of simulated economies, but I guess this is only for generating IRFs). I would appreciate if someone could help me in this regard.

Thanks,

What I wonder, in particular, is the following: I simulate the economy for 2500 periods (with order=2), obtain the simulated series. Then I manually HPfilter it (using an hpfilter.m file, with lambda=1600), and compute the standard deviation of the cyclical series. This number, though, is way different than the theoretical standard deviation (for GDP, for instance, I got 1.15, whereas the theoretical stdev says 0.03). The magnitude of shocks are of reasonable magnitude (seems to be properly calibrated, they are more or less inline with the literature), and I dont think that I can calibrate the standard deviation of innovations to the exogenous processes by merely using the theoretical stdev of GDP. Sure, I am missing something at this stage, but couldnot figure that out.

Are the theoretical second-moment statistics based on first-order approximation (I guess that had been the case back in 2003-2004 as far as I have seen on the Internet).

What is the default for the HP-filter parameter if one asks Dynare to give out theoretical moments?

Can you please provide some insights on these?

Thanks again,

“I dont think that I can calibrate the standard deviation of innovations to the exogenous processes by merely using the theoretical stdev of GDP.”

You can use your specification of the production technology to back out a time series for TFP. For example, if my production function is y = f(k,l) = exp(z) k^alpha l^(1-alpha) then we have z = log(y) - alpha log(k) - (1-alpha)log(l). The business cycle literature shows that you can actually get away with just calculating it as z = log(y) - (1-alpha)log(l). Anyway, once you have your series for TFP implied by the data, you can run a regression to estimate the parameters of your stochastic process for TFP. If I want an AR(1) so that z = rhoz(-1) + e, I just run the regression z = rhoz(-1) and use the standard deviation of the errors as the standard deviation for e. Obviously this is a bit simplistic, but hopefully you get the idea.

I don’t use Dynare much, so I can’t really tell you why you’re getting such different numbers though.

Thanks Steinberg for the comment. Your way of calibration seems just fine, but the way I do is as follows: I assume that the persistence parameter is .95 (per RBC literature) and then look for values of sigma-tfp so the model generates the cyclical volatility of GDP observed in the data (which is around 1.02-1.40 for the US).

My question, though, was not specifically on how to calibrate, I should have been more clear in that regard. What I have meant was, if I assume that the theoretical second moment is the true one, then I should be using an implausibly large value for the stdev of innovations to the TFP.

I just changed the perturbation order from 2 to 1 (order=2 to order=1). The theoretical stdev remains the same regardless of the order. Does that mean that if one uses 2nd order approx., one need to simulate and manually calculate the stdev of a given series?