llm_usage.json — provider/model, aggregate totals, and per-iteration counts — surfaced additively on /runs/{id}, so a finished run's token cost stays auditable after the live stream is gone (provider-reported only; no prompt/content capture, no price estimation) (#223, thanks @LemonCANDY42). The Run Detail page no longer loads every symbol's candlesticks up front: the default /runs/{id} response is unchanged, but the UI now renders the run summary first and loads each symbol's chart on demand through opt-in ?chart_payload=summary / ?chart_symbol= modes, with per-symbol loading state and a load-all-with-progress control (#225, thanks @LemonCANDY42). Two loader fixes close the cycle: yfinance's exclusive end boundary no longer drops the final requested trading day — the download now passes end + 1 day while cache keys keep the original range (#226, thanks @gyx09212214-prog) — and a malformed CCXT_TIMEOUT_MS / OKX_TIMEOUT_S value now warns and falls back to its default instead of raising at import and blocking startup (#227, thanks @gyx09212214-prog).vibe-trading resume <session-id> hint — so locating the trace for a finished run no longer means guessing which folder under agent/sessions/ is newest by timestamp. The new vibe-trading resume <session-id> subcommand reopens that exact session and replays its recent turns into the loop; an unknown id fails fast instead of silently starting a blank session (#218, thanks @zwrong).reached max iterations masking empty model responses (#203, thanks @mojianliang), the UI never recovering after a stall (#195, thanks @mafia23), and Kimi rejecting the client (#204, thanks @liao497) — shared one root: every OpenAI-compatible provider ran through a single shim that applied DeepSeek/Kimi/Gemini quirks globally and silently swallowed stream failures. Provider-specific behavior now lives in an explicit capability layer — reasoning capture/replay, Gemini thought signatures, the Kimi User-Agent, OpenRouter's reasoning body are each gated to their own provider instead of cross-contaminating. Reasoning-only streams show a live "Reasoning…" indicator instead of dead air; a stream failure raises a contextual provider_stream_error with one automatic retry for transient resets (deterministic 4xx fail fast) instead of silently falling back to a slow non-streaming call; an empty model response is reported as empty_model_response instead of "max iterations"; SSE heartbeats no longer break reconnect replay; and a stuck read-only tool times out instead of hiding behind heartbeats forever. A new vibe-trading provider doctor prints a redacted provider/model/package/proxy snapshot for one-command triage of environment-side hangs. DeepSeek users can opt into the official native adapter with pip install "vibe-trading-ai[deepseek]", and kimi-k2.x's temperature=1 requirement is applied automatically — the Kimi path is verified end-to-end against the live API (tool calls + strict multi-turn reasoning replay on kimi-k2.6).NaN into non-strict JSON, and a context-free continuation prompt re-routed to the wrong preset (#198, thanks @BillDin for an exceptional diagnosis plus both fixes). Swarm workers now get a local get_market_data tool backed by the same normalized loader registry as MCP — strict JSON, non-finite floats serialize as null — wired into every market-data preset (21 workers across 13 presets) with a prompt policy that steers OHLCV work tool-first (#199); run_swarm takes an explicit preset_name and refuses ambiguous continuation fragments instead of silently falling back to equity_research_team (#200). Grounding got smarter too: a bare US ticker like NVDA in a swarm prompt is promoted to NVDA.US (stopword-guarded), so workers start from authoritative pre-fetched prices. The tool joins the main agent registry as well — 48 tools now. Also: your Docker data now survives updates — persistent memory, the session search index, user-created skills, shadow accounts and broker config live in named volumes, so docker compose up --build no longer wipes them (#197, thanks @FlyerJ).localhost is the container itself, so the shipped OLLAMA_BASE_URL=http://localhost:11434 failed the LLM preflight for every Dockerized Ollama setup. docker-compose.yml now defaults to http://host.docker.internal:11434 (export OLLAMA_BASE_URL to point elsewhere) and adds the host-gateway extra_hosts mapping so the same file works on Linux as well as Docker Desktop (#196, thanks @ShahNewazKhan).API_AUTH_KEY set returned 403 on every sensitive endpoint — sending a message, listing sessions, live status — but the chat only showed a generic "Failed to send message, please retry." The send path now surfaces the real reason — "Remote API access requires an API key. Add it in Settings, or run the backend on localhost for local-only use." — and the README's web-UI setup spells out the localhost-vs-LAN rule plus the three fixes (browse via localhost on the same machine; set API_AUTH_KEY and enter it once in Settings; or VIBE_TRADING_TRUST_DOCKER_LOOPBACK=1 for Docker Desktop's host gateway) (#191, thanks @mafia23).thought_signature before the request was built — so multi-turn tool calling still 400'd with missing thought_signature. It is now re-attached at the single _convert_input chokepoint both invoke and stream pass through (parallel calls, where only the first of N is signed, included) (#184, thanks @ngoanpv)./swarm/runs API, and a finished card rehydrates from the final run_swarm result on reconnect or history replay (#188, thanks @BillDin). Preset routing also got sharper: an explicitly named preset (e.g. investment_committee, with or without underscores) now wins over keyword scoring, and the bare IV derivatives keyword no longer false-matches inside ordinary words like "given" (#189, thanks @BillDin).alpha compare benches a hand-picked shortlist of Alpha Zoo alphas against each other on a universe and period, then ranks them by IC mean/std, IR, IC-positive ratio or sample count — each with its gap to the leader. Unlike a full-zoo bench it evaluates only the alphas you name (a new run_bench(only=…) subset filter), so comparing three alphas no longer scores all 191 in their zoo. One shared core powers every surface: vibe-trading alpha compare <id1> <id2> … --sort ir (CLI), a Compare view in the Alpha Zoo Web UI (tick alphas in the catalogue → one-click compare with a streamed ranking table), POST /alpha/compare + SSE (REST), and a read-only alpha_compare agent tool (47 tools now).place_order / cancel_order hard-refuse any non-paper config at the first line (the rule: a broker with no structural paper/live guard is capped at paper + read-only) (#181, closes #174). This cycle also fixes Gemini 2.5 / 3.x thinking models: their per-tool-call thoughtSignature now round-trips through the OpenAI-compatible path, so multi-turn function calling no longer fails with INVALID_ARGUMENT (#176, closes #170, thanks @mvanhorn & @jliu6789). Chinese docstrings landed on all 452 Alpha Zoo factors (#180, thanks @LeeCQiang), and a frontend test suite (197 vitest tests) plus backend auth / path-traversal / CORS security tests joined CI (#175, thanks @sambazhu).VIBE_TRADING_DATA_CACHE switch lets every backtest loader — tushare, okx, ccxt, akshare, mootdx, yfinance, futu — cache settled historical bars under ~/.vibe-trading/cache (user home, never the repo), so repeated and long-horizon / cross-market backtests skip the network and avoid provider rate limits. Off by default. Batch and connection loaders (yfinance, futu) skip the bulk download / FutuOpenD connection entirely on a full cache hit, a staleness guard never caches a range ending today (its last bar is still forming), and cached frames round-trip byte-identical to freshly fetched ones (#177, thanks @mvanhorn). A new contributor guide for AI / automation-assisted PRs also landed, mapping safe local checks and high-risk broker/MCP/credential surfaces (#173).call_id, so a tool_result can be matched back to its tool_call when replaying a run trace — arg previews stay truncated to keep trace files small (#168, thanks @zwrong). Source comments no longer point at an internal-only docs path that external contributors couldn't find (#166, thanks @jaleelpersonal). Also clarified that the langchain-community resolver warning on install is a harmless leftover-package notice, not a failure (#167), and scoped Gemini 2.5/3.0 thoughtSignature round-tripping for function calls as a help wanted task with a full fix plan (#170, thanks @jliu6789).trading_place_order / trading_cancel_order tools; HK and A-share asset classes added to the mandate universe. Experimental / use at your own risk.pip install -U vibe-trading-ai): Rolls up everything since 0.1.8. Connector-first broker profiles (IBKR local read-only TWS / IB Gateway + Robinhood Agentic Trading behind OAuth, a committed mandate, order guard, audit ledger, and instant halt). Research Goal runtime across CLI / REST / MCP / Web. A swarm pass — live reconcile + MCP keepalive, operator-configured worker MCP tools, a strict alpha-bench random control, and a new retry_run to relaunch failed/stale runs (36 MCP tools now). The agent/cli/ package refactor with a refreshed terminal UI, the mootdx no-token A-share loader, and a robustness pass across backtest / agent loop / sessions. --version now always matches the installed package, fixing the 0.1.8 drift (#156).vibe-trading connector list/use/check/account/positions/orders/quote/history and the MCP trading_* tools share the same selected profile, where paper/live is an attribute of the connector. IBKR can be used immediately through a local read-only TWS / IB Gateway profile, while the official IBKR remote MCP path is seeded as an OAuth mcp.read probe until stable read tool names are available. Robinhood Agentic Trading remains the bounded live MCP connector behind OAuth, a committed mandate, order guard, audit ledger, and instant halt.generate(), non-defaulted __init__ args, and wrong return types with actionable JSON errors instead of raw tracebacks (#149); a follow-up routes source-level AST validation errors through the same clean JSON envelope. The agent loop no longer burns all 50 iterations into a failed status with no output — it mirrors the swarm worker's wrap-up nudge at 80% of the iteration budget and drops tool definitions on the last iteration to force a final text answer (#148), guarded to fire only mid-run so it never displaces research-goal context. Session message writes now flush + fsync each append so expensive AI responses survive a mid-write crash, and the read path skips corrupted JSONL lines (logging the first 200 chars for recovery) instead of 500-ing the whole /messages endpoint (#147). The Web composer also fixes IME Enter handling so a composition-confirming Enter no longer submits mid-word (#146).run_bench_strict() adds a same-universe random control + OOS split to catch factors that just track market beta (#143, thanks @Soli22de). Swarm workers can call operator-configured external MCP servers, with trust boundary pinned (#142, thanks @shadowinlife).mootdx loader speaks the native 通达信 TCP protocol for A-share OHLCV (no auth, no IP rate-limit, daily + intraday with 25-page walk-back pagination), slotting between tushare and akshare in the fallback chain (#107). CCXT loader now reads HTTP_PROXY/HTTPS_PROXY/ALL_PROXY so Binance/OKX public data works from restricted networks (#126, thanks @ruok808). Final-answer rendering also dropped the ugly full-width --- horizontal separators on CLI and Web: the system prompt now nudges the agent toward markdown tables and ## headings, the CLI renderer strips standalone HRs as defense-in-depth, and the chat bubble hides any <hr> that slips through (#139, thanks @sdwxm188).+ menu instead of floating panels. Active context appears above the input as compact chips, and goal details expand inline only when needed. The UI also drops the old custom i18n layer in favor of direct English copy, gates Full Report cards to report-worthy runs, and hardens local dev startup/status reporting for reliable browser smoke tests./goal gives the CLI a direct entry point; REST/MCP expose goal snapshots and evidence writes; SSE keeps chat clients fresh. Follow-up audit fixes locked down verified evidence, blocked live-trading risk tiers through agent tools, wired CLI-created goals into later turns, cleaned goal ledgers on session deletion, enabled replay-all, and fixed cross-session frontend races.running snapshots. run_swarm sends MCP progress heartbeats while it polls, with a fixed first frame of swarm_started run_id=<id> for clients that reconnect after transport drops; workers now heartbeat through LLM streaming, grounding fetches, and tool execution. The stale-run reaper uses per-run thresholds and derives terminal status from task states, SwarmTool no longer cancels a still-running team just because its wait budget elapsed, and MCP clients can call reap_stale_runs() for explicit cleanup. Today's DX pass also refreshed provider default models and aligned CI syntax checks with the new agent/cli/ package. 22 new regressions cover hydration, terminal recovery, stale reaping, keepalive cadence, env parsing, and heartbeat wiring; the full swarm/MCP suite is at 169 passed, 4 skipped.agent/cli.py (3216 LOC) split into the agent/cli/ package — interactive front door, slash router, Rich components, plus a _legacy.py shim that preserves every subcommand and re-exports every public symbol so cli.cmd_* / cli._INIT_ENV_PATH / cli.Confirm keep working. New FastAPI middleware serves the SPA shell when a browser opens /runs/{id} or /correlation directly; same narrowing landed in the Vite dev proxy. Version unified via cli/_version.py (no more drift between --version and the banner), python -m cli restored via __main__.py, and the chat-gate narrowed so chat --help / chat extra reach legacy argparse instead of being swallowed by the REPL.vibe-trading hypothesis list prints a Rich table or JSON (--status filter, --limit); show <id> renders a detail panel including linked run cards; invalidate <id> --note "..." flips status to rejected while preserving prior invalidation notes when --note is omitted. Honors the existing VIBE_TRADING_HYPOTHESES_PATH env override and adds a per-invocation --path. 22 new tests cover wiring, JSON output, status filter, limit, missing-id errors, and note persistence.run_backtest shows phase markers (validate / simulate / finalize), read_document ticks per page on PDF or per sheet on Excel, read_url marks fetch / parse. The CLI Rich Live dashboard renders a Unicode spinner, ASCII progress bar, ETA, and stacks up to 3 parallel tools keyed by name; the frontend chat ships a new ToolProgressIndicator with rAF-coalesced renders, ARIA role="status" + hidden native <progress> for screen readers, and a determinate ProgressRing SVG when total is known. First Ctrl+C during a CLI run now calls agent.cancel() for graceful exit (current step finishes, trace closes cleanly); a second within 2s force-quits. Reusable primitives extracted along the way: ProgressBar.tsx and lib/tools.ts (shared tool-name i18n).CompositeEngine no longer misroutes bare Chinese-futures codes like RB2410 to GlobalFuturesEngine — _is_china_futures moved into a shared _market_hooks module with a case-normalized product table and a non-CN exchange guard, plus 9 new regression cases. Session FTS5 indexes now persist timestamps so cross-session search can sort by date; the same path also fixed a re-upsert that was wall-clocking every session's started_at. The Vite dev-mode proxy gained the missing /alpha entry so the AlphaZoo page resolves on npm run dev. tests/test_e2e_harness_v2.py (real-LLM e2e suite) is now gated behind VIBE_TRADING_RUN_LIVE_E2E=1 so CI no longer changes shape based on env-key presence. Ruff per-file-ignores added for the factor zoo (3783 → 0 F401 noise), frontend tsconfig enables noUnusedLocals / noUnusedParameters as regression guards, and 76 unused vw = vwap(...) boilerplate lines were dropped from gtja191 alphas. Net -918 LOC.qlib158 (Microsoft Qlib, Apache-2 attribution), alpha101 (Kakushadze 101 Formulaic Alphas, paper rewrite from arXiv:1601.00991), gtja191 (Guotai Junan 2014 short-horizon factor report), and academic (Fama-French 5 + Carhart price-based proxies). One-line CLI to bench any zoo on your universe: vibe-trading alpha bench --zoo gtja191 --universe csi300 --period 2018-2025. Ships with AST purity gate, lookahead-guard test, pytest-socket network kill-switch, per-zoo LICENSE.md, and a Developer Certificate of Origin (DCO) workflow for community PRs. Auto-rendered Alpha Library at vibetrading.wiki/alpha-library/ + research-lab post Which of the 191 GTJA alphas still work in 2026?.create_hypothesis, update_hypothesis, link_backtest, and search_hypotheses; external-content readers now attach warning-only security_warnings; and Shadow Account scanning now uses deterministic OHLCV feature evaluation instead of the old calendar-phase stub.run_card.json work landed on 2026-05-12. PersistentMemory.add() was also hardened on length, empty/whitespace-only names, and C0/C1 control bytes from the #108/#109/#110 triage (#112, thanks @Teerapat-Vatpitak).vibe-trading memory list/show/search/forget (#102, thanks @Teerapat-Vatpitak), and memory tokenization/slugs now support Thai, Arabic, Hebrew, and Cyrillic text (#104).run_card.json and run_card.md alongside artifacts for reproducible research runs.mcp_wiring_test match natural-language queries like "mcp wiring" (#87, thanks @hp083625). The MCP server has a subprocess smoke test covering initialize → tools/list → tools/call to guard the first-call deadlock path (#86), while low-risk hardening landed for Windows path-sensitive tests, API best-effort exception handling, backtest run_dir allowed-root validation, and SwarmRun provider/model metadata (#88, #90, #91, #92, thanks @Teerapat-Vatpitak).tools/call, avoiding a first-call deadlock in lazy tool discovery (#85, thanks @Teerapat-Vatpitak). The Vite dev proxy also honors VITE_API_URL for non-default backend targets (#82, thanks @voidborne-d).fundamental_fields, so signal engines can screen on income_total_revenue, income_n_income, balancesheet_total_hldr_eqy_exc_min_int, fina_indicator_roe, and similar table-prefixed columns after their announcement/disclosure dates (#76, thanks @mrbob-git). Follow-up hardening makes explicit statement-field requests fail fast if Tushare enrichment cannot run, instead of silently falling back to raw price bars (#77).TushareFundamentalProvider contract for fundamental research workflows, with regression coverage for the project TUSHARE_TOKEN environment path (#74). Community triage also clarified that Vibe-Trading keeps rapid iteration focused on one UI language for now, avoids adding redundant search dependencies while DuckDuckGo-backed web_search is already bundled, and treats unofficial hosted deployments as untrusted places for API keys or data-source tokens.pip install -U vibe-trading-ai): Security-boundary hardening is now published on PyPI and ClawHub, covering safer API/read/upload/file/URL/generated-code/shell-tool/Docker defaults while keeping localhost CLI/Web UI workflows low-friction. This cycle also includes Web UI Settings, correlation heatmap, OpenAI Codex OAuth, A-share pre-ST filtering, interactive CLI UX, swarm preset inspection, dividend analysis, dev workflow polish, and audited frontend build-dependency floors. Thanks to the 0.1.7 contributors and to lemi9090 (S2W) for coordinated security validation.API_AUTH_KEY and explicit trusted origins.prompt_toolkit (#69). The CLI still falls back to Rich prompts when prompt_toolkit or a TTY is unavailable. CI path expectations were also aligned with the hardened file-import sandbox and cross-platform /tmp resolution, returning main to green (bb67dc7).API_AUTH_KEY.dividend-analysis skill for income stocks, payout sustainability, dividend growth, shareholder yield, ex-dividend mechanics, and yield-trap checks, pinned by bundled-skill regression tests. The public roadmap now focuses on upcoming work: Research Autopilot, Data Bridge, Options Lab, Portfolio Studio, Alpha Zoo, Research Delivery, Trust Layer, and Community sharing.vibe-trading provider login openai-codex, with Settings metadata and adapter regression tests (#65). Added and hardened the ashare-pre-st-filter skill for A-share ST/*ST risk screening, including Sina penalty relevance filtering so securities-account mentions do not inflate E2 counts (#63).python -m backtest.validation <run_dir> so missing, blank, malformed, non-existent, and non-directory inputs fail with clear operator-facing messages before validation starts (#60).pip install -U vibe-trading-ai): Fixes vibe-trading --swarm-presets returning empty after pip install / uv tool install (#55) — preset YAMLs now bundled inside the src.swarm package and pinned by a 6-test regression suite. Plus AKShare loader correctly routes ETFs (510300.SH) and forex (USDCNH) to the right endpoints with hardened registry fallback. Rolls up everything since v0.1.5: benchmark comparison panel, /upload streaming + size limits, Futu loader (HK + A-share), vnpy export skill, security hardening, frontend lazy loading (688KB → 262KB)./upload streams the request body in 1 MB chunks and aborts past MAX_UPLOAD_SIZE, bounding memory under oversized/malformed clients (#53) — pinned by a 4-case regression suite.safe_path + journal/shadow tool sandbox, MANIFEST.in ships .env.example / tests / Docker files in sdist, route-level lazy loading shrinks frontend initial bundle 688KB → 262KB. Plus Futu data loader for HK & A-share equities (#47) and vnpy CtaTemplate export skill (#46).run_dir normalized to active run dir (#43). README usage examples (#45).reasoning_content preserved across all ChatOpenAI paths — Kimi / DeepSeek / Qwen thinking work end-to-end (#39). Swarm streaming + clean Ctrl+C (#42).python-multipart CVE floor bump, 5 new MCP tools wired (analyze_trade_journal + 4 shadow-account tools), pattern_recognition → pattern registry fix, Docker dep parity, SKILL manifest synced (22 MCP tools / 71 skills).read_document now dispatches PDF, Word, Excel, PowerPoint, images (OCR), and 40+ text formats behind one unified call.Connection closed error on stdio transport (#32).CompositeEngine backtests mixed-market portfolios (e.g. A-shares + crypto) with shared capital pool and per-market rules. Also fixed swarm template variable fallback and frontend timeout./pine exports strategies to TradingView (Pine Script v6), TDX (通达信/同花顺/东方财富), and MetaTrader 5 (MQL5) in one command.vibe-trading init .env bootstrap (#19), preflight checks, runtime data-source fallback, hardened backtest engine. Multi-language README (#21).web_search MCP tool, 12 LLM providers, akshare/ccxt deps. Published to PyPI and ClawHub.Vibe-Trading is an open-source research workspace for turning finance questions into runnable analysis. It connects natural-language prompts to market-data loaders, strategy generation, backtest engines, reports, exports, and persistent research memory.
It is designed for research, simulation, and backtesting — and, when you choose, autonomous trading through a broker you authorize yourself (e.g. Robinhood Agentic Trading). It holds no funds and never trades outside the limits you set, and you can halt it instantly.
| Task | Output |
|---|---|
| Ask a trading question | Market research with tools, data, documents, and reusable session context. |
| Backtest a strategy idea | Strategy code, metrics, benchmark context, validation artifacts, and run cards. |
| Review your own trades | Broker-journal parsing, behavior diagnostics, rule extraction, and Shadow Account comparisons. |
| Improve repeated research | Persistent memory and editable skills turn useful routines into reusable workflows. |
| Run analyst teams | Multi-agent research reviews for investment, quant, crypto, macro, and risk workflows. |
| Ship usable artifacts | Reports, TradingView Pine Script, TDX, MetaTrader 5, MCP tools, and later research sessions. |
| Bench a pre-built alpha zoo | One-line IC + alive/reversed/dead categorisation across 452 alphas (Qlib 158 + Kakushadze 101 + GTJA 191 + FF5 + Carhart) on your universe. |
pip install vibe-trading-ai
# Natural-language research
vibe-trading run -p "Backtest a BTC-USDT 20/50 moving-average strategy for 2024, summarize return and drawdown, then export the report"
# Bench a pre-built alpha zoo (one line)
vibe-trading alpha bench --zoo gtja191 --universe csi300 --period 2018-2025 --top 20vibe-trading --upload trades_export.csv
vibe-trading run -p "Analyze my trading behavior, extract my shadow strategy, and compare it with my actual trades"Shadow Account starts from your own trading records instead of a generic strategy template.
Upload a broker export, let the agent summarize your behavior, then compare the actual trading path with a rule-based shadow strategy.
| Step | Agent output |
|---|---|
| 1. Read your journal | Parses broker exports from 同花顺, 东方财富, 富途, and generic CSV formats. |
| 2. Profile your behavior | Holding days, win rate, PnL ratio, drawdown, disposition effect, overtrading, momentum chasing, and anchoring checks. |
| 3. Extract your rules | Turns recurring entries/exits into an explicit strategy profile instead of a hand-wavy summary. |
| 4. Run the shadow | Backtests the extracted rules and highlights rule breaks, early exits, missed signals, and alternative trade paths. |
| 5. Deliver the report | Produces an HTML/PDF report that can be inspected, archived, or refined in a later session. |
vibe-trading --upload trades_export.csv
vibe-trading run -p "Analyze my trading behavior, extract my shadow strategy, and compare it with my actual trades"Most runs follow the same evidence path: route the request, load the right market context, execute tools, validate outputs, and keep the artifacts inspectable.
| Layer | What happens |
|---|---|
| Plan | Selects the relevant finance skills, tools, data sources, and swarm preset when useful. |
| Ground | Pulls A-shares, HK/US equities, crypto, futures, forex, documents, or web context through the available loaders. |
| Execute | Generates testable strategy code, runs tools, and uses the matching backtest engine or analysis workflow. |
| Validate | Adds metrics, benchmark comparison, Monte Carlo, Bootstrap, Walk-Forward, run cards, and warnings where applicable. |
| Deliver | Returns reports, artifacts, tool traces, and exports for TradingView, TDX, MetaTrader 5, MCP clients, or later sessions. |
Detailed inventories are folded below to keep the main README scannable. Open them when you want to inspect the available building blocks.
<details> <summary><b>Finance Skill Library</b> <sub>77 skills across 8 categories</sub></summary>| Category | Skills | Examples |
|---|---|---|
| Data Source | 7 | data-routing, tushare, yfinance, okx-market, akshare, mootdx, ccxt |
| Strategy | 17 | strategy-generate, cross-market-strategy, technical-basic, candlestick, ichimoku, elliott-wave, smc, multi-factor, ml-strategy |
| Analysis | 17 | factor-research, macro-analysis, global-macro, valuation-model, earnings-forecast, credit-analysis, dividend-analysis |
| Asset Class | 9 | options-strategy, options-advanced, convertible-bond, etf-analysis, asset-allocation, sector-rotation |
| Crypto | 7 | perp-funding-basis, liquidation-heatmap, stablecoin-flow, defi-yield, onchain-analysis |
| Flow | 7 | hk-connect-flow, us-etf-flow, edgar-sec-filings, financial-statement, adr-hshare |
| Tool | 11 | backtest-diagnose, report-generate, pine-script, doc-reader, web-reader, vnpy-export, alpha-zoo |
| Risk Analysis | 1 | ashare-pre-st-filter |
Need a market or vendor we don't ship a loader for? Add your own historical-bar
loader and select it with source="<name>". The steps edit package source, so
run from a clone (pip install -e .).
agent/backtest/loaders/<name>_loader.py with aDataLoaderProtocol (duck-typed, no base class needed)@register:import pandas as pd
from backtest.loaders.registry import register
@register
class DataLoader:
name = "mysource" # the value you pass as source=
markets = {"us_equity"} # a_share/us_equity/hk_equity/crypto/futures/fund/macro/forex
requires_auth = False
def is_available(self) -> bool:
return True # token present? network reachable?
def fetch(self, codes, start_date, end_date, *, interval="1D", fields=None):
# return {symbol: DataFrame indexed by trade_date,
# columns: open, high, low, close, volume}
...@register fires — add"backtest.loaders.<name>_loader" to _loader_modules inagent/backtest/loaders/registry.py."mysource" to_VALID_SOURCES in agent/backtest/runner.py.FALLBACK_CHAINS in registry.py sosource="auto" can reach it.source="mysource" in a backtest config, or via the CLI / agent.</details> <details> <summary><b>Preset Trading Teams</b> <sub>29 swarm presets</sub></summary>Real-time ticks / order-book depth are out of scope for loaders — the
loader layer is point-in-time historical bars only. Live market data flows
through the broker connectors instead:okx/binance/ccxtfor crypto,futu/tigerfor equities.
| Preset | Workflow |
|---|---|
investment_committee | Bull/bear debate → risk review → PM final call |
global_equities_desk | A-share + HK/US + crypto researcher → global strategist |
crypto_trading_desk | Funding/basis + liquidation + flow → risk manager |
earnings_research_desk | Fundamental + revision + options → earnings strategist |
macro_rates_fx_desk | Rates + FX + commodity → macro PM |
quant_strategy_desk | Screening + factor research → backtest → risk audit |
technical_analysis_panel | Classic TA + Ichimoku + harmonic + Elliott + SMC → consensus |
risk_committee | Drawdown + tail risk + regime review → sign-off |
global_allocation_committee | A-shares + crypto + HK/US → cross-market allocation |
<sub>Plus 20+ additional specialist presets — run vibe-trading --swarm-presets to explore all.
</sub> </details> <details> <summary><b>Alpha Zoo</b> <sub>452 pre-built quant alphas across 4 zoos</sub></summary>pytest-socket network kill-switchLICENSE.md declaring formulas as mathematical content| Zoo | Count | Source | License |
|---|---|---|---|
| qlib158 | 154 | Microsoft Qlib Alpha158 (Apache-2.0, commit-pinned) | Apache-2.0 |
| alpha101 | 101 | Kakushadze (2015), "101 Formulaic Alphas", arXiv:1601.00991 | Formulas are mathematical content |
| gtja191 | 191 | Guotai Junan (2014), "191 Short-period Trading Alpha Factors" | Formulas are mathematical content |
| academic | 6 | Fama-French 5 + Carhart momentum (price-based proxies) | Public academic literature |
Run vibe-trading alpha list to browse, vibe-trading alpha show <id> for formulas + source, vibe-trading alpha bench --zoo X --universe Y --period Z to score a whole zoo.
https://github.com/user-attachments/assets/4e4dcb80-7358-4b9a-92f0-1e29612e6e86
</td> <td width="50%">https://github.com/user-attachments/assets/3754a414-c3ee-464f-b1e8-78e1a74fbd30
</td> </tr> <tr> <td colspan="2" align="center"><sub>☝️ Natural-language backtest & multi-agent swarm debate — Web UI + CLI</sub></td> </tr> </table> </div>pip install vibe-trading-aiThen run a first research task:
vibe-trading init
vibe-trading run -p "Backtest a BTC-USDT 20/50 moving-average strategy for 2024 and summarize return and drawdown"Package name vs commands: The PyPI package is
vibe-trading-ai. Once installed, you get three commands:
Command Purpose vibe-tradingInteractive CLI / TUI vibe-trading serveLaunch FastAPI web server vibe-trading-mcpStart MCP server (for Claude Desktop, OpenClaw, Cursor, etc.)
vibe-trading init # interactive .env setup
vibe-trading # launch CLI
vibe-trading serve --port 8899 # launch web UI
vibe-trading-mcp # start MCP server (stdio)| Path | Best for | Time |
|---|---|---|
| A. Docker | Try it now, zero local setup | 2 min |
| B. Local install | Development, full CLI access | 5 min |
| C. MCP plugin | Plug into your existing agent | 3 min |
| D. ClawHub | One command, no cloning | 1 min |
LANGCHAIN_PROVIDER=openai-codex, then run vibe-trading provider login openai-codex. This does not use OPENAI_API_KEY.Supported LLM providers: OpenRouter, OpenAI, DeepSeek, Gemini, Groq, DashScope/Qwen, Zhipu, Moonshot/Kimi, MiniMax, Xiaomi MIMO, Z.ai, Ollama (local). See
.env.examplefor config.
Tip: All markets work without any API keys thanks to automatic fallback. yfinance (HK/US), OKX (crypto), mootdx (A-shares, TCP-direct, no IP throttle), and AKShare (A-shares, US, HK, futures, forex) are all free. Tushare token is optional — mootdx is the preferred no-token A-share fallback, with AKShare as a broader backup.
git clone https://github.com/HKUDS/Vibe-Trading.git
cd Vibe-Trading
cp agent/.env.example agent/.env
# Edit agent/.env — uncomment your LLM provider and set API key
docker compose up --buildOpen http://localhost:8899. Backend + frontend in one container.
Docker publishes the backend on 127.0.0.1:8899 by default and runs the app as a non-root container user. If you intentionally expose the API beyond your own machine, set a strong API_AUTH_KEY and send Authorization: Bearer <key> from clients.
[!NOTE]
Using Ollama with Docker: the container reaches a host-side Ollama viahost.docker.internal, notlocalhost(inside the containerlocalhostis the container itself).docker-compose.ymldefaultsOLLAMA_BASE_URLtohttp://host.docker.internal:11434; exportOLLAMA_BASE_URL(or set it in a top-level.env) to point elsewhere. This relies on thehost-gatewaymapping inextra_hosts, which requires Docker Engine ≥ 20.10 / Compose v2 (provided automatically on Docker Desktop).
Your data survives updates: persistent memory, the cross-session search index, user-created skills, shadow accounts, broker connector config, web sessions, backtest runs, swarm history, and uploads all live in named Docker volumes, so git pull && docker compose up --build keeps them. They are deleted only by docker compose down -v.
git clone https://github.com/HKUDS/Vibe-Trading.git
cd Vibe-Trading
python -m venv .venv
# Activate
source .venv/bin/activate # Linux / macOS
# .venv\Scripts\Activate.ps1 # Windows PowerShell
pip install -e .
cp agent/.env.example agent/.env # Edit — set your LLM provider API key
vibe-trading # Launch interactive TUI<details>
<summary><b>Start web UI (optional)</b></summary>
# Terminal 1: API server
vibe-trading serve --port 8899
# Terminal 2: Frontend dev server
cd frontend && npm install && npm run devOpen http://localhost:5899. The frontend proxies API calls to localhost:8899.
Production mode (single server):
cd frontend && npm run build && cd ..
vibe-trading serve --port 8899 # FastAPI serves dist/ as static files</details>[!NOTE]
vibe-trading servebinds0.0.0.0and is loopback-only by default: opening the UI on the same machine (http://localhost:8899) works with zero config. If you browse from another machine, a VM host, or a phone on your LAN, sensitive endpoints return403and the chat shows "Remote API access requires an API key" — set a strongAPI_AUTH_KEYinagent/.env, restart, and enter the same key once in Settings. (Docker Desktop's host gateway: setVIBE_TRADING_TRUST_DOCKER_LOOPBACK=1with the default127.0.0.1port bind.)
See MCP Plugin section below.
npx clawhub@latest install vibe-trading --forceThe skill + MCP config is downloaded into your agent's skills directory. See ClawHub install for details.
Copy agent/.env.example to agent/.env and uncomment the provider block you want. Each provider needs 3-4 variables:
| Variable | Required | Description |
|---|---|---|
LANGCHAIN_PROVIDER | Yes | Provider name (openrouter, deepseek, groq, ollama, etc.) |
<PROVIDER>_API_KEY | Yes* | API key (OPENROUTER_API_KEY, DEEPSEEK_API_KEY, etc.) |
<PROVIDER>_BASE_URL | Yes | API endpoint URL |
LANGCHAIN_MODEL_NAME | Yes | Model name (e.g. deepseek-v4-pro) |
TUSHARE_TOKEN | No | Tushare Pro token for A-share data (falls back to AKShare) |
TIMEOUT_SECONDS | No | LLM call timeout, default 120s |
API_AUTH_KEY | Recommended for network deployments | Bearer token required when the API is reachable from non-local clients |
VIBE_TRADING_ENABLE_SHELL_TOOLS | No | Explicit opt-in for shell-capable tools in remote API/MCP-SSE style deployments |
VIBE_TRADING_ALLOWED_FILE_ROOTS | No | Extra comma-separated roots for document and broker-journal imports |
VIBE_TRADING_ALLOWED_RUN_ROOTS | No | Extra comma-separated roots for generated-code run directories |
<sub>* Ollama does not require an API key. OpenAI Codex uses ChatGPT OAuth and stores tokens via oauth-cli-kit, not in agent/.env.</sub>
Free data (no key needed): A-shares via AKShare, HK/US equities via yfinance, crypto via OKX, 100+ crypto exchanges via CCXT. The system automatically selects the best available source for each market.
Vibe-Trading is a tool-heavy agent — skills, backtests, memory, and swarms all flow through tool calls. Model choice directly decides whether the agent uses its tools or fabricates answers from training data.
| Tier | Examples | When to use |
|---|---|---|
| Best | anthropic/claude-opus-4.7, anthropic/claude-sonnet-4.6, openai/gpt-5.5-pro, google/gemini-3.5-flash | Complex swarms (3+ agents), long research sessions, paper-grade analysis |
| Sweet spot (default) | deepseek-v4-pro, deepseek/deepseek-v4-pro, x-ai/grok-4.20, z-ai/glm-5.1, moonshotai/kimi-k2.6, qwen/qwen3-max-thinking | Daily driver — reliable tool-calling at ~1/10 the cost |
| Avoid for agent use | *-nano, *-flash-lite, *-coder-next, small / distilled variants | Tool-calling is unreliable — the agent will appear to "answer from memory" instead of loading skills or running backtests |
The default agent/.env.example ships with DeepSeek official API + deepseek-v4-pro; OpenRouter users can use deepseek/deepseek-v4-pro.
The interactive TUI (vibe-trading) now uses a terminal-native transcript: a startup banner, prompt rule, previous-turn recap, live activity rail, Markdown/table rendering, and run timing all stay in the CLI. Non-interactive invocations such as vibe-trading run, pipes, and --json remain script-friendly.
vibe-trading # interactive TUI
vibe-trading run -p "..." # single run
vibe-trading serve # API server
vibe-trading alpha list # browse 452 pre-built alphas; show / bench / compare / export-manifest sub-commands available
vibe-trading provider doctor # print redacted provider/proxy/package diagnostics<details>
<summary><b>Slash commands inside TUI</b></summary>
| Command | Description |
|---|---|
/help | Show all commands |
/skills | List all 77 finance skills |
/swarm | List 29 swarm team presets |
/swarm run <preset> [vars_json] | Run a swarm team with live streaming |
/swarm list | Swarm run history |
/swarm show <run_id> | Swarm run details |
/swarm cancel <run_id> | Cancel a running swarm |
/list | Recent runs |
/show <run_id> | Run details + metrics |
/code <run_id> | Generated strategy code |
/pine <run_id> | Export indicators (TradingView + TDX + MT5) |
/trace <run_id> | Full execution replay |
/continue <run_id> <prompt> | Continue a run with new instructions |
/sessions | List chat sessions |
/settings | Show runtime config |
/clear | Clear screen |
/quit | Exit |
vibe-trading run -p "Backtest BTC-USDT MACD strategy, last 30 days"
vibe-trading run -p "Analyze AAPL momentum" --json
vibe-trading run -f strategy.txt
echo "Backtest 000001.SZ RSI" | vibe-trading runvibe-trading -p "your prompt"
vibe-trading --skills
vibe-trading --swarm-presets
vibe-trading --swarm-run investment_committee '{"topic":"BTC outlook"}'
vibe-trading --list
vibe-trading --show <run_id>
vibe-trading --code <run_id>
vibe-trading --pine <run_id> # Export indicators (TradingView + TDX + MT5)
vibe-trading --trace <run_id>
vibe-trading --continue <run_id> "refine the strategy"
vibe-trading --upload report.pdfvibe-trading alpha list --zoo gtja191 --limit 10
vibe-trading alpha show gtja191_171
vibe-trading alpha bench --zoo gtja191 --universe csi300 --period 2018-2025 --top 20</details>
# Moving average crossover on US equities
vibe-trading run -p "Backtest a 20/50-day moving average crossover on AAPL for the past year, show Sharpe ratio and max drawdown"
# RSI mean-reversion on crypto
vibe-trading run -p "Test RSI(14) mean-reversion on BTC-USDT: buy below 30, sell above 70, last 6 months"
# Multi-factor strategy on A-shares
vibe-trading run -p "Backtest a momentum + value + quality multi-factor strategy on CSI 300 constituents over 2 years"
# After backtesting, export to TradingView / TDX / MetaTrader 5
vibe-trading --pine <run_id>Bench a pre-built alpha zoo (one line):
vibe-trading alpha bench --zoo gtja191 --universe csi300 --period 2018-2025 --top 20Browse the catalogue and inspect a single alpha:
vibe-trading alpha list --zoo gtja191 --theme reversal --limit 10
vibe-trading alpha show gtja191_171Compose a multi-factor signal from the zoo (Python):
from src.skills.multi_factor.zoo_signal_engine import ZooSignalEngine
engine = ZooSignalEngine.from_zoo(["gtja191_171", "gtja191_111", "gtja191_163"])
panel = ... # your wide OHLCV panel
signal = engine.compute_signal(panel)# Equity deep-dive
vibe-trading run -p "Research NVDA: earnings trend, analyst consensus, option flow, and key risks for next quarter"
# Macro analysis
vibe-trading run -p "Analyze the current Fed rate path, USD strength, and impact on EM equities and gold"
# Crypto on-chain
vibe-trading run -p "Deep dive BTC on-chain: whale flows, exchange balances, miner activity, and funding rates"# Bull/bear debate on a stock
vibe-trading --swarm-run investment_committee '{"topic": "Is TSLA a buy at current levels?"}'
# Quant strategy from screening to backtest
vibe-trading --swarm-run quant_strategy_desk '{"universe": "S&P 500", "horizon": "3 months"}'
# Crypto desk: funding + liquidation + flow → risk manager
vibe-trading --swarm-run crypto_trading_desk '{"asset": "ETH-USDT", "timeframe": "1w"}'
# Global macro portfolio allocation
vibe-trading --swarm-run macro_rates_fx_desk '{"focus": "Fed pivot impact on EM bonds"}'# Save your preferences once
vibe-trading run -p "Remember: I prefer RSI-based strategies, max 10% drawdown, hold period 5–20 days"
# The agent recalls them in future sessions automatically
vibe-trading run -p "Build a crypto strategy that fits my risk profile"# Analyze a broker export or earnings report
vibe-trading --upload trades_export.csv
vibe-trading run -p "Profile my trading behavior and identify any biases"
vibe-trading --upload NVDA_Q1_earnings.pdf
vibe-trading run -p "Summarize the key risks and beats/misses from this earnings report"vibe-trading serve --port 8899| Method | Endpoint | Description |
|---|---|---|
GET | /runs | List runs |
GET | /runs/{run_id} | Run details |
GET | /runs/{run_id}/pine | Multi-platform indicator export |
POST | /sessions | Create session |
POST | /sessions/{id}/messages | Send message |
GET | /sessions/{id}/events | SSE event stream |
POST | /upload | Upload PDF/file |
GET | /swarm/presets | List swarm presets |
POST | /swarm/runs | Start swarm run |
GET | /swarm/runs/{id}/events | Swarm SSE stream |
GET | /alpha/list | List alphas (filter by zoo/theme/universe) |
GET | /alpha/{alpha_id} | Alpha metadata + source code |
POST | /alpha/bench | Start a bench job (returns job_id) |
GET | /alpha/bench/{job_id}/stream | SSE progress stream |
GET | /settings/llm | Read Web UI LLM settings |
PUT | /settings/llm | Update local LLM settings |
GET | /settings/data-sources | Read local data source settings |
PUT | /settings/data-sources | Update local data source settings |
Interactive docs: http://localhost:8899/docs
For localhost development, vibe-trading serve keeps the browser workflow simple. For any non-local client, sensitive API endpoints require API_AUTH_KEY; use Authorization: Bearer <key> for JSON/upload requests. Browser EventSource streams are handled by the Web UI after you enter the same key once in Settings.
Shell-capable tools are available to local CLI and trusted localhost workflows, but are not exposed to remote API sessions unless you explicitly set VIBE_TRADING_ENABLE_SHELL_TOOLS=1. Document and journal readers are limited to upload/import roots by default; place files under agent/uploads, agent/runs, ./uploads, ./data, ~/.vibe-trading/uploads, or ~/.vibe-trading/imports, or add a dedicated directory through VIBE_TRADING_ALLOWED_FILE_ROOTS.
The Web UI Settings page lets local users update the LLM provider/model, base URL, generation parameters, reasoning effort, and optional market data credentials such as the Tushare token. Settings are persisted to agent/.env; provider defaults are loaded from agent/src/providers/llm_providers.json.
Settings reads are side-effect free: GET /settings/llm and GET /settings/data-sources never create agent/.env, and they only return project-relative paths. Settings reads and writes can expose credential state or update credentials/runtime environment, so they require API_AUTH_KEY when configured. If API_AUTH_KEY is unset for dev mode, settings access is accepted only from loopback clients.
Vibe-Trading exposes 36 MCP tools for any MCP-compatible client. Runs as a stdio subprocess — no server setup needed. Core research tools work with zero API keys for HK/US/crypto; trading connector tools use the selected connector profile, and run_swarm needs an LLM key.
Add to claude_desktop_config.json:
{
"mcpServers": {
"vibe-trading": {
"command": "vibe-trading-mcp"
}
}
}</details>
<details>
<summary><b>OpenClaw</b></summary>
Add to ~/.openclaw/config.yaml:
skills:
- name: vibe-trading
command: vibe-trading-mcpFor a first research-only smoke test, confirm tool discovery and run a market
data or backtest request before selecting a trading connector profile. Core
research tools can run without broker credentials; connector-backed trading_*
tools should be used only after you intentionally select and check a connector
profile. run_swarm requires an LLM key.
vibe-trading-mcp # stdio (default)
vibe-trading-mcp --transport sse # SSE for web clients</details>
MCP tools exposed (36): list_skills, load_skill, start_research_goal, get_research_goal, add_goal_evidence, update_research_goal_status, backtest, factor_analysis, analyze_options, pattern_recognition, read_url, read_document, web_search, write_file, read_file, list_swarm_presets, run_swarm, get_market_data, get_swarm_status, get_run_result, list_runs, reap_stale_runs, retry_run, analyze_trade_journal, extract_shadow_strategy, run_shadow_backtest, render_shadow_report, scan_shadow_signals, trading_connections, trading_select_connection, trading_check, trading_account, trading_positions, trading_orders, trading_quote, trading_history.
run_swarm workers can call operator-approved tools from external MCP servers. Configure the server-side allowlist in VIBE_TRADING_SWARM_AGENT_CONFIG, ~/.vibe-trading/swarm-agent.json, or the fallback ~/.vibe-trading/agent.json; then list remote tools in a swarm preset using the local MCP wrapper name, such as mcp_internal_kb_search. Caller-provided variables stay template data only and cannot inject MCP URLs, commands, environment variables, or allowlist overrides.
npx clawhub@latest install vibe-trading --force
--forceis required because the skill references external APIs, which triggers VirusTotal's automated scan. The code is fully open-source and safe to inspect.
This downloads the skill + MCP config into your agent's skills directory. No cloning needed.
Browse on ClawHub: clawhub.ai/skills/vibe-trading
</details> <details> <summary><b>OpenSpace — self-evolving skills</b></summary>All 77 finance skills are published on open-space.cloud and evolve autonomously through OpenSpace's self-evolution engine.
To use with OpenSpace, add both MCP servers to your agent config:
{
"mcpServers": {
"openspace": {
"command": "openspace-mcp",
"toolTimeout": 600,
"env": {
"OPENSPACE_HOST_SKILL_DIRS": "/path/to/vibe-trading/agent/src/skills",
"OPENSPACE_WORKSPACE": "/path/to/OpenSpace"
}
},
"vibe-trading": {
"command": "vibe-trading-mcp"
}
}
}OpenSpace will auto-discover all 77 skills, enabling auto-fix, auto-improve, and community sharing. Search for Vibe-Trading skills via search_skills("finance backtest") in any OpenSpace-connected agent.
This is the opposite direction from the MCP Plugin above.
The MCP Plugin lets other agents call Vibe-Trading tools.
This section lets the built-in Vibe-Trading agent call tools from your external MCP servers.
Create ~/.vibe-trading/agent.json:
{
"mcpServers": {
"my-server": {
"command": "uvx",
"args": ["my-mcp-server"]
}
}
}Run any CLI command — tools from ordinary external servers are automatically injected into the agent's registry after local tools:
vibe-trading run "use my-server to do X"Vibe-Trading can connect directly to Interactive Brokers' official remote MCP
endpoint in read-only mode. Add this to ~/.vibe-trading/agent.json:
{
"mcpServers": {
"ibkr": {
"type": "streamableHttp",
"url": "https://api.ibkr.com/v1/api/mcp",
"auth": {
"type": "oauth",
"scopes": ["mcp.read"],
"clientName": "Vibe-Trading",
"cacheDir": "~/.vibe-trading/live/ibkr/oauth"
},
"enabledTools": ["*"]
}
}
}Then start the browser OAuth flow:
vibe-trading connector authorize ibkr-live-official-mcp-readonlyThe wildcard is accepted only for IBKR's mcp.read probe. Authorizing this
profile confirms access to IBKR's official read scope; generic trading_account
and trading_positions calls stay disabled until IBKR publishes stable read
tool names that Vibe-Trading can map safely. A config that adds mcp.write must
pin an explicit tool allowlist and still passes through the live order guard.
If IBKR issues a pre-registered OAuth client, add clientId and clientSecret
inside auth.
For users who cannot wait for IBKR OAuth client approval, connect to a local
TWS or IB Gateway session. Credentials stay inside IBKR's desktop app; Vibe-
Trading only connects to 127.0.0.1 and exposes it as a connector profile.
Install the optional SDK:
pip install "vibe-trading-ai[ibkr]"Open TWS paper trading or IB Gateway paper, enable API socket clients, then run:
vibe-trading connector list
vibe-trading connector use ibkr-paper-local
vibe-trading connector configure ibkr-paper-local --yes
vibe-trading connector check
vibe-trading connector account
vibe-trading connector positions
vibe-trading connector orders
vibe-trading connector quote AAPL
vibe-trading connector history AAPL --duration "30 D" --bar-size "1 day"Default local ports:
| App | Paper | Live read-only |
|---|---|---|
| TWS | 7497 | 7496 |
| IB Gateway | 4002 | 4001 |
The agent exposes connector-scoped tools named trading_connections,trading_select_connection, trading_check, trading_account,trading_positions, trading_orders, trading_quote, and trading_history.
Live-broker raw MCP tools are not registered directly as mcp_<broker>_*.
No IBKR order-placement tool is registered.
| Field | Type | Default | Description |
|---|---|---|---|
type | string | inferred for stdio; required for HTTP | Omit for stdio, or set to sse / streamableHttp for URL-based servers. |
command | string | required for stdio | Executable to spawn for stdio servers. Invalid for sse / streamableHttp servers. |
args | array | [] | Command-line arguments for stdio servers only. |
env | object | {} | Extra environment variables merged into the subprocess env for stdio servers only. |
url | string | required for sse / streamableHttp | Remote SSE / streamable HTTP endpoint URL. Not used for stdio servers. |
headers | object | {} | Extra HTTP headers for sse / streamableHttp servers only. |
toolTimeout | number | 30 | Per-tool call timeout in seconds |
enabledTools | array | ["*"] | Tool allowlist. Use ["*"] to expose all tools from the server |
Config file location: ~/.vibe-trading/agent.json (JSON or YAML).
For URL-based transports, type is required. The agent no longer guesses between SSE and streamable HTTP from the URL suffix.
When creating a session via the API you can pass mcpServers inside session.config to extend or override the global config for that session only:
{
"config": {
"mcpServers": {
"research-server": {
"command": "uvx",
"args": ["research-mcp"],
"enabledTools": ["search", "fetch"]
}
}
}
}Ordinary remote tools are exposed with stable names: mcp_<server>_<tool>.
Live-broker MCP servers stay behind the trading_* connector surface.
If two server names produce the same ASCII-safe local prefix (e.g. foo-bar and foo_bar both become foo_bar), a deterministic hash suffix is appended at the server-segment level so names remain unique. The operator receives a warning:
WARNING: Configured MCP server 'foo-bar' collides with another server after local name
normalization. Using local tool prefix 'mcp_foo_bar_<hash>_<tool>' to keep generated
tool names unique. Rename the server in agent config if you want a different prefix.| Limit | Detail |
|---|---|
| Transport | stdio, SSE, and streamable HTTP |
| Execution | serial only — MCP tools never enter the parallel readonly path |
| Surfaces | tools only (resources and prompts excluded in v1) |
| Hot reload | not supported — restart the process to pick up config changes |
| Swarm path | MCP tools are not available inside Swarm worker registries in v1 |
Vibe-Trading/
├── agent/ # Backend (Python)
│ ├── cli/ # CLI package — interactive TUI + subcommands
│ ├── api_server.py # FastAPI server — runs, sessions, upload, swarm, SSE
│ ├── mcp_server.py # MCP server — 36 tools for OpenClaw / Claude Desktop
│ │
│ ├── src/
│ │ ├── agent/ # ReAct agent core
│ │ │ ├── loop.py # 5-layer compression + read/write tool batching
│ │ │ ├── context.py # system prompt + auto-recall from persistent memory
│ │ │ ├── skills.py # skill loader (77 bundled + user-created via CRUD)
│ │ │ ├── tools.py # tool base class + registry
│ │ │ ├── memory.py # lightweight workspace state per run
│ │ │ ├── frontmatter.py # shared YAML frontmatter parser
│ │ │ └── trace.py # execution trace writer
│ │ │
│ │ ├── memory/ # Cross-session persistent memory
│ │ │ └── persistent.py # file-based memory (~/.vibe-trading/memory/)
│ │ │
│ │ ├── tools/ # 31 auto-discovered agent tools
│ │ │ ├── backtest_tool.py # run backtests
│ │ │ ├── remember_tool.py # cross-session memory (save/recall/forget)
│ │ │ ├── skill_writer_tool.py # skill CRUD (save/patch/delete/file)
│ │ │ ├── session_search_tool.py # FTS5 cross-session search
│ │ │ ├── swarm_tool.py # launch swarm teams
│ │ │ ├── web_search_tool.py # DuckDuckGo web search
│ │ │ └── ... # bash, file I/O, factor analysis, options, alpha browser + bench, etc.
│ │ │
│ │ ├── factors/ # Alpha Zoo — 452 alphas across 4 zoos
│ │ │ ├── base.py # 19 operators (rank/scale/ts_*/delta/decay_linear/safe_div/vwap)
│ │ │ ├── registry.py # AST-only metadata load + lazy compute + sanity gates
│ │ │ ├── bench_runner.py # IC + alive/reversed/dead categorisation
│ │ │ └── zoo/ # qlib158 (154) + alpha101 (101) + gtja191 (191) + academic (6)
│ │ │
│ │ ├── api/ # FastAPI route modules
│ │ │ └── alpha_routes.py # /alpha/list, /alpha/{id}, /alpha/bench, SSE stream
│ │ │
│ │ ├── skills/ # 77 finance skills in 8 categories (SKILL.md each)
│ │ ├── swarm/ # Swarm DAG execution engine
│ │ │ └── presets/ # 29 swarm preset YAML definitions
│ │ ├── session/ # Multi-turn chat + FTS5 session search
│ │ └── providers/ # LLM provider abstraction
│ │
│ └── backtest/ # Backtest engines
│ ├── engines/ # 7 engines + composite cross-market engine + options_portfolio
│ ├── loaders/ # 7 sources: tushare, okx, yfinance, akshare, mootdx, ccxt, futu
│ │ ├── base.py # DataLoader Protocol
│ │ └── registry.py # Registry + auto-fallback chains
│ └── optimizers/ # MVO, equal vol, max div, risk parity
│
├── frontend/ # Web UI (React 19 + Vite + TypeScript)
│ └── src/
│ ├── pages/ # Home, Agent, AlphaZoo, RunDetail, Compare, Correlation, Settings
│ ├── components/ # chat, charts, layout
│ └── stores/ # Zustand state management
│
├── Dockerfile # Multi-stage build
├── docker-compose.yml # One-command deploy
├── pyproject.toml # Package config + CLI entrypoint
├── tools/ # Repo-level CI helpers
│ └── ci_grep_gates.sh # rejects yaml.load / trademark / per-stock-data leaks
└── LICENSE # MIT</details>
Vibe-Trading is part of the HKUDS agent ecosystem:
<table> <tr> <td align="center" width="20%"> <a href="https://github.com/HKUDS/nanobot"><b>NanoBot</b></a><br> <sub>Ultra-Lightweight Personal AI Assistant</sub> </td> <td align="center" width="20%"> <a href="https://github.com/HKUDS/AI-Trader"><b>AI-Trader</b></a><br> <sub>Agent-Native Signal & Copy Trading Platform</sub> </td> <td align="center" width="20%"> <a href="https://github.com/HKUDS/CLI-Anything"><b>CLI-Anything</b></a><br> <sub>Making All Software Agent-Native</sub> </td> <td align="center" width="20%"> <a href="https://github.com/HKUDS/OpenSpace"><b>OpenSpace</b></a><br> <sub>Self-Evolving AI Agent Skills</sub> </td> <td align="center" width="20%"> <a href="https://github.com/HKUDS/ClawTeam"><b>ClawTeam</b></a><br> <sub>Agent Swarm Intelligence</sub> </td> </tr> </table>We ship in phases. Items move to Issues when work begins.
| Phase | Feature | Status |
|---|---|---|
| Trust Layer | Reproducible run cards are emitted and shown in Run Detail; v1 adds tool traces and citations | v0 Shipped |
| Hypothesis Registry | Durable research hypotheses with lifecycle status, data sources, skills, run-card links, and invalidation notes | Backend MVP Shipped |
| Research Autopilot | Manual-first research loop: hypothesis → deterministic backtest → evidence report | Next |
| Data Bridge | Bring-your-own data: local CSV/Parquet/SQL connectors with schema mapping | Planned |
| Options Lab | Vol surface, Greeks dashboard, payoff/scenario explorer | Planned |
| Portfolio Studio | Risk x-ray, constraints, turnover-aware optimizer, rebalance notes | Planned |
| Alpha Zoo | 452 pre-built alphas (Qlib 158 + Kakushadze 101 + GTJA 191 + FF5 + Carhart) with one-line bench, agent integration, and Web UI | Shipped 0.1.8 |
| Research Delivery | Scheduled briefs to Slack / Telegram / email-style channels | Planned |
| Community | Shareable skills, presets, and strategy cards | Exploring |
We welcome contributions! See CONTRIBUTING.md for guidelines.
Good first issues are tagged with good first issue — pick one and get started.
Want to contribute something bigger? Check the Roadmap above and open an issue to discuss before starting.
Thanks to everyone who has contributed to Vibe-Trading!
Recent v0.1.9 cycle contributors and credits:
Vibe-Trading is research and trading software. It is not investment advice, holds no funds, and runs no execution venue. Trading through a broker channel you explicitly authorize (e.g. Robinhood Agentic Trading) happens only within the limits you set and which you can halt at any time. This broker-trading capability is experimental and not verified by us against a real broker account — use it at your own risk. Past performance does not guarantee future results.
MIT License — see LICENSE