I have used the option: filter_step_ahead = [1 2 3 4] in the estimation command to generate 1 to 4 quarters-ahead filtered estimates of some variables. I want to evaluate the real-time forecast accuracy.

Now in the oo_ structure, I have 4 folders: Filtered_Variables_1/2/3/4_step_ahead.

Suppose I open Filtered_Variables_4_step_ahead. This has as many values as the number of time periods in my data. Now let us concentrate on the first value. What does it signify? Is it, 4-quarter ahead forecast evaluated at t=1 or 4-quarter ahead forecast evaluated at t = -3 ?

From the manual on oo_.FilteredVariablesKStepAhead:

Variable set by the estimation command, if it is used with the filter_step_ahead option.
The k-steps are stored along the rows while the columns indicate the respective variables. The
third dimension of the array provides the observation for which the forecast has been made. For
example, if filter_step_ahead=[1 2 4] and nobs=200, the element (3,5,204) stores the four
period ahead filtered value of variable 5 computed at time t=200 for time t=204. The periods
at the beginning and end of the sample for which no forecasts can be made, e.g. entries (1,5,1)
and (1,5,204) in the example, are set to zero. Note that in case of Bayesian estimation the
variables will be ordered in the order of declaration after the estimation command (or in general
declaration order if no variables are specified here). In case of running the classical smoother,
the variables will always be ordered in general declaration order. If the [selected variables only],
page 77 option is specified with the classical smoother, non-requested variables will be simply
left out in this order.

Then I can compare the forecast over 7 periods (above) with filtered pi over that same period. plot(oo_.FilteredVariables.pi(21:27,1))

Actually, I wanted to compare non-filtered-variable forecasts over some period in the sample with observed data over that same period. But it seems it is not possible in dynare yet, and the closest is comparing the forecast of filtered variables to the filtered variables themselvesâ€¦over a given period in the sample (not outside the sample).