Giter Club home page Giter Club logo

machine-learning-trading-bot's Introduction

ML Trading Bot

image

Project 2 Submission - October 2022

Team Members

  • David Garcia
  • Shay Schreurs
  • Tim L.
  • Arandi M.

Motivation

  • Our motivation was to apply machine learning techniques to develop an algorithmic trading bot. A machine learning model was used to attempt to accurately predict the right time to buy or sell a stock. The core idea was to efficiently make profitable trades in the stock market.

Data Preparation & Model Training

  • Data Preparation:
    • Determine variables (X data) and the target (y)
    • Is the data balanced?
    • Train data using different models
  • Model Evaluation
    • Use test data to evalaute model performance
  • Predictions
    • Make predictions using the best performing model
  • Data Visualization
    • Visualize the results
  • Make Money!!! (We hope)

Machine Learning Models

  • Three machine learning models were utilized to train and predict the trading data sourced from Alpaca API. The target was determined to be the entry price plus 3 times the Average True Range(ATR): '1'. The stop was determined to be the entry price minus the Average True Range (ATR): '-1'. Support Vector Machine (SVM) and Decision Tree models learnt in class were applied to this data. We used Stochastic Gradient Descent (SGD) for the new model as stipulated in the project requirements.

  • The data was prepared by ascertaining performance indicators and the target. The data was then scaled and undersampled to ensure the data is balanced before training. The best perfoming model from the evaluations is then selected for predictions.

Technologies

  • Jupyter lab
  • Python
  • Pandas
  • Numpy
  • Pyviz
  • finta
  • Scikit
  • pydotplus
  • Google Collab

Outcomes

  • For the initially selected stocks, the SVM model performed the best. However, as this is a dynamic bot, this may change depending on the selected security and the time periods among other factors that the user may determine to apply.

machine-learning-trading-bot's People

Contributors

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