
ai-trader
ai-trader
This repository demonstrates how to implement 20+ algorithmic trading strategies using Backtrader framework with a focus on AI. It includes examples for both the US and Taiwanese stock markets.
Some of the codes are still in development and not fully clean or functional at the moment, but I am actively working on updates and improvements.
For example, use a Triple RSI Rotation strategy to manage a stock portfolio.
Strategy overview
Single stock trading
- SMA (Niave SMA & Cross SMA)
- Bollinger Band
- Momentum
- RSI
- Resistance Support Relative Strength (RSRS)
- ROC
- Double Top
- Risk Averse
- Turtle
- Volatility Contraction Pattern (VCP)
Portfolio trading
- ROC rotation
- RSRS rotation
- Triple RSI rotation
- Multi Bollinger Bands rotation
Machine learning based (dev)
- Logistic regression
- Feature engineering
- Gradient boosting
- DNN
- RNN
- LSTM
- Reinforcemnt learning
- (More to come!)
How to Start
-
Clone the repository:
git https://github.com/whchien/ai-trader.git cd ai-trader
-
Install the required dependencies:
pip install -r requirements.txt
-
(Optional) Download the data (you can also prepare your own).
python ai_trader/loader.py
-
Test the first strategy.
python ai_trader/strategy/classic/bbands.py
Tutorials
In the future, I will share some tutorial notebooks to share my learning with the community. If you find it helpful, please give the repo a star ⭐️. Your support would mean a lot to me.
Vibe Score

0.448
Sentiment

0.04798085176625949
Rate this Resource
Join the VibeBuilders.ai Newsletter
The newsletter helps digital entrepreneurs how to harness AI to build your own assets for your funnel & ecosystem without bloating your subscription costs.
Start the free 5-day AI Captain's Command Line Bootcamp when you sign up: