Hi there,

Here is a Project where Genetic Algorithms were used to develop a trading strategy by combining a fixed subset of signals chained by logical operators.

The project uses the genetic algorithm library GeneticSharp integrated with LEAN by James Smith.

The best out-of-sample trading strategy developed by the genetic algorithm showed a Sharpe Ratio of 2.28 in trading of EURUSD with 25 trades in the out-of-sample period of January – April 2017 (attached).

But more important that the results itself, are the layout of a framework flexible enough to test a wide range of strategies and the proof of concept of what is possible with two powerful open sources tools as Lean and GeneticSharp.

Also, the Lean-centric framework has two very strong advantages:

  • The training evaluation can be as complex as needed (including ask-bid spread, fees, commissions, slippage model, risk management, etc.) to enhances the training by exposing the individuals to realistic environments.
  • The QCAlgorithm used by the genetic algorithm to evaluate the individuals can be used to trade in live paper mode and even in real trade. Therefore, a profitable set up developed by the genetic algorithm can be tested in real time or put to trade immediately.

Here’s a kind of paper where is detailed the technical side of the implementation and the statistical analysis of the training session.

Hope you enjoy it!

Author