ASCENT |
Ascent optimization (default). Evaluates the effect of any parameter on the strategy separately. Walks through all parameter ranges and seeks for 'plateaus' in the parameter space, while ignoring single peaks. This is normally the best algorithm for a robust strategy, except in special cases with many mutually dependent parameters. |

BRUTE |
Brute force optimization (Zorro S required). Evaluates all parameter combinations and selects the most profitable combination that is not a single peak. Can take a long time when many parameters are optimized or when parameter ranges have many steps. Useful when parameters can affect each other in complex ways. Brute force optimization will likely overfit the strategy, so out-of-sample or walk-forward testing is mandatory. |

GENETIC |
Genetic optimization (Zorro S required). A population of parameter combinations is evolved toward the best solution in an iterative process. In each iteration, the best combinations are stochastically selected, and their parameters are then pair-wise recombined and randomly mutated to form a new generation. This algorithm is useful when a large number of parameters per component must be optimized or when parameters affect each other in complex ways. It will likely overfit the strategy, so out-of-sample or walk-forward testing is mandatory. |

TRADES |
Optimize using trade sizes (Lots). Large trades get more weight. Set this flag when the trade volume matters, f.i. for portfolio systems that calculate their capital distribution by script. Otherwise trade sizes are ignored in the training process. |

PHANTOM |
Optimize ignoring phantom trades. Otherwise phantom trades are treated as normal trades in the training process. |

PEAK |
Optimize toward the highest single peak in the parameter space, rather than toward hills or plateaus. This can generate unstable strategies and is for special purposes only. |

ALLCYCLES |
Generate individual OptimalF factor files for all WFO cycles, instead of a single file for the whole simulation. This produces low-quality factors due to less trades, but prevents backtest bias. |

SETFACTORS |
Generate
factor files not with the OptimalF algorithm, but by
script with a user-defined algorithm. For this, set OptimalF, OptimalFLong,
OptimalFShort to a script calculated value in the
FACTORS training run (if(is(FACTORS)) ...). |

- Training methods for rules generation are set up with the advise function.
- Brute force and genetic optimizations do not produce parameter charts. It is recommended to do first a training run with the Ascent algorithm for determining the parameter dependence of a strategy.
- Percent steps (4th parameter of the
**optimize**function) are replaced by 10 equal steps for brute force and genetic optimization. - In genetic optimization, parameter combinations that were already evaluated in the previous generation are not evaluated again and are skipped in the log. This lets the algorithm run faster with higher generations.
- Genetic optimization is also possible with the free Zorro version using the Z Optimizer tool from the Download page.

setf(TrainMode,TRADES+PEAK);

► latest version online