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. This work exemplifies the opportunity to use python for rapid prototyping of evolutionary strategies for financial trading. The use of open-source packages for distributed evolutionary algorithms and financial simulation provides a foundation for standardization of model assumptions across research. A live trading version of the financial simulation package used is currently available in testing, meaning this work has practical applications and could be extended to live deployment.
forked from zameyer1/Evolutionary-Trading-Strategies
-
Notifications
You must be signed in to change notification settings - Fork 0
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 financia…
zlapp/Evolutionary-Trading-Strategies
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
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 financia…
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Python 100.0%