A modular, GPT-powered platform for generating, backtesting, and selecting algorithmic trading strategies β built for experimentation and competition.
This system automates the discovery of trading strategies using large language models (LLMs) like OpenAI GPT.
It combines strategy generation, backtesting, evaluation, and filtering into one pipeline.
Originally inspired by the IMC Prosperity Trading Challenge, this project aims to evolve into a full-featured research platform suitable for Final Year Project (FYP) and academic presentation.
graph TD
A[Prompt Template] --> B[LLM Strategy Generator]
B --> C[Code Validator]
C --> D[Backtester Runner]
D --> E[Performance Evaluator]
E --> F[Strategy Selector]
Modules:
- π Prompt Loader: loads prompt templates for strategy generation
- π€ Strategy Generator: uses GPT to create Python-based trading strategies
- π§ͺ Validator: ensures generated code is syntactically valid
- π Backtester: runs simulations using the IMC tutorial market engine
- π Evaluator: scores each strategy on PnL, risk, stability
- π Selector: filters top-performing strategies for tuning
β οΈ Note: You must provide your own OpenAI API key inconfig.py.
git clone https://github.com/yourname/strategy-factory.git
cd strategy-factory
# Install dependencies
pip install -r requirements.txt
# Run the pipeline
python run_pipeline.pyYou can modify prompt templates in the
/prompts/folder.
- Python 3.10+
- OpenAI GPT-3.5 / GPT-4 (via API)
- Custom backtest system (IMC prosperity3bt)
- CLI + logging based workflow
- Optional: Streamlit for future visualization
- Basic strategy generation pipeline (v1)
- Add API key management & failover
- Integrate strategy scoring model
- Batch strategy generation mode
- Streamlit-based result viewer
- Combine with Genetic Optimizer (WIP)
If you're interested in collaboration, mentoring, or feedback β feel free to open an issue or connect.
π Note: This project is released under the MIT License for research and educational purposes only.
Commercial use is not permitted without written consent from the author.