ai-trader
Backtest trading strategies across stocks, crypto, and forex with LLM-driven tools
Install
See the repository for setupWhat it does
AI-Trader is a configuration-driven backtesting framework built on Backtrader for testing, optimizing, and integrating algorithmic trading strategies across US stocks, Taiwan stocks, cryptocurrencies, and forex. It suits algorithmic traders and developers who want reproducible backtests and a way for AI assistants to drive the engine.
Backtests can be defined in version-controllable YAML files and run through a CLI, or driven from Python as a library. Over 20 built-in strategies are included, and custom strategies inherit from a base class and are registered automatically.
Market data can be fetched for supported markets and stored as CSV or in a SQLite cache, with commands to list, inspect, and clean cached data.
A Model Context Protocol server lets AI assistants run backtests, fetch data, and list strategies in natural language. It is configured for Claude Desktop by pointing the mcpServers entry at python3 -m ai_trader.mcp with the project directory as the working directory; a virtual environment requires the full Python path.
Limitations: config examples and bundled data require a source install, results depend on downloaded data, and the project is GPL-3.0 licensed.
Compatibility and authentication
- Connection
- Local
- Transports
- Unspecified
- Authentication
- Unknown
Security and permissions
- When you run the server locally, it runs with your user permissions.
- Authentication type: Unknown.
Repository data
- Stars
- 1,143
- Last push
- Mar 28, 2026
- License
- GPL-3.0
- Archived
- No
FAQ
- What license does ai-trader use?
- GPL-3.0
- Does ai-trader run locally or remotely?
- It runs locally.
- Is ai-trader an official server?
- It is listed as a community server.
Embed a listing badge
<a href="https://aiagentsmarketplace.dev/mcp/ai-trader"><img src="https://aiagentsmarketplace.dev/badges/featured.svg" alt="Featured on AI Agents Marketplace" width="262" height="36"></a>
Comments
No comments yet.