Skip to content
All library documents

CMA-ES Covariance Adaptation for Trading-Strategy Optimization

Article MQL5 articles

Summary

The article explains covariance matrix adaptation evolution strategy (CMA-ES), an evolutionary optimizer that samples candidate solutions from a distribution whose mean, step size, and covariance adapt over successive generations. Successful candidates update the search distribution; evolutionary paths track directional progress and guide both covariance and step-size changes. The covariance matrix lets the search stretch and rotate to fit the geometry of an objective, while rank-one and rank-μ updates incorporate information from paths and selected candidates.

It outlines initialization, offspring generation, fitness ranking, parameter updates, eigendecomposition, and safeguards for covariance stability. The implementation modifies the usual sampling distribution to allow wider jumps and compares optimization algorithms on test functions. The article reports good convergence on medium-dimensional functions, but also variable results on low-dimensional problems and substantial resource demands at large dimensions. It cautions that many canonical algorithms were modified and that conclusions rely on the experiments described; the supplied text does not establish that optimizing a backtest objective yields robust live trading performance.

Key ideas

  • CMA-ES adapts a multivariate search distribution using the fitness of selected candidate solutions.
  • Covariance updates learn promising search directions and can align the distribution with an objective’s geometry.
  • Evolution paths track successive steps to guide covariance updates and adjust overall step size.
  • The described implementation includes population selection, eigendecomposition, and numerical stability checks.
  • Reported strengths and limitations come from test-function comparisons and do not demonstrate live trading results.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.