Table of Contents
Fetching ...

Evolving Financial Trading Strategies with Vectorial Genetic Programming

Rui Menoita, Sara Silva

TL;DR

The paper tackles the problem of automatically evolving profitable trading strategies for financial markets, a challenging task under the efficient market hypothesis. It employs Vectorial Genetic Programming (VGP) and introduces two novel variants—Complex Vectorial GP (CVGP) and Strongly-Typed Vectorial GP (STVGP)—to learn trading rules from vectorial inputs that encode historical data and technical indicators. Experiments on three instruments over a seven-year span demonstrate that standard GP often underperforms, while STVGP consistently yields among the best results, with CVGP also showing strong potential; ROI-based fitness is augmented by a win-rate factor when profitable and includes an inactivity penalty to encourage active trading. The findings underscore the viability of automated, interpretable trading-rule discovery using vectorial and typed GP frameworks and point to fruitful avenues such as multi-agent collaboration, richer feature sets, and larger search spaces for further improvements.

Abstract

Establishing profitable trading strategies in financial markets is a challenging task. While traditional methods like technical analysis have long served as foundational tools for traders to recognize and act upon market patterns, the evolving landscape has called for more advanced techniques. We explore the use of Vectorial Genetic Programming (VGP) for this task, introducing two new variants of VGP, one that allows operations with complex numbers and another that implements a strongly-typed version of VGP. We evaluate the different variants on three financial instruments, with datasets spanning more than seven years. Despite the inherent difficulty of this task, it was possible to evolve profitable trading strategies. A comparative analysis of the three VGP variants and standard GP revealed that standard GP is always among the worst whereas strongly-typed VGP is always among the best.

Evolving Financial Trading Strategies with Vectorial Genetic Programming

TL;DR

The paper tackles the problem of automatically evolving profitable trading strategies for financial markets, a challenging task under the efficient market hypothesis. It employs Vectorial Genetic Programming (VGP) and introduces two novel variants—Complex Vectorial GP (CVGP) and Strongly-Typed Vectorial GP (STVGP)—to learn trading rules from vectorial inputs that encode historical data and technical indicators. Experiments on three instruments over a seven-year span demonstrate that standard GP often underperforms, while STVGP consistently yields among the best results, with CVGP also showing strong potential; ROI-based fitness is augmented by a win-rate factor when profitable and includes an inactivity penalty to encourage active trading. The findings underscore the viability of automated, interpretable trading-rule discovery using vectorial and typed GP frameworks and point to fruitful avenues such as multi-agent collaboration, richer feature sets, and larger search spaces for further improvements.

Abstract

Establishing profitable trading strategies in financial markets is a challenging task. While traditional methods like technical analysis have long served as foundational tools for traders to recognize and act upon market patterns, the evolving landscape has called for more advanced techniques. We explore the use of Vectorial Genetic Programming (VGP) for this task, introducing two new variants of VGP, one that allows operations with complex numbers and another that implements a strongly-typed version of VGP. We evaluate the different variants on three financial instruments, with datasets spanning more than seven years. Despite the inherent difficulty of this task, it was possible to evolve profitable trading strategies. A comparative analysis of the three VGP variants and standard GP revealed that standard GP is always among the worst whereas strongly-typed VGP is always among the best.

Paper Structure

This paper contains 16 sections, 2 equations, 6 figures, 5 tables.

Figures (6)

  • Figure 1: SMA 50 (green) and SMA 200 (orange) in Apple’s stock AAPL instrument.
  • Figure 2: RSI in Apple's stock AAPL instrument.
  • Figure 3: Candlestick chart showing the temporal evolution of prices, with detail of two candlesticks showing trends (up, down) and cardinal values (open, close, high, low).
  • Figure 4: Instrument close prices spanning January 1, 2015, to April 14, 2022.
  • Figure 5: Fitness distribution in the last generation on training (top row) and test (bottom row) for each dataset.
  • ...and 1 more figures