Code Monkey home page Code Monkey logo

algorobinhood's Introduction

AlgoRobinhood

Algorithmic Trading System with Machine Learning

  • An Algorithmic Trading System connecting to Robinhood to execute various algo trading strategies
  • Stocks Recommendation System based on Machine Learning Models

Getting Started

These instructions will enable you to run an algo trading system on your local machine

Prerequisites

You need a robinhood account with a two factor code setup using your phone number. At the point of executing AlgoRobinhood, you will put the account id, password and the two-factor codes in terminal to login

$ python AutoTrade.py

Enter your account id: [email protected]
Do you want to run recommendation code (y/n): y
Enter your password: *****
Please Enter SMS Code: ******
2019-09-30 23:22:16,785 __main__ Successfully logged in account
2019-09-30 23:22:16,785 __main__ Running stocks recommendation for today...
2019-09-30 23:28:54,145 __main__ The code is outside execution period.
2019-09-30 23:28:54,202 __main__ Successfully logged out account.

Installing

A step by step series of examples will be added

Example to be added

Running the AlgoRobinhood

Simply git clone this codebase and execute the below command. After successfully login in, a log file will be generated under /log, with detailed information like recommendations made from a tensorflow model predction, as well as buy/sell operations being executed if any

python AutoTrade.py

Example of a log file

2019-09-30 23:22:04,500 __main__ Auto trading start at 2019-09-30 23:22:04
2019-09-30 23:22:04,500 __main__ The code is outside execution period.
2019-09-30 23:22:16,785 __main__ Successfully logged in account
2019-09-30 23:22:16,785 __main__ Running stocks recommendation for today...
2019-09-30 23:22:23,236 recommendation_system.recommendation Symbol SNAP is using LSTM training model and doing forecast...
2019-09-30 23:22:27,877 recommendation_system.recommendation Symbol SNAP is trained and validated with accuracy 60.27%, forecasted to price up by 5.0% over the 5 days with predicted probability of 24.43%
...
2019-09-30 23:28:40,817 recommendation_system.recommendation Symbol COF is using LSTM training model and doing forecast...
2019-09-30 23:28:54,144 recommendation_system.recommendation Symbol COF is trained and validated with accuracy 90.41%, forecasted to price up by 5.0% over the 5 days with predicted probability of 4.17%

2019-09-30 23:28:54,145 recommendation_system.recommendation Today's top 5 recommended stocks are: 
2019-09-30 23:28:54,145 recommendation_system.recommendation Symbol GE: Rating 53.47% - Model Accuracy 87.67%
2019-09-30 23:28:54,145 recommendation_system.recommendation Symbol NFLX: Rating 49.46% - Model Accuracy 86.3%
2019-09-30 23:28:54,145 recommendation_system.recommendation Symbol FIT: Rating 38.27% - Model Accuracy 82.19%
2019-09-30 23:28:54,145 recommendation_system.recommendation Symbol AMZN: Rating 29.51% - Model Accuracy 91.78%
2019-09-30 23:28:54,145 recommendation_system.recommendation Symbol PVTL: Rating 27.16% - Model Accuracy 80.82%
2019-09-30 23:28:54,145 __main__ The code is outside execution period.
2019-09-30 23:28:54,202 __main__ Successfully logged out account.

Web-based Deployment

Example will be added about how to deploy this on a user-friendly web based system

Example to be added

Built With

  • Python 3.6 - Codebase development and execution
  • Django - The web framework development

Versioning

  • Version 1.0

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Working in progress:

  • Build Github page with more information in README.md - done on 20190929;
  • Optimize the data pipeline for modeling, and do codebase refactoring; - done on 20190930
  • add modeling class, which can be extented to RF and XGBoost; - done on 20190930
  • Extend machine leaning models by adding Random Forest to do forecast; - done on 20191001
  • Extend machine leaning models by adding XGboost to do forecast; - in progress
  • Create Python package;
  • Build Web-based UI;
  • Build NLP on financial news, take it as additional features in ML models to enhance model performance;

algorobinhood's People

Contributors

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