Theoretical moments and counterfactual

Hi everyone,
I estimate a log-linearized DSGE model using annual quadratic detrend data. When comparing the theoretical moments with the data, i find that the theoretical standard deviation and variance of the log-linearized variables are large than those in the data. For instance, the theoretical standard deviation of Output is 29 but in the data is only 4. Similarly, when simulating the calibrated model (for counterfactual) using posterior mean, i find a big difference between the actual data and the simulated data. I have seen similar topics in this forum, but I still don’t understand the reasons and the solution.

  1. Is this difference between data and theoretical moments due to an error in the model?
  2. Is there any solution?
  3. Why the theoretical mean value appears zero?

Any help would be much appreciated.
Thanks in advance.

  1. That is hard to tell without seeing the relevant files. The large difference is quite unusual and can indicate a mistake in matching the data to the model, i.e. the observation equations. Of course, theoretical moments rely on shocks being orthogonal, i.e. uncorrelated. In contrast, in finite samples even theoretically uncorrelated shocks can show a correlation. For that reason, there can bei differences.
  2. Have you tried plotting your actual data and simulated data from your model? That often shows what the problem may be
  3. Your model is linearized, i.e. shows deviations from steady state.Those are 0 on average, explaining the zero mean.

Thank you very much Professor @jpfeifer for your reply.
Yes i tried plotting actual data and simulated data, but I still don’t understand the problem. I have sent you the relevant files, could you please have a look at them to advise what might be wrong?

Thank you again.


  1. How exactly did you treat your data? Having a standard deviation of 29 for output is weird. The model is in percentages. What did you do in the data. Did you forget the log?
  2. Your smoothed shocks look very correlated and not like white noise. This suggests a problem of the model capturing the data dynamics. That might explain the issue.

Hi Professor @jpfeifer,
For data like output and consumption, i use quadratic detrend:
Xobs=100×(ln⁡(X )-ln⁡(Χtrend ) )
For inflation and oil price data, i use demean. e.g. in the case of inflation:
Πobs=(100×(ln⁡((P_t)/(P_(t-1) ))) - mean

  1. Is the calculation method correct?
  2. I use annual data and oil price data, Can this data be the problem?
  3. Can changing the calculation method solve the problem?

Thank you again.


You should quadratically detrend the logged data, but instead you detrend the logged data with the log of a quadratic trend. That is wrong.

Sorry, I’ve made a mistake in the formula that I wrote.
I simply use the following formula:
LOG(Y)=C(1)+C(2)@TREND+C(3)@TREND^2 in EViews, and i use Residual*100 as observation data. Is this correct?

Yes. Could you please provide the raw data?

I have sent you the raw data file.

The data treatment looks OK to me. So my hunch is that your model is unable to capture the actual data movement, which results in correlated shocks.

OK, I will modify the model.
Thank you so much Professor for your attention and your time.