Our repository for demonstrating how to build and deploy sophisticated algorithmic trading solutions using modern AI, from multi-agent systems to production-ready execution frameworks.
- Author: José Carlos Gonzáles Tanaka
- QuantInsti's EPAT Content Team is responsible for maintaining and contributing to this repository.
The primary objective of this repository is to provide a concrete, end-to-end example of using modern AI agents for trading. It connects the theoretical application of LLMs to a practical, executable trading bot.
The project demonstrates the following workflow:
- Learn: Discover the landscape of modern AI tools for trading.
- Build: Follow tutorials to construct AI agent systems for market analysis.
- Integrate: Plug AI-driven logic into a professional-grade trading framework.
- Deploy: Run a fully automated, AI-powered trading bot.
This project will be updated with new implementations and tutorials to reflect advancements in the field.
This repository is organized into modules based on the AI tools and platforms they demonstrate. We will continue to expand this structure as we incorporate new technologies.
- Location: gemini_cli/
- Description: This section contains the core end-to-end implementation and related guides.
- Production Trading Framework (
ib_stock_setup): A professional Python framework for automated stock trading via the Interactive Brokers (IB) API. - AI-Powered Strategy (
AI_strategy.py): A pluggable multi-agent strategy using Gemini that trades based on news sentiment and volatility analysis. - Developer Guides: Practical examples for using the Gemini CLI for development tasks.
- Production Trading Framework (
- Location: gemini_full_stack_langgraph/
- Description: A detailed, step-by-step tutorial on coding the multi-agent news analysis system from scratch, which provides the foundation for the
AI_strategy.pyfile in our setups to trade live with LLMs!
- Location: LLMs/
- Description: Detailed examples on how to create an agentic-based portfolio manager and an MCP server using the Interactive Brokers API with LLMs!
- Location: Dify/
- Description: This section contains an example using the Dify platform to build an AI-driven strategy backtesting script builder. The tutorial demonstrates how to construct an Agent workflow through a visual interface to create backtesting scripts.
- We're currently engaged in creating more use cases of AI tools and platforms. Stay tuned!
The main example in this repository demonstrates the integration of the AI strategy with the trading framework. By combining the ib_stock_setup and the AI_strategy.py, you can deploy a bot that:
- Connects to Interactive Brokers.
- Fetches the latest financial news for a target stock.
- Uses a multi-agent system to analyze sentiment and volatility.
- Makes autonomous
BUY/SELLdecisions based on the AI's analysis. - Executes and manages the trade according to pre-set risk parameters.
This demonstrates a complete workflow, from AI-driven analysis to automated trade execution.
This repository is actively maintained and will be expanded with more implementations, including but not limited to:
- Advanced quantitative strategies using AI.
- Integrations with other brokerages and data sources.
- Tutorials on new and emerging agentic frameworks.
- Alternative asset classes like crypto and forex.
Stay tuned for updates!
Contributions are welcome! Whether it's reporting a bug, suggesting a new feature, improving documentation, or submitting a new implementation, your help is appreciated. Please refer to the CONTRIBUTING.md guide within this main directory for initial guidelines.
This project is licensed under the Apache License 2.0. See the LICENSE.txt file in this directory for details.