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.
Trained on 2019-2021 stock data, tested on 2022 with a profit of $480.45:
You can obtain similar visualizations of your model evaluations using the notebook provided.
- LSTM
- LSTM Bidirectional
- LSTM 2-Path
- GRU
- GRU Bidirectional
- GRU 2-Path
- Vanilla
- Vanilla Bidirectional
- Vanilla 2-Path
- LSTM Seq2seq
- LSTM Bidirectional Seq2seq
- LSTM Seq2seq VAE
- GRU Seq2seq
- GRU Bidirectional Seq2seq
- GRU Seq2seq VAE
- Attention-is-all-you-Need
- CNN-Seq2seq
- Dilated-CNN-Seq2seq
You can check the Deep-learning models here
You can download Historical Financial data from here for training, or even use some sample datasets already present under data/
.
- TimeGPT ranking 1 (paid)
- TimeFM ranking 2 (open source)
- Chronos ranking 3 (open source)
You can check the model Ranking here
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!