HP filtered dynare output

I am writing a dynare code with some exact eqns with corresponding steady state eqns in the steady state block. I then do a stochastic simulation with HP filter option (1600). My goal is to match the dynare output with business cycle facts. If I compare the second moments from the dynare output with the relevant logged and HP filtered quarterly series, am I comparing correctly the model with the data or am I comparing apples with oranges? Any feedback will be appreciated.

If you are comparing the same filtered objects from the model and the data, then your procedure is correct.

Thanks JP. My question is: Does in an exact model, dynare log the series before applying HP filter? If it does then I am comparing the same filtered objects. If dynare does not log the variables before passing it to HP filer, then I should not log the data before passing it to HP filter for comparison.

Thus my question is: Does dynare log the series before passing it to HP filer?

No, why should Dynare automatically log a series? You either would have to use the loglinear option or better, define the log-level as a variable as in https://github.com/JohannesPfeifer/DSGE_mod/blob/master/RBC_baseline/RBC_baseline.mod
You should always consider logged filtered series. Not logging the data would most probably wrong (unless we are talking about interest or inflation rates)

Many thanks. Very informative mod file.