Alpha-GPT is an advanced Human-AI collaborative framework designed for Quantitative Investment. It leverages cutting-edge tools like LangGraph, Zipline, Alphalens, and PyGAD to generate, evaluate, and optimize financial trading strategies (alphas).
This repository is currently a work in progress. The latest code updates are not yet fully pushed to GitHub but will be available soon.
Feel free to explore the current implementation, and if you have any questions, contact me.
We are grateful for the foundational research papers that inspired and guided this project:
- Alpha-GPT: Human-AI Interactive Alpha Mining for Quantitative Investment
- Alpha-GPT 2.0: Human-in-the-Loop AI for Quantitative Investment
These papers have significantly influenced the system's development, especially in leveraging Genetic Programming, LLM-guided Alpha Discovery, and Backtesting Pipelines.
- Alpha Generation: Custom alphas generated using symbolic expressions through LangGraph Orchestration.
- Evaluation and Backtesting: Backtest performance using Zipline and evaluate factors with Alphalens.
- Genetic Programming: Evolve optimal alphas using PyGAD through selection, mutation, and crossover.
- Data Pipeline Automation: Modular design supports real-time updates and evaluations using LangGraph workflows.
- Install Dependencies:
pip install -r requirements.txt # Set up environment variables: cp .env.example .env # Then add your OpenAI API key
- Run the Project:
This will:
python main.py
- Load the trading idea from user input
- Generate seed alphas using GPT-4
- Evaluate and backtest the alphas
- Optimize using genetic programming
- Output the best performing strategies