8000 GitHub - Tran325/AI-stock-trading-bot: Stock Trading bot using AI model (TimeMixer Forecasting Model)
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Tran325/AI-stock-trading-bot

Repository files navigation

Stock Trading bot using AI LLM Forecasting Model

Overview

AI-powered stock trading bot leverages the TimeMixer model—a hybrid LSTM-attention architecture—to forecast price movements with high accuracy. By analyzing historical OHLCV data and market trends, the bot generates low-latency trading signals for intraday or swing strategies. The TimeMixer's ability to capture long-term dependencies and key temporal patterns makes it ideal for volatile equity markets. Integrated with broker APIs, the system executes trades autonomously while managing risk through dynamic stop-loss and position sizing.

Medium

Model Output

Trained on 2019-2021 stock data, tested on 2022 with a profit of $480.45:

Google Stock Trading episode

You can obtain similar visualizations of your model evaluations using the notebook provided.

Table of contents

contents

Models

  1. LSTM
  2. LSTM Bidirectional
  3. LSTM 2-Path
  4. GRU
  5. GRU Bidirectional
  6. GRU 2-Path
  7. Vanilla
  8. Vanilla Bidirectional
  9. Vanilla 2-Path
  10. LSTM Seq2seq
  11. LSTM Bidirectional Seq2seq
  12. LSTM Seq2seq VAE
  13. GRU Seq2seq
  14. GRU Bidirectional Seq2seq
  15. GRU Seq2seq VAE
  16. Attention-is-all-you-Need
  17. CNN-Seq2seq
  18. Dilated-CNN-Seq2seq

You can check the Deep-learning models here

Dataset

You can download Historical Financial data from here for training, or even use some sample datasets already present under data/.

Ranking in 2024

  1. TimeGPT ranking 1 (paid)
  2. TimeFM ranking 2 (open source)
  3. Chronos ranking 3 (open source)

You can check the model Ranking here

Getting Started

In order to use this project, you'll need to install the required python packages:

pip3 install -r requirements.txt

Now you can open up a terminal and start training the agent:

python3 train.py data/GOOG.csv data/GOOG_2018.csv --strategy t-dqn

Once you're done training, run the evaluation script and let the agent make trading decisions:

python3 eval.py data/GOOG_2019.csv --model-name model_GOOG_50 --debug

Now you are all set up!

Results

Results

Results

Results

Releases

No releases published

Packages

No packages published

Contributors 5

0