Hi everyone,
I am a Zorro newbie and currently going through the all the scripts in the Black Book.
In chapter 4 - "Against the trend", the author uses a band pass filter with a period of 30 bars and delta of 2 bars.
The book does not explain what's the reasoning behind the choice of these two values; for this reason, I tried to experiment how the strategy would perform by optimizing the TimePeriod parameter.

In Alice2d.c, I replaced:
Code
vars Cycles = series(BandPass(Prices, 30, 2));


For:
Code
vars Cycles = series(BandPass(Prices, optimize(30, 5, 50, 5), 2));


To my suprise, all the metrics in the performance report after the train + test phases on the modified version of the script are way worse than the ones I get when testing with the hardcoded value '30'.
I probably fail to understand correctly how Zorro works, but since 30 is included in the optimization interval above, I would expect a performance report at least as good as the one I get when using the hardcoded value 30 for the bandpass filter period.

Could anyone please shed some light on this?

Thanks in advance