vibe-trading
What it does
This skill sets up and explains the Vibe-Trading finance toolkit for an AI agent. It is for investors, analysts and students who want backtests, factor research and market data in one place.
When to use it
- βWhen you want to backtest a trading idea across stock, crypto or other markets.
- βWhen you want factor analysis, options pricing or finance research support.
- βWhen you want to connect a finance toolkit to your AI assistant through a tool setup.
Skill link
https://github.com/HKUDS/Vibe-Trading/blob/main/agent/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βHelp me set up the Vibe-Trading toolkit and backtest a simple moving-average idea on a few stocks.β
5 new skills a week. 1 minute to read.
How it works
The agent installs the toolkit and adds it to your AI tool's settings. Core research tools work without API keys for some markets, and other data sources need their own access. The agent then runs the backtest or analysis you ask for.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Vibe-Trading
Professional finance research toolkit with AI-powered backtesting (11 engines), multi-agent teams, 90 specialized skills, the Alpha Zoo (478 pre-built quantitative alphas across qlib158 / alpha101 / gtja191 / academic / fundamental with one-line CLI benchmarking), and the Shadow Account loop β extract your implicit trading rules from a journal, backtest them across Aθ‘/ζΈ―θ‘/ηΎθ‘/crypto, then see where they would have served you better.
Setup
pip install vibe-trading-ai
Package name vs commands: The PyPI package is
vibe-trading-ai. Once installed, you get:
Command Purpose vibe-tradingInteractive CLI / TUI vibe-trading serveLaunch FastAPI web server vibe-trading-mcpStart MCP server (for Claude Desktop, OpenClaw, Cursor, etc.)
Add to your agent's MCP config:
{
"mcpServers": {
"vibe-trading": {
"command": "vibe-trading-mcp"
}
}
}
API Key Requirements
Core research MCP tools work with zero API keys for HK/US/Canada/crypto. After pip install, backtesting, market data, factor analysis, options pricing, chart patterns, web search, document reading, trade journal analysis, shadow-account extraction/backtest/report, the Alpha Zoo (478 pre-built alphas), and all 90 skills are ready to use. IBKR tools require a local TWS / IB Gateway session; run_swarm requires an LLM key.
| Feature | Key needed | When |
|---|---|---|
| HK/US/Canada equities & crypto | None | Always free (yfinance / stooq / yahoo + OKX) |
| China A-share data | None | Free via akshare / baostock / tencent / sina / eastmoney fallback (TUSHARE_TOKEN optional for premium quality) |
| Premium US fundamentals/quotes | FINNHUB_API_KEY / ALPHAVANTAGE_API_KEY / TIINGO_API_KEY / FMP_API_KEY |
Only for optional-key providers (graceful fallback to free sources) |
Multi-agent swarm (run_swarm) |
OPENAI_API_KEY + LANGCHAIN_MODEL_NAME |
Swarm spawns internal LLM workers |
What You Can Do
Shadow Account β flagship loop
Feed a CSV broker export (εθ±ι‘Ί / δΈθ΄’ / ε―ι / generic), and the agent will:
analyze_trade_journalβ profile your behavior (holding period, win rate, disposition effect, chasing, overtrading, anchoring).extract_shadow_strategyβ distill 3-5 if-then rules that describe your profitable roundtrips.run_shadow_backtestβ backtest those rules across A/HK/US/crypto and compute delta-PnL vs your realized trades.render_shadow_reportβ produce an HTML/PDF report (8 sections + charts) with today's matching signals.scan_shadow_signalsβ list today's symbols that match your shadow's entry cadence (research only).
Backtesting
Create and run quantitative strategies across 11 engines (ChinaA, GlobalEquity, IndiaEquity, KoreaEquity, VietnamEquity, BrazilEquity, Crypto, ChinaFutures, GlobalFutures, Forex, cross-market Composite) plus an options portfolio engine, with 29 market-data sources (auto-detect + ordered fallback; the hosted forex tickerall source is explicit-only):
- HK/US equities via yfinance / stooq / yahoo (free, no API key); optionally via Longbridge historical OHLCV (
longbridge, requires the optional SDK andLONGBRIDGE_APP_KEY/LONGBRIDGE_APP_SECRET/LONGBRIDGE_ACCESS_TOKEN). To force it for a run, set"source": "longbridge"inconfig.json. - Canada equities (TSX/TSXV) via yahoo / yfinance using Yahoo's canonical
<TICKER>.TO(TSX, e.g.TD.TO) or<TICKER>.V(TSXV, e.g.PNG.V) suffixes β free, no API key. The GlobalEquity engine uses CAD identity, whole-share orders, configurable Canadian commission/slippage, and the TSX/TSXV price-increment grid. - India equities (NSE/BSE) via yahoo / yfinance using
<SYMBOL>.NS(NSE, e.g.RELIANCE.NS) or<SCRIP>.BO(BSE, e.g.500325.BO) β free, no API key. TheIndiaEquityEnginemodels T+1 delivery, no overnight shorts (setallow_shortfor intraday), configurable circuit bands, 1-share lots, and the STT/stamp-duty/exchange/GST cost stack. Optionally back-fill from your live broker via theindia_brokersource (Shoonya/Dhan; requires broker login). - Korea equities (KRX: KOSPI/KOSDAQ) via pykrx using
<CODE>.KS(KOSPI, e.g.005930.KS) or<CODE>.KQ(KOSDAQ, e.g.247540.KQ) β free, no API key (pip install "vibe-trading-ai[krx]"; yahoo/yfinance fallback needs no extra). pykrx serves daily bars only (an intraday request falls through to another sour
FAQ
Do I need API keys to use it?
Some core research tools work without keys for several markets, but certain data sources and brokerage tools need their own access.
What commands does it install?
A command-line interface, a web server launcher and an MCP server for AI tools such as Claude Desktop or Cursor.
Is it financial advice?
No. It is a research toolkit, and any results should be checked before you rely on them for decisions.
Details
Original description by the author
Professional finance research toolkit β backtesting (11 engines + benchmark comparison panel), factor analysis, Alpha Zoo (478 pre-built alphas across qlib158/alpha101/gtja191/academic/fundamental), options pricing, 90 finance skills, 30 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract β backtest β render) across 29 market-data sources (tushare, yfinance, okx, binance, akshare, baostock, tencent, mootdx, ccxt, futu, mt5, tickerall, local, eastmoney, sina, stooq, yahoo, pykrx, india_broker, qveris, longbridge, nobitex, wallex, plus optional-key finnhub/alphavantage/t
repo: HKUDS/Vibe-Trading
Popularity
- GitHub stars
- 37k
- Ranking position
- #7494
- License
- MIT
- Updated
- 11/1/2026
Comments
- β¦
More skills from this repository
adr-hshare
37kShows your agent how to compare the price of a Chinese company listed in several markets, such as a US ADR and a Hong Kong share.
akshare
37kLets your agent pull free market data for Chinese and global stocks, futures, forex and economic indicators, with no API key needed.
alpha-zoo
37kLets your agent browse a library of ready-made stock factors and test how well a whole set of them predicts returns on a chosen market.
asset-allocation
37kTeaches your agent portfolio allocation methods, such as mean-variance, Black-Litterman and risk budgeting, and how to apply them with the built-in optimizers.
Similar skills
gitcrawl
394kLets your agent search a saved archive of GitHub issues and pull requests, group duplicates, and check their current status on GitHub.
slacrawl
394kLets your agent search and count messages in a local Slack archive, check how fresh that archive is, and refresh it when needed.
goplaces
394kHelps your agent search for places, get their details and reviews, and resolve place names using Google Places, with JSON output for scripts.