A collaborative project exploring quantitave trading strategies across US, Hong Kong, and Chinese A-shares markets.
This repository contains implementations of various quantitative trading strategies across different markets:
- A-Shares Market: Strategies for China's mainland stock market
- Hong Kong Market: Strategies for Hong Kong-listed stocks
- US Market: Strategies for US equities
The goal is to learn quantitative trading principles by implementing basic strategies and testing them on historical data.
- Double Moving Average: Classic MA crossover strategy adapted for A-shares with T+1 trading rules
- RSI Strategy: Relative Strength Index based mean-reversion strategy
- AH Premium: Arbitrage strategy exploiting price differences between A-shares and H-shares of dual-listed companies
- Northbound Flow: Strategy tracking capital flows from mainland China through Stock Connect
- Bollinger Bands: Mean reversion strategy using Bollinger Bands
- Momentum Factor: Factor-based momentum strategy with periodic rebalancing
- Python 3.8+
- Required packages listed in
requirements.txt
- Clone the repository:
git clone https://github.com/yourusername/ai4fin-quantitative-trading.git
cd ai4fin-quantitative-trading
- Install dependencies:
pip install -r requirements.txt
python backtest.py --strategy a_shares/strategies/double_moving_average.py --data path/to/data.csv --market a_shares
This is a learning repository - contributions, improvements, and discussions are welcome!
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-strategy
) - Commit your changes (
git commit -m 'Add some amazing strategy'
) - Push to the branch (
git push origin feature/amazing-strategy
) - Open a Pull Request
This repository is for educational purposes only. The strategies are meant for learning and not as investment advice. Always do your own research before actual trading.
This project is licensed under the MIT License - see the LICENSE file for details.