---
name: vibe-trading-agent
description: Use when you say "set up the open source AI hedge fund" or "install Vibe-Trading"; it installs HKUDS Vibe-Trading so Claude can research markets, backtest strategies, benchmark alphas, run paper accounts and replay your own trade journal with Shadow Account.
---
# Vibe-Trading: the open source AI trading agent
## What it does
Vibe-Trading turns finance questions into research reports, runnable backtests and paper portfolios. It ships as a Python package with a CLI, a web app, an HTTP API and an MCP server, so Claude can call the same tools.
The parts of the project:
- Market research: prices, SEC 13F filings, ETF look-through, DCF and peer multiples (`/dcf`, `/comps`), earnings tracking, arXiv/OpenAlex paper search, and questions about documents you upload.
- Research Teams: 30 preset swarm teams for equities, quant, crypto and risk, including a bull/bear investment committee, plus task assignment in Pixel Office.
- Quant Lab: Alpha Zoo with 478 prebuilt alphas across five libraries (qlib158, alpha101, gtja191, academic, fundamental), 12 backtest engines across markets, out-of-sample and walk-forward testing, Options Lab for multi-leg payoffs and Greeks, and portfolio risk (drawdown, VaR, expected shortfall, Brinson attribution, correlation).
- Trading and Portfolio: 19 broker connectors with per-broker read / paper / live permissions, paper trading accounts that persist cash, fills and NAV, and Shadow Account, which imports your broker trade journal, inspects fees and trading habits, then compares your actual trades with a rule-based replay.
- Recurring research: scheduled premarket briefs, earnings trackers and portfolio checkups sent to a channel such as Slack, Telegram or email, plus versioned research artifacts you can revise, compare and export.
Data comes from 28 market-data sources with a `source: "auto"` fallback chain per market.
## What you need
- Python 3.11 or newer.
- A model provider and its API key, chosen in the `vibe-trading init` setup wizard (or set in `agent/.env` for the web app).
- Docker, only if you want the web app at `http://localhost:8899`.
- Optional: `TUSHARE_TOKEN` for China A-share data. HK, US, Canada and crypto research work without any data key.
- Optional: `OPENAI_API_KEY` and `LANGCHAIN_MODEL_NAME` for the multi-agent swarm teams (`run_swarm`).
- Optional: a broker account if you want portfolio reads, paper orders or live trading. Gildata features need their own opt-in.
## Setup
Terminal install and setup wizard:
```bash
pip install vibe-trading-ai
vibe-trading init
vibe-trading
```
Give Claude Code the MCP server (the source's own MCP command is `vibe-trading-mcp`):
```bash
claude mcp add vibe-trading -- vibe-trading-mcp
```
For Claude Desktop, add this to `claude_desktop_config.json`, restart the client and call `list_skills`:
```json
{
"mcpServers": {
"vibe-trading": { "command": "vibe-trading-mcp" }
}
}
```
Optional web app with Docker:
```bash
git clone https://github.com/HKUDS/Vibe-Trading.git
cd Vibe-Trading
cp agent/.env.example agent/.env
# Set your provider and API key in agent/.env.
docker compose up --build
```
Optional local API server:
```bash
vibe-trading serve --port 8899
```
For a frontend development setup or a local model, see the project's installation guide at https://github.com/HKUDS/Vibe-Trading/blob/main/guides/installation.md
## How to use it with Claude
- "Backtest a BTC-USDT 20/50 moving-average crossover for 2024. Compare it with buy-and-hold and report maximum drawdown."
- "Compare AAPL and MSFT over 2024. Which month accounts for the largest gap in returns?"
- "Bench all of GTJA 191 on CSI 300 from 2018 to 2025 and show the top 20 by information coefficient."
- "Run the investment committee swarm on TSLA in the US market and show me the bull case, the bear case and the risk review."
- "Here is my exported broker trade journal. Analyze my fees and trading habits, then run the Shadow Account replay and compare it with my actual trades."
- "Advance my paper trading account one trading day and show the fills, cash and NAV, then reconcile the arithmetic."
Safety notes. Backtests and paper trading touch no real money: start there. The broker side can read your holdings and, for supported live profiles, place real orders that spend real money. Use a read-only profile or a broker sandbox first, set symbol, order and exposure limits before enabling live trading, and know where the kill switch is. Your funds stay with the broker. Nothing here is financial advice, and a backtest result is not a prediction. Only connect accounts and import journals that are your own, and keep to your broker's and each data source's terms.
## Credits
Made by HKUDS (Vibe-Trading), packaged by Orbit. Source: https://github.com/HKUDS/Vibe-Trading (license: MIT)