zameyer1/Evolutionary-Trading-Strategies
This code illustrates the use of genetic programming to evolve financial trading strategies for a single equity stock. Individuals (strategies) are considered as functions of historical price data, outputting a position allocation. Strategy fitness evaluation is computed by simulating the strategy over historical financial data. Because financial investment requires a fundamental tradeoff between risk and return, strategies are evaluated on multi-objective fitness functions depending on profit and maximum drawdown of the strategy and ranging from very risk-prone to very risk-averse. The population of individual strategies is evolved using tournament selection, single-point crossover, and random mutation as evolutionary operators. Strategies with the best fitness at any stage in the evolutionary process are recorded in a ‘hall-of-fame’. At the end of the evolutionary process, strategies in the ‘hall-of-fame’ are evaluated over a set of test data and selected based on a train-test criterion which penalizes strategies that do not generalize well.
Python
Stargazers
- ashnvaelDaejeon, South Korea
- b3hzadsh
- benwaldnerBerlin
- bwolfram1Tampa, Florida
- caifengsteven
- catinwarmhands
- csetzkornUnited Kingdom
- danny-1kManchester
- DICAP1
- falberto
- gothefrid
- joshua-xiaChina
- m-montanari
- MuuYesen
- namingpartsNYC area
- okrange
- olveh
- rongzhou
- seven7e
- wanfuckerbtFudan University
- XKSHTongji university;ENSAE Paristech;Groupe BPCE;INSEE
- zameyer1
- ziganluo1997
- zouyujhtsichuan university