ASCENT |
Ascent parameter optimization. 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 highly irregular parameter spaces or interdependent parameters. |

BRUTE |
Brute force parameter 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 affect each other in complex ways. Brute force optimization tends to overfit the strategy, so out-of-sample testing or walk-forward optimization is mandatory. |

GENETIC |
Genetic parameter 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 |
Use trade sizes (Lots or Margin) determined by the script. Large trades get then more weight in the optimization process. Set this flag in special cases when the trade volume matters, f.i. for optimizing the money management or for portfolio systems that calculate their capital distribution by script. Otherwise trade sizes are ignored in the training process. |

PHANTOM |
Exclude 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. For instance when optimizing not a parameter range, but a set of different algorithms or different assets. |

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
FACCYCLE training run (if(is(FACCYCLE)) ...). |

- Training methods for machine learning or rules generating are set up with the advise function.
- Alternative optimization algorithms from external libraries or individual optimization targets can be set up with the parameters and objective functions.
- Parameter charts are only produced by
**Ascent**optimization. It is recommended to do first an Ascent training for determining the parameter dependence of a strategy. Afterwards the final optimization can done with an alternative algorithm. - 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.
- When parameters are trained several times by using
**NumTrainCycles**, each time the start values are taken from the last optimization cycle in Ascent mode. This sometimes improves the result, but requires a longer time for the training process and increases the likeliness of overfitting. To prevent overfitting, use not more than 2 subsequent parameter training cycles.

setf(TrainMode,TRADES+PEAK);

► latest version online