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.
- SMA (Niave SMA & Cross SMA)
- Bollinger Band
- Momentum
- RSI
- Resistance Support Relative Strength (RSRS)
- ROC
- Double Top
- Risk Averse
- Turtle
- Volatility Contraction Pattern (VCP)
- ROC rotation
- RSRS rotation
- Triple RSI rotation
- Multi Bollinger Bands rotation
- Logistic regression
- Feature engineering
- Gradient boosting
- DNN
- RNN
- LSTM
- Reinforcemnt learning
- (More to come!)
-
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
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.