Coder Social home page Coder Social logo

laranea / evolutionary-trading-strategies Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zameyer1/evolutionary-trading-strategies

0.0 1.0 0.0 8 KB

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 100.00%

evolutionary-trading-strategies's Introduction

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. 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.

evolutionary-trading-strategies's People

Contributors

zameyer1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.