Agents

Vibe-Trading: A Free Team of AI Research Agents to Backtest Your Strategy Ideas

8 minute readUpdated October 2026Explore more

TL;DR

Vibe-Trading is a free, MIT licensed research workspace from HKUDS with over 34,000 stars on GitHub. You describe a strategy in plain English and it pulls market data, writes the strategy code, backtests it on historical prices and reports the numbers. Its Quant Strategy Desk team runs a stock screener and a factor researcher, then a strategy backtester, then a risk auditor, then a report writer. Below is the setup with Claude, the exact prompts, and the honest limits. This is research and backtesting only. It is not financial advice, and a good backtest does not mean future profit.

Learn Claude Code. Earn income. Only $9.

👉 https://www.skool.com/claudecodeclub

What Vibe-Trading is

HKUDS/Vibe-Trading

34,487 stars on October 3, 2026. MIT license. Latest release v0.1.16 (September 29, 2026). Last updated October 3, 2026.

In the README's words, Vibe-Trading is "an open-source research workspace for turning finance questions into runnable analysis." It connects plain-English prompts to market-data loaders, strategy generation, backtest engines, reports and a persistent research memory. Free data sources cover US, Hong Kong, Canada, UK and China equities plus futures and forex, and the README says all markets work without any data API keys thanks to automatic fallback.

  • Plain-English backtests. Describe the rules and get strategy code, metrics like Sharpe ratio and max drawdown, and a benchmark comparison.
  • Agent teams (swarms). The README lists 30 preset teams for investment, quant and risk workflows that hand work to each other.
  • Works with Claude. Anthropic's Messages API is a supported provider, and the README puts Claude in its "Best" model tier for complex multi-agent runs.
  • Plugs into Claude Code. It ships an MCP server (vibe-trading-mcp) with 75 tools, including backtest and run_swarm.

The agent team, exactly as the project describes it

The team that matches "describe a strategy, test it, check the risk" is the Quant Strategy Desk preset (quant_strategy_desk). Its own config describes the flow as: stock screening and factor research in parallel, then strategy backtest, then risk audit, then final report. These are its five roles:

  1. 1Stock Screener: screens a candidate universe for your market, with the criteria, a 10 to 20 name candidate list and a fundamentals snapshot. It has the market-data tool.
  2. 2Factor Researcher: mines at least 5 candidate factors, tests them (IC, ICIR, hit rate) and suggests a combination of 3 to 5.
  3. 3Strategy Backtester: turns the screen and factors into buy and sell rules plus strategy code, then runs a real backtest. Its instructions say "do not fabricate numbers."
  4. 4Risk Auditor: reads the backtest output and reports drawdowns, volatility, tail risk (VaR and CVaR), a Sharpe confidence interval and overfitting checks. If no out-of-sample test was run, it is told to say so.
  5. 5Report Aggregator: combines everything into one final report.

Other presets include investment_committee (bull and bear debate, then risk review, then a final call) and risk_committee (drawdown, tail risk and regime review, then sign-off). Run vibe-trading --swarm-presets to see all of them.

What you need

  • Python 3.11 or newer.
  • An LLM API key. For Claude, an Anthropic API key. Swarm runs make many model calls, so set a spending limit in your Anthropic console first.
  • No market-data keys. The free data sources work without them.
  • Claude Code, if you want it to install and drive everything for you.

Fastest route: let Claude Code set it up

promptRead the README at https://github.com/HKUDS/Vibe-Trading and set up Vibe-Trading on this computer for research and backtesting only.

1. Create a Python 3.11+ virtual environment and install it with the Anthropic extra: pip install "vibe-trading-ai[anthropic]". Tell me each command before you run it.
2. Run vibe-trading init and configure the Anthropic provider: LANGCHAIN_PROVIDER=anthropic, LANGCHAIN_MODEL_NAME=claude-sonnet-5-5, and my ANTHROPIC_API_KEY. Never print my key back to me.
3. Do NOT set up any broker connector, live trading or paper trading account. Research and backtesting only.
4. Run this test: vibe-trading run -p "Backtest a 20/50-day moving average crossover on AAPL for the past year, show Sharpe ratio and max drawdown"
5. Explain the results to me in plain English, including what the backtest cannot tell me.

Or do it by hand

bashpython3 -m venv .venv
source .venv/bin/activate
pip install "vibe-trading-ai[anthropic]"
vibe-trading init        # interactive .env setup
vibe-trading             # interactive terminal app

