Is the Optimize Function in Amibroker Useful?

Here’s a reader question from Glenn B. (used with permission):


Glenn B.:

After learning about the Strategy Cruncher, the Optimize in Amibroker feature seems like it could easily lead to curve fitting. Are there scenarios where you find it genuinely useful?


Dave:

Good question. And, for the most part, the answer is no.

Here’s what the Optimize function does:

gap_percent = Optimize( "Gap Percent", default, min, max, step );

When you do a backtest in Amibroker, gap_percent is the value in the default variable.

When you click Optimize, though, Amibroker will run a backtest for every value defined in the Optimize call from min to max in steps of step and then give you aggregate results across all the individual backtests it runs.

The Optimize function in Amibroker is made completely obsolete by the Strategy Cruncher.

The Cruncher tells you the optimal rules you can apply to your strategy to increase profitability in seconds.

To do that with the Optimize function would take literally years to complete.

There is, however, one rare situation where I might use it.

It could be useful to run X different versions of a backtest to figure out the best “starting point” strategy to feed to the Cruncher. (Where X is relatively small.)

It can be a convenient way to run a small number of backtests to get a general sense of a good starting point.

The more you use the Optimize feature of Amibroker, the harder it is to avoid curve fitting, so it should be used very sparingly, if at all.

Thanks for the question, Glenn B.

-Dave