# whchien/ai-trader

Backtrader-powered backtesting framework for algorithmic trading, featuring 20+ strategies, multi-market support, CLI tools, and an integrated MCP server for professional traders.

Repository: https://github.com/whchien/ai-trader
Canonical: https://ross.abutalabs.com/products/whchien-ai-trader
Language: Python
License: GPL-3.0
License Family: copyleft
Topics: ai, algorithmic-trading, backtrader, portfolio-management, stock-price-prediction, trading, ai-agents, cli, mcp, mcp-server, quantitative-finance
Last push: 2026-03-28T11:16:18+00:00

## Health v2 (maintenance only)
Score: 67/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 74, release rhythm 64, longevity 57
- inputs: {"age_days": 806, "days_push": 158, "days_rel": 240, "gap_med": 16, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1062, forks 146 (observed 2026-08-28T04:03:26.139514+00:00)

## What it is
A config-driven backtesting framework for algorithmic trading built on Backtrader, with 20+ built-in strategies and multi-market support (US/Taiwan stocks, crypto, forex). It includes a CLI for running backtests and fetching market data, plus an integrated MCP server so LLM assistants like Claude can run backtests and analyze strategies.

## Use cases
- backtest trading strategies on historical stock data
- run algorithmic trading backtests from yaml config files
- fetch historical market data for stocks crypto and forex
- let claude run backtests via mcp server
- test technical indicator strategies like sma crossovers
- build custom trading strategies in python
- quick backtest on a csv of price data

## When to choose
- you want a Python backtesting framework built on Backtrader with a rich CLI
- you need multi-market support across US stocks, Taiwan stocks, crypto, and forex
- you want LLM/AI assistants to trigger and analyze backtests through MCP
- you prefer reproducible, version-controlled YAML-driven backtest configs

## When to avoid
- you need live trading execution or broker integration rather than backtesting
- you want a GUI-based trading platform
- you need high-frequency or tick-level backtesting performance
- you require a non-Python or non-GPL-licensed solution

## Facets
- artifact type: framework
- maturity: active
- function: cli, mcp, sdk, data-science, trading
- domain: fintech, developer-tools
- platform: python, cli, cross-platform
- tags: backtesting, backtrader, algorithmic-trading, mcp-server, technical-analysis, quantitative-finance, llm-integration, multi-market, command-line

## Member repositories
- whchien/ai-trader (main) score 67

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:26.139514+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:56:47.567146+00:00, confidence not recorded.
  - readme: https://github.com/whchien/ai-trader (fetched 2026-08-28T04:03:26.139514+00:00, sha 6aba3b58100e)
  - registry_pypi: https://pypi.org/pypi/ai-trader/json (fetched 2026-08-29T12:58:41.414205+00:00, sha 8a64a0ead483)
- Data as of 2026-08-30T08:39:29.467469+00:00.
