# Stoch_simul series: HP-filtered or not?

Hi,
I am a little confused about the simulated time series Dynare produces using stoch_simul command (and that are stored in endo_simul array). Are the data there filtered or not?
I am interested in looking at unfiltered data, so I used stock_simul command without HP filter option:
stoch_simul(IRF=0,ORDER=1) y;
I then HP-filtered the resulting time series y and computed its standard deviation, but it seems way smaller than the standard deviation reported in the command window, which leads me to believe that the series was filtered already. In that case, is there a way to obtain unfiltered series?
Thank you!
Olena

Output series are not HP-filtered by default, unless you explicitely use the hp_filter option.

Thank you, Sébastien.
I am still a little unclear on comparing Dynare output with the data I am processing.
First of all, when I comment out “periods” command and run

stoch_simul(IRF=0,ORDER=1) y, ys, c, cs, invt, rer, delS;

I get the following:

THEORETICAL MOMENTS

VARIABLE MEAN STD. DEV. VARIANCE
y 0.7949 0.0167 0.0003
ys 0.7949 0.0167 0.0003
c 0.2832 0.0140 0.0002
cs 0.2832 0.0140 0.0002
invt -0.8118 0.0312 0.0010
rer 0.0000 0.0000 0.0000
delS 0.0000 0.0081 0.0001

In order to compute empirical moments of the simulated variables, I do the following
periods = 5500;

stoch_simul(IRF=0,hp_filter=1600,ORDER=1) y, ys, c, cs, invt, rer, delS;
I collect the resulting series into a .mat file, and compute standard deviations of each.
I get st.dev(y) = 1.69%, which is very close to the theoretical moment, so far so good.

Finally, I run the following portion of the code:

periods = 5500;

stoch_simul(IRF=0,ORDER=1,noprint,nocorr,nofunctions,nomoments) y, rer, delS;
xlswrite(‘HP Filters.xls’, y, ‘SimData’, ‘B2’);

which I think should give me unfiltered series for output y, and perform some statistical checks on the resulting output in Excel.
I find that the standard deviation of the raw series [y] (exported from Dynare) is 1.69%, and that the standard deviation of the cycle part of the filtered series [y] is 1%. Here I am using standard built-in Excel command for computing st. dev.
That’s why I am confused as to what kind of data (presumably unfiltered, but looks like filtered) Dynare is saving into my Excel sheet.
Perhaps I am missing something very simple here, so I apologize for being slow, but I would really appreciate your help. I am attaching the file for your convenience.
Sincerely,
Olena
BCPropAnalysis.m (1.62 KB)
Bench.mod (19.7 KB)

The point is that the vector “y” will always contain unfiltered data, even when you give the “hp_filter” option.

The “hp_filter” option only affects the moments which are displayed.

So 1.69 is the stddev of the unfiltered series, and this is consistent accross your various exercises.