独立运营 · 不出售排名位置  · 我们怎么评估工具 →
Anclum 提交收录
W

whchien/ai-trader

Backtests with many strategies, plus an MCP server

装之前:有可直接复制的命令 · 许可证未标注 · 链接可访问

在 GitHub 查看 ↗链接已于 2026-11-12 核查 · HTTP 200 · 打开的是厂商自己的官网
安装与配置
  1. 复制上面的命令
  2. 粘成 claude_desktop_config.json 里 mcpServers 的一项(本地服务器用 command + args,示例见 客户端接法)
  3. 重启客户端
取自该仓库的安装命令
pip install ai-trader

解析自我们于 2026-11-06 抓取的该仓库 README;我们未执行过。

这条是仓库自己写的安装方式,不是 MCP 客户端配置,所以不生成 JSON。
配置项的键名以你的客户端为准:客户端与 CLI
来源明细
收录自 abordage/awesome-mcp 榜单(我们从中收集的条目之一) · 条目类型:MCP 服务
收录与活跃
收录于 2026-11-05 · 最近见到 2026-11-14 · 共见到 10 次 · 被 10 个来源列出
评分构成
综合分 1,003 · 10 个来源 · mcp
安装
pip install ai-trader
常见问题(答案都来自我们的记录)
怎么安装?
该仓库给出的安装命令是 pip install ai-trader。我们的记录里它是仓库自己提供的;不保证在你的客户端上直接可用。
它适合谁 / 用来做什么?
我们把它归在这些标签下: MCP 服务。标签来自条目自身,不是我们强加的分类。
谁维护它、还在更新吗?
我们收录于 2026-11-05;最近见到 2026-11-14。这里没有"官方认证"或"质量评级"——我们只记录来源与时间。

# 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
收录徽章(可选)
想把收录标记放进 README 就复制这行,可选,不影响收录。
[![Listed on Anclum](https://anclum.com/badge/listed.svg)](https://anclum.com/zh/s/whchien-ai-trader/)
来源
awesome · https://github.com/whchien/ai-trader
按领域浏览
MCP 服务
收录来源
10 个独立来源
收录于
今天

同类推荐

全部 6,229 →

所属领域与标签

每个标签都能点进去看同类的全部条目。数字是当前库里的真实条数。

浏览全部领域 →

← 返回索引