ChatGPT_Trading_Bot  by llSourcell

Trading bot for automated stock decisions

created 2 years ago
964 stars

Top 39.0% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides the code for a "ChatGPT Trading Bot" as demonstrated in a YouTube video by Siraj Raval. It's designed for individuals interested in algorithmic trading and AI, offering a practical example of using reinforcement learning for stock price prediction and automated trading decisions.

How It Works

The project utilizes a single iPython notebook to execute a five-step process. It begins by downloading 30 days of historical trading data via Yahoo Finance. A simulated trading environment is then created using this data with the FinRL library. A neural network is trained within this simulation using reinforcement learning to predict stock prices. Finally, the trained model is backtested on the past 30 days of data to calculate potential returns, with trading decisions (buy/hold/sell) executed via the Alpaca API based on predefined return thresholds.

Quick Start & Requirements

  • Install/Run: Upload the provided iPython notebook to Google Colab.
  • Prerequisites: Python 3.7, Alpaca SDK, FinRL, Vercel, Firebase.
  • Setup: Requires uploading the notebook to Colab. Deployment for automated execution involves setting up a Flask app on Vercel with cron jobs to trigger the Colab notebook.

Highlighted Details

  • Leverages reinforcement learning for stock price prediction.
  • Integrates with Alpaca API for automated trading execution.
  • Demonstrates a full pipeline from data acquisition to trading decisions.
  • Codebase is contained within a single iPython notebook for ease of use in Colab.

Maintenance & Community

The core notebook is a published example from the FinRL team. Credits are also given to Alpaca for their API. No specific community links or active maintenance signals are provided in the README.

Licensing & Compatibility

The repository does not explicitly state a license. The code is presented as an example from the FinRL team and uses the Alpaca API, which has its own terms of service. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The project is presented as a demonstration for educational purposes, with a strong disclaimer against investing real money without willingness to lose it. The effectiveness of the trading strategy is not guaranteed, and the setup for automated execution requires additional deployment steps on platforms like Vercel.

Health Check
Last commit

2 years ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
10 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Travis Fischer Travis Fischer(Founder of Agentic), and
2 more.

ai-hedge-fund by virattt

1.2%
39k
AI-powered hedge fund proof-of-concept for educational use
created 8 months ago
updated 22 hours ago
Feedback? Help us improve.