In the .env setup, these are the Anthropic settings (from the project's own .env example, with a current Claude model name):

bashLANGCHAIN_PROVIDER=anthropic
LANGCHAIN_MODEL_NAME=claude-sonnet-5-5
ANTHROPIC_API_KEY=sk-ant-your-key-here

Prefer a browser? vibe-trading serve --port 8899 starts the web app at http://localhost:8899. It is local-only by default.

Describe a strategy in plain English

The first prompt is the README's own example. The rest are written to get honest, comparable numbers back. Paste them after vibe-trading run -p, or type them into the interactive app.

promptBacktest a 20/50-day moving average crossover on AAPL for the past year, show Sharpe ratio and max drawdown
promptBacktest this rule on SPY from 2015-01-01 to 2024-12-31, long only: buy at the next open when the 14-day RSI closes below 30, sell at the next open when it closes above 55. Include realistic trading costs. Compare it with simply buying and holding SPY over the same period. Report annual return, max drawdown, Sharpe ratio, win rate and number of trades. Then rerun the exact same rule on 2005-01-01 to 2014-12-31 and tell me if the result held up.
promptBacktest a monthly momentum rotation across these ETFs: SPY, QQQ, IWM, EFA, TLT, GLD. At each month end, hold the 2 with the best 6-month return. Use 2010-01-01 to 2024-12-31 and compare with an equal-weight buy-and-hold of all six. Show the equity curve, max drawdown and the worst 12-month stretch.
promptAct as a skeptical reviewer of the backtest you just ran. List every way it could be misleading: look-ahead bias, survivorship bias, overfitting, too few trades, missing costs or slippage, and a period that flatters the idea. For each one, tell me whether it applies here and the test that would check it. Then run the most important check.

Run the full agent team

This starts the Quant Strategy Desk. Its config asks for two inputs: market and goal.

bashvibe-trading --swarm-presets
vibe-trading --swarm-run quant_strategy_desk '{"market": "US", "goal": "momentum + value dual factor on large-cap stocks"}'

Each swarm task keeps its own reports and message log, so you can read what every agent did. A swarm makes many model calls, so start with one run and check your Anthropic usage before running more.

Connect it to Claude Code (optional)

Vibe-Trading's MCP server lets Claude Code call its tools directly, like backtest and factor_analysis. Add it with Claude Code's standard command:

bashclaude mcp add vibe-trading -- vibe-trading-mcp

The README says the core research tools work with zero API keys for US, Hong Kong and crypto data, but run_swarm needs an LLM key. Because Claude Code starts the server itself, a shell export does not reach it. Pass keys with --env when you add the server, as shown in Claude Code's MCP docs at https://code.claude.com/docs/en/mcp.

The honest limits

  • A backtest is not a forecast. It shows how rules would have behaved on past prices. Markets change.
  • Overfitting is easy. The more you tweak rules to fit history, the worse they tend to do on new data. Always test on a second period you did not tune on.
  • Check the numbers. AI agents can still make mistakes. Read the strategy code and the trade list, not just the summary.
  • Model costs add up. Multi-agent runs make many calls. Set a spending limit on your API key.
  • Live trading is out of scope. The project supports broker connections. Its own disclaimer calls that capability experimental and not verified against a real broker account. We do not recommend using it.

Quick start

  1. 1Paste the Claude Code setup prompt, or install by hand with the Anthropic extra.
  2. 2Run the README's AAPL moving-average example to confirm it works.
  3. 3Describe your own idea in plain English and always ask for a second test period.
  4. 4Run the skeptical-reviewer prompt before you believe any result.

Now you just test an idea on history before you put a cent on it. Inside the Claude Code Club we share the agent setups and research workflows we actually run, and help each other get them working. It's nine dollars a month at https://www.skool.com/claudecodeclub/about. Everything on this page works without it.

Common questions

  • Is Vibe-Trading free?

    Yes. It is open source under the MIT license, and the free market-data sources need no keys. You pay only for the AI model you use, like Claude through your Anthropic API key, or nothing extra with a local Ollama model.

  • Is this financial advice?

    No. This page and the tool are for research and backtesting on past data. The project's own disclaimer says it is not investment advice and that past performance does not guarantee future results.

  • What do the agents actually do?

    In the Quant Strategy Desk preset, a Stock Screener and a Factor Researcher work in parallel, a Strategy Backtester builds the rules and runs a real backtest, a Risk Auditor checks drawdowns, tail risk and overfitting, and a Report Aggregator writes the final report.

  • Does Vibe-Trading work with Claude?

    Yes. Anthropic's Messages API is a supported provider. Install it with pip install "vibe-trading-ai[anthropic]" and set LANGCHAIN_PROVIDER=anthropic plus your model name and API key. It also has an MCP server you can add to Claude Code.

  • Can it place real trades?

    The project supports broker connections, but this guide does not cover them and we do not recommend it. The project itself calls broker trading experimental and not verified against a real broker account.

Want the agent setups we actually run?

Get the other 4 in the agent crew stack, plus 8,000+ members - $9/mo, cancel anytime.

Join the Club