W
whchien/ai-trader
Backtests with many strategies, plus an MCP server
View on GitHub ↗Link checked 2026-11-12 · HTTP 200 · opens the vendor's own site
Install & config
- Copy the command above
- Paste it as one entry under
mcpServersinclaude_desktop_config.json— local servers take command + args (example: clients) - Restart your client
Install command from the repository
pip install ai-trader
Parsed from the README we fetched on 2026-11-06; we have not executed it.
This is the install method the repository states, not an MCP client config, so no JSON is generated.
Key names differ by client: Clients & CLI
- Source
- collected from the abordage/awesome-mcp list · type: MCP server
- Harvest history
- first seen 2026-11-05 · last seen 2026-11-14 · seen 10× · listed by 10 sources
- Score
- score 1,003 · 10 sources · mcp
- Install
pip install ai-trader
FAQ (answers come from our records)
How do I install it?
The repository provides this install command:
pip install ai-trader. It comes from the repository itself; we cannot guarantee it runs as-is in your client.Who is it for?
We filed it under these tags: MCP 服务. The tags come from the entry itself, not a taxonomy we imposed.
Who maintains it?
first catalogued 2026-11-05;last seen 2026-11-14。There is no official certification or quality rating here — we record sources and dates only.
# AI-Trader
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
中文版說明 (Chinese Subpage)
A professional, config-driven backtesting framework for algorithmic trading, built on Backtrader. Seamlessly test, optimize, and integrate trading strategies with Large Language Models (LLMs) across stocks, crypto, and forex markets.
## Key Features
Config-Driven Workflows: Define and manage backtests with version-controllable YAML files for reproducible results.
Seamless LLM Integration: Built-in MCP (Model Context Protocol) server allows AI assistants like Claude to run backtests, fetch data, and analyze strategies.
Multi-Market Support: Test strategies on US stocks, Taiwan stocks, cryptocurrencies, and forex.
Extensive Strategy Library: Comes with over 20 built-in strategies, from classic indicators to advanced adaptive models.
Powerful CLI: A rich command-line interface to run backtests, fetch market data, and list strategies.
Developer Friendly: Easily create and test custom strategies with simple helpers and a clear structure.
## Quick Start
1. Installation
Option A: Install from PyPI (Recommended for using the CLI)
bash
pip install ai-trader
Use this if you want to:
Use the CLI commands: ai-trader run, ai-trader fetch, ai-trader quick
Run backtests on your own data files
Use as a library in your Python projects
Option B: Install from Source (Recommended for examples and config templates)
bash
git clone https://github.com/whchien/ai-trader.git
cd ai-trader
# Install dependencies (choose one method)
uv sync # Recommended (fastest, modern tool)
# poetry install # Or use Poetry
# pip install -e . # Or traditional pip with editable install
Use this if you want to:
Run the config-based examples in config/backtest/
Use the example data files in data/
Run the example scripts in scripts/examples/
Contribute or customize strategies
2. Run a Backtest via CLI
If you cloned from source, run a predefined backtest using a configuration file:
bash
# Run a backtest from a config file (requires source installation)
ai-trader run config/backtest/classic/smaexample.yaml
Or, run a quick backtest on any data file (works with both pip and source installation):
bash
# Quick backtest on your own data file
ai-trader quick CrossSMAStrategy yourdata.csv --cash 100000
3. Fetch Market Data
Download historical data for any supported market:
bash
# US Stock (default: saves to CSV)
ai-trader fetch TSM --market usstock --start-date 2020-01-01
# Taiwan Stock (台灣股票)
ai-trader fetch 2330 --market twstock --start-date 2020-01-01
# Cryptocurrency
ai-trader fetch BTC-USD --market crypto --start-date 2020-01-01
# With SQLite persistent caching (NEW!)
ai-trader fetch AAPL --market usstock --start-date 2024-01-01 --storage sqlite
# Save to both CSV and SQLite
ai-trader fetch AAPL --market usstock --start-date 2024-01-01 --storage both
Persistent Data Storage with SQLite
By default, ai-trader fetch saves data to CSV. For faster repeated backtests, use SQLite:
bash
# First fetch: Downloads from API and caches in SQLite (~2-3 seconds)
ai-trader fetch AAPL --market usstock --start-date 2024-01-01 --storage sqlite
# Repeated fetch: Loads from cache (~50ms, no API call)
ai-trader fetch AAPL --market usstock --start-date 2024-01-01 --storage sqlite
A professional, config-driven backtesting framework for algorithmic trading, built on Backtrader. Seamlessly test, optimize, and integrate trading strategies with Large Language Models (LLMs) across stocks, crypto, and forex markets.
## Key Features
Config-Driven Workflows: Define and manage backtests with version-controllable YAML files for reproducible results.
Seamless LLM Integration: Built-in MCP (Model Context Protocol) server allows AI assistants like Claude to run backtests, fetch data, and analyze strategies.
Multi-Market Support: Test strategies on US stocks, Taiwan stocks, cryptocurrencies, and forex.
Extensive Strategy Library: Comes with over 20 built-in strategies, from classic indicators to advanced adaptive models.
Powerful CLI: A rich command-line interface to run backtests, fetch market data, and list strategies.
Developer Friendly: Easily create and test custom strategies with simple helpers and a clear structure.
## Quick Start
1. Installation
Option A: Install from PyPI (Recommended for using the CLI)
bash
pip install ai-trader
Use this if you want to:
Use the CLI commands: ai-trader run, ai-trader fetch, ai-trader quick
Run backtests on your own data files
Use as a library in your Python projects
Option B: Install from Source (Recommended for examples and config templates)
bash
git clone https://github.com/whchien/ai-trader.git
cd ai-trader
# Install dependencies (choose one method)
uv sync # Recommended (fastest, modern tool)
# poetry install # Or use Poetry
# pip install -e . # Or traditional pip with editable install
Use this if you want to:
Run the config-based examples in config/backtest/
Use the example data files in data/
Run the example scripts in scripts/examples/
Contribute or customize strategies
2. Run a Backtest via CLI
If you cloned from source, run a predefined backtest using a configuration file:
bash
# Run a backtest from a config file (requires source installation)
ai-trader run config/backtest/classic/smaexample.yaml
Or, run a quick backtest on any data file (works with both pip and source installation):
bash
# Quick backtest on your own data file
ai-trader quick CrossSMAStrategy yourdata.csv --cash 100000
3. Fetch Market Data
Download historical data for any supported market:
bash
# US Stock (default: saves to CSV)
ai-trader fetch TSM --market usstock --start-date 2020-01-01
# Taiwan Stock (台灣股票)
ai-trader fetch 2330 --market twstock --start-date 2020-01-01
# Cryptocurrency
ai-trader fetch BTC-USD --market crypto --start-date 2020-01-01
# With SQLite persistent caching (NEW!)
ai-trader fetch AAPL --market usstock --start-date 2024-01-01 --storage sqlite
# Save to both CSV and SQLite
ai-trader fetch AAPL --market usstock --start-date 2024-01-01 --storage both
Persistent Data Storage with SQLite
By default, ai-trader fetch saves data to CSV. For faster repeated backtests, use SQLite:
bash
# First fetch: Downloads from API and caches in SQLite (~2-3 seconds)
ai-trader fetch AAPL --market usstock --start-date 2024-01-01 --storage sqlite
# Repeated fetch: Loads from cache (~50ms, no API call)
ai-trader fetch AAPL --market usstock --start-date 2024-01-01 --storage sqlite
Listed badge (optional)
Copy this line into the README if you want the listing mark. Optional, and it does not affect being listed.
[](https://anclum.com/en/s/whchien-ai-trader/)
- Source
- awesome · https://github.com/whchien/ai-trader
- Browse by field
- MCP servers
- Listed by
- 10 independent sources
- added
- today
More like this
Filed under
Every tag opens the full list for that filter. Counts are the live catalogue figures.