Skip to content
All library documents

Symbolic Regression with Genetic Expression Trees for Trading Signals

Article MQL5 articles

Summary

The article explains symbolic regression as a way to model relationships between input data and a target without choosing a fixed equation form in advance. It represents candidate models as expression trees built from randomly selected coefficients, exponents, and arithmetic operators. A genetic optimization process evolves these trees, scores their outputs against training data with regression or loss measures, and compares results across epochs that use trees of the same size. The article favors examining larger, more complex trees before simpler candidates, which may be easier to interpret.

The method is implemented as an MQL5 Expert Advisor signal component and illustrated with a backtest on EUR/JPY four-hour data for 2022. The author reports that profitable runs may remain profitable across repeated tests, but random initialization, crossover, and mutation make exact performance statistics irreproducible. The example uses a modest one-dimensional dataset, omits division to avoid zero-denominator problems, and does not establish broad predictive reliability. The author therefore presents symbolic regression as a possible signal confirmation on larger timeframes, alongside independently generated signals.

Key ideas

  • Symbolic regression searches over expression trees instead of assuming a fixed model equation.
  • Candidate trees use coefficients, exponents, and operators, then evolve through genetic optimization.
  • Separate optimization epochs keep tree sizes consistent for crossover and compare fitness across sizes.
  • The MQL5 example uses a one-dimensional dataset and tests EUR/JPY on a four-hour chart in 2022.
  • Random genetic operations make results vary between runs, so the method is suggested as a confirming signal.

Tags

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