Giter VIP home page Giter VIP logo

trading-bot-16's Introduction

Algorithmic Trading Using Deep Learning and Robinhood's Unofficial API

File Structure

Project Overview

In this project, I extend one of my earlier capstone projects. That project used deep learning to find historical pricing patterns in 54 Exchange Traded Funds (ETFs). This project takes the models from that capstone projects and implements them in a real time trading strategy. This "Trading Bot", combines the previously trained models, a stream of current stock price data, and the unofficial API for the e-brokerage Robhinhood in one application. This application could be used to deploy a real time algorithmic stock trading strategy.

Additional functionality of the "Trading Bot" includes logging trades, backtesting both the models' strategy and a passive strategy, and displaying results daily, including profit (loss) and average return per trade. This trade logging is crucial to understanding the results and the trades that contributed to the overall performance.

** The information in this document is for informational and educational purposes only. Nothing in this document may be construed as financial, legal or tax advice. The content of this document is solely the opinion of the author, who is not a licensed financial advisor or registered investment advisor.

This document is not an offer to buy or sell financial instruments. Never invest more than you can afford to lose. You should consult a registered professional advisor before making any investment. **

Data Acquisition and Processing

Real time stock pricing data is aquired via the python package yFinance and via API from data provider TwelveData

Daily and weekly updating of the MongoDB Database utilizes stock price data from Alpha Vantage via API calls.

Process Map

Hypothetically, the "Trading Bot" could be initialized each morning before the stock market opens. This would be contained in the real_time_trading.py file. The "Trading Bot" utilizes the unofficial API of Robinhood

Each morning, the MongoDB Database would need to be updated to include the prior days' data for the relevant stocks for that day. This is contained in the "update_db_daily.py" file. At the end of each trading week, data for all companies would be updated using the "update_db_weekly.py" file.

Finally, strategy results can be viewed using the "results.py" file. This functionality displays a number of investment return metrics and compares the actual results compared to different back test strategies.

Additional Considerations

To understand the foundation for this project, one would need an understanding of the project that served as its oringal inspiration

Some changes have been made to the structure of this project. The main change includes only using closing price data rather than open, high, low, close pricing data. This made streaming the data more feasible for some data providers.

Other changes made MongoDB storage more tenable and efficient.

The deep learning models that underlie the "Trading Bot's" strategy would need to be re-trained periodically to capture as much data as possible, as well as recent trends.

trading-bot-16's People

Contributors

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