In linear or log-linear DSGE models when we compare the real and simulated moments, why we use the cycle component of a variable or why we compare simulated model moments with stationary real data moments?
most of the time the variables we have in a model are stationary, ie they do not have a growth-trend. Compared to that we normally see non-stationary variables in empirical data like GDP.
To account for that difference, as for estimation we want to match observed variables with model variables, we have to make the real data stationary by using some kind of filtering technique (one-sided HP for instance). Afterwards we can compare the moments to see if they match.
There is also the possibility to write the model in non-stationary form and then detrend all the equations. This is what you can see for example in the Smets and Wouters model.
Therefore you mean in log-linear models we must compare stationary real data moments with the moments of the simulated variables?
Therefore as I understood we detrend the time series of real data variables such as GDP, consumption,investment,… to stationary them.
Exactly. As when you have a model in log-linear form the variables are per definition percentage deviations from their deterministic steady state, which gives you steady-states (mean) of 0. Another way of interpreting this is that the a model-variable gives you log-deviations from the trend with mean zero.
Like we mentioned above, you want to match model variables with real data. But since GDP, for example, has a trend and thus is not stationary we have to make it stationary to match. After applying some filter the resulting variable also has mean zero and when we then also apply the log we get an observable variable that we can match with the model-variable for estimation.
Yes, essentially you want to compare the same concept in the data to the one from the model. As the model does not feature a trend, i.e. models deviations around the trend, you need a way to take out the trend from the actual data as well.