{"slug": "vibe-trading-your-personal-trading-agent", "title": "Vibe-Trading: Your Personal Trading Agent", "summary": "HKUDS released Vibe-Trading, an open-source trading agent that executes trades via a single command, with updates including cross-platform setup, content-filter resilience, and Shadow Account conditional entry rules for precise trade signals.", "body_md": "**English** | [中文](/HKUDS/Vibe-Trading/blob/main/README_zh.md) | [日本語](/HKUDS/Vibe-Trading/blob/main/README_ja.md) | [한국어](/HKUDS/Vibe-Trading/blob/main/README_ko.md) | [العربية](/HKUDS/Vibe-Trading/blob/main/README_ar.md)\n\n**One Command to Empower Your Agent with Comprehensive Trading Capabilities**\n\n[Website](https://vibetrading.wiki/) ·\n[Docs](https://vibetrading.wiki/docs/) ·\n[News](#-news) ·\n[Features](#-key-features) ·\n[Shadow Account](#-shadow-account) ·\n[Demo](#-demo) ·\n[Quick Start](#-quick-start) ·\n[Examples](#-examples) ·\n[API / MCP](#-api-server) ·\n[Roadmap](#-roadmap) ·\n[Contributing](#-contributing)\n\n**2026-06-28**🧰** Cross-platform setup/dev + runtime and file-tool hardening**:`vibe-trading setup`\n\nand`vibe-trading dev`\n\nnow handle Windows TypeScript builds, launch the backend from the right cwd, use the Vite 5899 port, and shut child processes down cleanly ([#292](https://github.com/HKUDS/Vibe-Trading/pull/292), thanks @digger-yu). Runtime status polling now degrades instead of crashing ([#322](https://github.com/HKUDS/Vibe-Trading/issues/322)); MCP OAuth cache keys are sanitized ([#313](https://github.com/HKUDS/Vibe-Trading/issues/313)); OpenAI defaults and Robinhood`agent.json`\n\nvalidation were tightened ([#319](https://github.com/HKUDS/Vibe-Trading/pull/319),[#320](https://github.com/HKUDS/Vibe-Trading/pull/320), thanks @mvanhorn); and file tools got isolated read/write roots plus broader sandbox tests ([#299](https://github.com/HKUDS/Vibe-Trading/pull/299), thanks @skloxo).**2026-06-27**🧯** Content-filter resilience + Shadow Account feature contract cleanup**: event-driven and swarm runs now skip individual LLM content-moderation hits, warn in run cards when filter rates are high, and recognize Gemini safety finish reasons instead of aborting an entire analysis ([#308](https://github.com/HKUDS/Vibe-Trading/pull/308), closes[#307](https://github.com/HKUDS/Vibe-Trading/issues/307), thanks @shadowinlife). Shadow Account extraction/codegen now share one`PRICE_FEATURES`\n\ncontract and keep four-decimal return bounds, preventing rule/codegen drift and precision loss on`prior_5d_return`\n\n([#316](https://github.com/HKUDS/Vibe-Trading/pull/316), thanks @Robin1987China).**2026-06-26**🎯** Shadow Account conditional entry + tushare ETF/index/HK routing**: extracted Shadow Account rules now carry RSI / prior-return bounds, so the generated SignalEngine enters on real conditions (RSI in range, prior-return in range) instead of blindly replaying the holding cadence ([#314](https://github.com/HKUDS/Vibe-Trading/pull/314), follows[#302](https://github.com/HKUDS/Vibe-Trading/pull/302), thanks @Robin1987China). The tushare loader also routes ETF/LOF →`fund_daily()`\n\n, indices →`index_daily()`\n\n, and HK equities →`hk_daily()`\n\ninstead of always calling`daily()`\n\n(which silently returns empty for non-stocks), with per-symbol empty-result + partial-fetch warnings ([#315](https://github.com/HKUDS/Vibe-Trading/pull/315), closes[#310](https://github.com/HKUDS/Vibe-Trading/issues/310), thanks @shadowinlife).\n\n## Earlier news\n\n-\n**2026-06-25**🧪** Strict validation JSON + calmer agent context**: standalone backtest validation now normalizes nested`NaN`\n\n/`Infinity`\n\nvalues before writing`artifacts/validation.json`\n\nor CLI stdout, so strict JSON parsers no longer choke on validation payloads ([#306](https://github.com/HKUDS/Vibe-Trading/pull/306), thanks @gyx09212214-prog). The agent prompt also derives the current data-source count from the loader registry, and`_microcompact()`\n\nnow waits for real token pressure instead of clearing older tool results during short runs ([#296](https://github.com/HKUDS/Vibe-Trading/pull/296), closes[#282](https://github.com/HKUDS/Vibe-Trading/issues/282), thanks @MarkfuGod). -\n**2026-06-24**🎯** Shadow Account price context + reactive Chinese UI + LAN auth fix**: Shadow Account rule extraction now sees PIT-safe entry context —`entry_rsi14`\n\nand`prior_5d_return`\n\nfetched through the loader registry as of`buy_dt`\n\n, with graceful offline/no-data degradation ([#302](https://github.com/HKUDS/Vibe-Trading/pull/302), follows[#295](https://github.com/HKUDS/Vibe-Trading/issues/295), thanks @Robin1987China). The main Web UI panels now use reactive English / zh-CN translations across charts, chat, Alpha Library, Correlation, and Run Detail ([#301](https://github.com/HKUDS/Vibe-Trading/pull/301), thanks @skloxo). Remote same-origin Web UI deployments with`API_AUTH_KEY`\n\ncan post and upload again after the CSRF hardening, while mismatched cross-site origins remain blocked ([#304](https://github.com/HKUDS/Vibe-Trading/pull/304), thanks @Hinotoi-agent). -\n**2026-06-23**🛡️** Local API CSRF hardening**: a malicious web page can no longer drive unsafe cross-site requests (POST/PUT/DELETE) against the loopback API — CORS blocks reading the response but not the side effect, so loopback dev-mode trust now applies the existing cross-site guard to unsafe methods*before*honoring it. Safe methods and local CLI / non-browser uploads are unaffected ([#293](https://github.com/HKUDS/Vibe-Trading/pull/293), thanks @Hinotoi-agent). -\n**2026-06-22**🔧** Live-authorize OAuth fix + Alpha Zoo headline fix**:`connector authorize`\n\nnow holds the OAuth handshake open through a multi-minute broker sign-in (tunable via`VIBE_LIVE_AUTHORIZE_TIMEOUT_SECONDS`\n\n) and no longer spawns a competing callback server on retry, so the token actually persists ([#281](https://github.com/HKUDS/Vibe-Trading/pull/281), closes[#259](https://github.com/HKUDS/Vibe-Trading/issues/259), thanks @Robin1987China). The Alpha Zoo page no longer prints its alpha count twice ([#287](https://github.com/HKUDS/Vibe-Trading/pull/287), closes[#286](https://github.com/HKUDS/Vibe-Trading/issues/286), thanks @digger-yu). Scheduled research also picked up end-to-end usage docs ([#288](https://github.com/HKUDS/Vibe-Trading/pull/288)). -\n**2026-06-21**⏰** Scheduled-research executor + Reports library + post-backtest attribution**: scheduled research now runs** end to end**— a default-off background executor (`VIBE_TRADING_ENABLE_SCHEDULER`\n\n) fires due interval/cron jobs through the session runtime ([#278](https://github.com/HKUDS/Vibe-Trading/pull/278), thanks @mvanhorn, closing[#254](https://github.com/HKUDS/Vibe-Trading/issues/254)). A newpage lists, searches, and filters report-worthy runs with links into Run Detail + Compare (`/reports`\n\nRun Library[#224](https://github.com/HKUDS/Vibe-Trading/pull/224), thanks @LemonCANDY42). And after every backtest the agent now runs**layered attribution**— trade-level winners/losers, beta regression, market-regime analysis, and a Monte Carlo permutation test, gated by data availability and routing ([#280](https://github.com/HKUDS/Vibe-Trading/pull/280), thanks @shadowinlife). -\n**2026-06-20**🔬** Research Autopilot loop closes (Phase 3) + loader OHLC integrity guard + 4 academic alphas**:** Research Autopilot**now runs** hypothesis → signal-engine → backtest**end to end —`scaffold_signal_engine`\n\nwrites a contract-correct engine and`link_autopilot_backtest`\n\nfeeds run metrics back to the hypothesis (**68 tools**) ([#267](https://github.com/HKUDS/Vibe-Trading/pull/267)). A structural** OHLC sanity check**drops dirty bars (`high < low`\n\n, non-positive prices, bad bracketing) centrally at the loader boundary, guarding every data source ([#274](https://github.com/HKUDS/Vibe-Trading/pull/274), thanks @Shizoqua). And the**academic alpha family grows 6 → 10**— Jegadeesh reversal, George-Hwang 52-week-high, Amihud illiquidity, Harvey-Siddique skew (** 456 factors**) ([#277](https://github.com/HKUDS/Vibe-Trading/pull/277), thanks @Robin1987China). -\n**2026-06-19**🚀** v0.1.10 — Global data layer**: market-data sources grow 10 → 18 (free** Eastmoney / Sina / Stooq / Yahoo**+ key-gated** Finnhub / Alpha Vantage / Tiingo / FMP**, ban-risk fallback) plus** 18 read-only data tools**(fund flow, dragon-tiger, northbound, margin, block trades, SEC EDGAR + XBRL, financials, options chains, full-market screening…) across A-share / US / HK, all over MCP. Also bundles everything since 0.1.9 — 10 broker connectors,`alpha compare`\n\n, the provider-reliability overhaul, and the opt-in data cache.`pip install -U vibe-trading-ai`\n\n-\n**2026-06-18**🔬** Research Autopilot Phase 1 + a local Data Bridge loader, + a Discord security notice**: new`run_research_autopilot`\n\n+`generate_backtest_config`\n\nwire**Hypothesis → Research Goal → backtest** end to end (now**50 tools**), and aloader reads OHLCV straight from your own`local`\n\n**CSV / Parquet / DuckDB** files ([#260](https://github.com/HKUDS/Vibe-Trading/pull/260),[#252](https://github.com/HKUDS/Vibe-Trading/pull/252), thanks @Robin1987China), alongside DeepSeek`DSML`\n\ntool-call parsing and an identifier-containment hardening wave.⚠️ **Security:** the old community Discord invite now points to a server we don't control running a fake Collab.Land wallet-\"verification\" phishing scam — removed everywhere; the**only** official Discord is the HKUDS server ([discord.gg/6TdQnT5xcF](https://discord.gg/6TdQnT5xcF)), and we'll never ask you to connect a wallet. -\n**2026-06-17**🧩** Install compatibility + Opus/Kimi provider fixes**: Baseline`pip install vibe-trading-ai`\n\nno longer pulls the optional`pyharmonics`\n\n/`ta`\n\ndependency chain; harmonic detection now lives behind`vibe-trading-ai[harmonic]`\n\nwhile the bundled detector remains available ([#250](https://github.com/HKUDS/Vibe-Trading/pull/250), closes[#249](https://github.com/HKUDS/Vibe-Trading/issues/249)). The agent loop also avoids assistant-prefill handoff messages rejected by Opus 4.8+, and Kimi/Moonshot can override the client`User-Agent`\n\nwith`MOONSHOT_USER_AGENT`\n\n([#248](https://github.com/HKUDS/Vibe-Trading/pull/248), closes[#246](https://github.com/HKUDS/Vibe-Trading/issues/246)and[#204](https://github.com/HKUDS/Vibe-Trading/issues/204)); follow-up tests now directly cover background-result and auto-compact handoff paths ([#251](https://github.com/HKUDS/Vibe-Trading/pull/251)). -\n**2026-06-16**🛡️** Security/API hardening + GLM/Zhipu alias**: Settings writes require auth when configured ([#245](https://github.com/HKUDS/Vibe-Trading/pull/245)); API shell-capable tools require explicit`VIBE_TRADING_ENABLE_SHELL_TOOLS=1`\n\nopt-in ([#243](https://github.com/HKUDS/Vibe-Trading/pull/243)); local shutdown requires auth when an API key is configured ([#241](https://github.com/HKUDS/Vibe-Trading/pull/241)); and untrusted loopback-looking hosts are rejected instead of treated as local ([#242](https://github.com/HKUDS/Vibe-Trading/pull/242)). Runtime edges also got cleaned up: Web chat syncs completed attempts ([#236](https://github.com/HKUDS/Vibe-Trading/pull/236)), run cards emit strict JSON for non-finite metrics ([#238](https://github.com/HKUDS/Vibe-Trading/pull/238)), malformed`RSSHUB_TIMEOUT_S`\n\n/`RSSHUB_FETCH_BUDGET_S`\n\nfalls back safely ([#240](https://github.com/HKUDS/Vibe-Trading/pull/240)), and ddgs retry fallback is regression-covered ([#239](https://github.com/HKUDS/Vibe-Trading/pull/239)). GLM/Zhipu is now a first-class provider alias with model-name inference ([#247](https://github.com/HKUDS/Vibe-Trading/pull/247), closes[#237](https://github.com/HKUDS/Vibe-Trading/issues/237)). -\n**2026-06-15**🧭** Web-search resilience + Web UI run-continuity fixes**:`web_search`\n\nno longer fails when a single engine is rate-limited — it now queries several free, no-key engines in order (DuckDuckGo, Google, Bing, Brave, Mojeek, Yahoo) with retry/backoff, treats \"no results\" as an empty answer rather than an error, and returns an actionable message instead of a bare ❌ when every engine is throttled (override the engine list with`VIBE_TRADING_SEARCH_BACKENDS`\n\n) ([#232](https://github.com/HKUDS/Vibe-Trading/pull/232), closes[#231](https://github.com/HKUDS/Vibe-Trading/issues/231), thanks @Ethan-sun01). In the Web UI, switching pages during a run no longer freezes it — the chat re-subscribes to the live stream and replays missed progress on return ([#234](https://github.com/HKUDS/Vibe-Trading/pull/234)) — and the Stop button now takes effect mid-stream and between tools instead of only at iteration boundaries ([#235](https://github.com/HKUDS/Vibe-Trading/pull/235)), closing both halves of[#229](https://github.com/HKUDS/Vibe-Trading/issues/229)(thanks @kalkinj). The baostock loader also accepts native`sh.601398`\n\n/`sz.000001`\n\ncodes alongside tushare-style`601398.SH`\n\n([#230](https://github.com/HKUDS/Vibe-Trading/pull/230), thanks @bhlt). -\n**2026-06-14**📊** Per-run token usage + progressive Run Detail charts**: Every agent run now persists provider-reported token usage as a run-scoped`llm_usage.json`\n\n— provider/model, aggregate totals, and per-iteration counts — surfaced additively on`/runs/{id}`\n\n, 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](https://github.com/HKUDS/Vibe-Trading/pull/223), thanks @LemonCANDY42). The Run Detail page no longer loads every symbol's candlesticks up front: the default`/runs/{id}`\n\nresponse 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`\n\n/`?chart_symbol=`\n\nmodes, with per-symbol loading state and a load-all-with-progress control ([#225](https://github.com/HKUDS/Vibe-Trading/pull/225), thanks @LemonCANDY42). Two loader fixes close the cycle: yfinance's exclusive`end`\n\nboundary no longer drops the final requested trading day — the download now passes`end + 1 day`\n\nwhile cache keys keep the original range ([#226](https://github.com/HKUDS/Vibe-Trading/pull/226), thanks @gyx09212214-prog) — and a malformed`CCXT_TIMEOUT_MS`\n\n/`OKX_TIMEOUT_S`\n\nvalue now warns and falls back to its default instead of raising at import and blocking startup ([#227](https://github.com/HKUDS/Vibe-Trading/pull/227), thanks @gyx09212214-prog). -\n**2026-06-13**↩️** Resume a past session by ID from the CLI**: The interactive CLI now prints the session-id on exit, with a copy-paste`vibe-trading resume <session-id>`\n\nhint — so locating the trace for a finished run no longer means guessing which folder under`agent/sessions/`\n\nis newest by timestamp. The new`vibe-trading resume <session-id>`\n\nsubcommand 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](https://github.com/HKUDS/Vibe-Trading/pull/218), thanks @zwrong). -\n**2026-06-12**🩺** Provider reliability overhaul — DeepSeek hangs, Kimi access, streaming liveness**: A cluster of provider reports — DeepSeek runs stuck on \"Agent is working…\" ([#208](https://github.com/HKUDS/Vibe-Trading/issues/208), thanks @XYWOX),`reached max iterations`\n\nmasking empty model responses ([#203](https://github.com/HKUDS/Vibe-Trading/issues/203), thanks @mojianliang), the UI never recovering after a stall ([#195](https://github.com/HKUDS/Vibe-Trading/issues/195), thanks @mafia23), and Kimi rejecting the client ([#204](https://github.com/HKUDS/Vibe-Trading/issues/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`\n\n, 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`\n\nwith 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`\n\ninstead 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 newprints 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`vibe-trading provider doctor`\n\n`pip install \"vibe-trading-ai[deepseek]\"`\n\n, and kimi-k2.x's`temperature=1`\n\nrequirement 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`\n\n). -\n**2026-06-11**🐝** Swarm workers now pull market data through the loader layer**: An investment-committee run on NVDA exposed a chain of gaps — workers wrote ad-hoc yfinance scripts, trusted a malformed latest bar (volume present, OHLC empty), leaked`NaN`\n\ninto non-strict JSON, and a context-free continuation prompt re-routed to the wrong preset ([#198](https://github.com/HKUDS/Vibe-Trading/issues/198), thanks @BillDin for an exceptional diagnosis plus both fixes). Swarm workers now get a local`get_market_data`\n\ntool backed by the same normalized loader registry as MCP — strict JSON, non-finite floats serialize as`null`\n\n— wired into**every market-data preset**(21 workers across 13 presets) with a prompt policy that steers OHLCV work tool-first ([#199](https://github.com/HKUDS/Vibe-Trading/pull/199));`run_swarm`\n\ntakes an explicit`preset_name`\n\nand refuses ambiguous continuation fragments instead of silently falling back to`equity_research_team`\n\n([#200](https://github.com/HKUDS/Vibe-Trading/pull/200)). Grounding got smarter too: a bare US ticker like`NVDA`\n\nin a swarm prompt is promoted to`NVDA.US`\n\n(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`\n\nno longer wipes them ([#197](https://github.com/HKUDS/Vibe-Trading/issues/197), thanks @FlyerJ). -\n**2026-06-10**🐳** Docker reaches a host-side Ollama out of the box**: Inside the container`localhost`\n\nis the container itself, so the shipped`OLLAMA_BASE_URL=http://localhost:11434`\n\nfailed the LLM preflight for every Dockerized Ollama setup.`docker-compose.yml`\n\nnow defaults to`http://host.docker.internal:11434`\n\n(export`OLLAMA_BASE_URL`\n\nto point elsewhere) and adds the`host-gateway`\n\n`extra_hosts`\n\nmapping so the same file works on Linux as well as Docker Desktop ([#196](https://github.com/HKUDS/Vibe-Trading/pull/196), thanks @ShahNewazKhan). -\n**2026-06-09**🔑** Clearer error when the Web UI is opened from another machine**: Reaching the chat from a non-loopback client (another machine, a VM host, a phone on your LAN) without`API_AUTH_KEY`\n\nset returned`403`\n\non 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`\n\non the same machine; set`API_AUTH_KEY`\n\nand enter it once in Settings; or`VIBE_TRADING_TRUST_DOCKER_LOOPBACK=1`\n\nfor Docker Desktop's host gateway) ([#191](https://github.com/HKUDS/Vibe-Trading/issues/191), thanks @mafia23). -\n**2026-06-08**🔧** Gemini 3.x multi-turn tool-calling fix**: This completes the Gemini 3.x thinking-model fix. The 6/05 round-trip ([#176](https://github.com/HKUDS/Vibe-Trading/pull/176)) only covered in-memory history, but the real agent loop replays history as OpenAI-format dicts where LangChain dropped the per-tool-call`thought_signature`\n\nbefore the request was built — so multi-turn tool calling still 400'd with`missing thought_signature`\n\n. It is now re-attached at the single`_convert_input`\n\nchokepoint both`invoke`\n\nand`stream`\n\npass through (parallel calls, where only the first of N is signed, included) ([#184](https://github.com/HKUDS/Vibe-Trading/pull/184), thanks @ngoanpv). -\n**2026-06-07**🐝** Live swarm status in the chat timeline**: When the agent launches a multi-agent swarm (investment committee, quant desk, risk committee, …), the chat now renders an inline**status card** that streams each worker's state — waiting / running / done / failed / blocked / retrying — in real time, the same per-agent visibility the standalone swarm dashboard already had. Runtime events are bridged into the session SSE stream without changing the existing`/swarm/runs`\n\nAPI, and a finished card rehydrates from the final`run_swarm`\n\nresult on reconnect or history replay ([#188](https://github.com/HKUDS/Vibe-Trading/pull/188), thanks @BillDin). Preset routing also got sharper: an explicitly named preset (e.g.`investment_committee`\n\n, with or without underscores) now wins over keyword scoring, and the bare`IV`\n\nderivatives keyword no longer false-matches inside ordinary words like \"g**iv** en\" ([#189](https://github.com/HKUDS/Vibe-Trading/pull/189), thanks @BillDin). -\n**2026-06-06**⚖️** Alpha compare — head-to-head across CLI, Web UI, REST & agent**: A new`alpha compare`\n\nbenches 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=…)`\n\nsubset 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`\n\n(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`\n\n+ SSE (REST), and a read-only`alpha_compare`\n\nagent tool (**47 tools** now). -\n**2026-06-05**🇮🇳** Dhan + Shoonya connectors (India) — 10 brokers total**: The connector-first trading layer adds** Dhan**and** Shoonya**for the Indian market (NSE/BSE equities + F&O), bringing the roster to ten brokers. Both are** paper + read-only**— like Longbridge, their APIs expose no runtime paper/live discriminator, so their`place_order`\n\n/`cancel_order`\n\nhard-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](https://github.com/HKUDS/Vibe-Trading/pull/181), closes[#174](https://github.com/HKUDS/Vibe-Trading/issues/174)). This cycle also fixes**Gemini 2.5 / 3.x thinking models**: their per-tool-call`thoughtSignature`\n\nnow round-trips through the OpenAI-compatible path, so multi-turn function calling no longer fails with`INVALID_ARGUMENT`\n\n([#176](https://github.com/HKUDS/Vibe-Trading/pull/176), closes[#170](https://github.com/HKUDS/Vibe-Trading/issues/170), thanks @mvanhorn & @jliu6789). Chinese docstrings landed on all**452 Alpha Zoo factors**([#180](https://github.com/HKUDS/Vibe-Trading/pull/180), thanks @LeeCQiang), and a** frontend test suite (197 vitest tests)**plus backend auth / path-traversal / CORS security tests joined CI ([#175](https://github.com/HKUDS/Vibe-Trading/pull/175), thanks @sambazhu). -\n**2026-06-04**🗃️** Opt-in local data cache for all 7 data sources**: A new`VIBE_TRADING_DATA_CACHE`\n\nswitch lets every backtest loader — tushare, okx, ccxt, akshare, mootdx, yfinance, futu — cache settled historical bars under`~/.vibe-trading/cache`\n\n(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](https://github.com/HKUDS/Vibe-Trading/pull/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](https://github.com/HKUDS/Vibe-Trading/pull/173)). -\n**2026-06-03**🧹** Community triage + trace correlation**: Tool-call trace entries now carry the originating`call_id`\n\n, so a`tool_result`\n\ncan be matched back to its`tool_call`\n\nwhen replaying a run trace — arg previews stay truncated to keep trace files small ([#168](https://github.com/HKUDS/Vibe-Trading/pull/168), thanks @zwrong). Source comments no longer point at an internal-only docs path that external contributors couldn't find ([#166](https://github.com/HKUDS/Vibe-Trading/issues/166), thanks @jaleelpersonal). Also clarified that the`langchain-community`\n\nresolver warning on install is a harmless leftover-package notice, not a failure ([#167](https://github.com/HKUDS/Vibe-Trading/issues/167)), and scoped Gemini 2.5/3.0`thoughtSignature`\n\nround-tripping for function calls as a`help wanted`\n\ntask with a full fix plan ([#170](https://github.com/HKUDS/Vibe-Trading/issues/170), thanks @jliu6789). -\n**2026-06-02**🔌** Six new broker connectors (Tiger / Longbridge / Alpaca / OKX / Binance / Futu)**: The connector-first trading layer gains a direct-SDK transport alongside IBKR (local) and Robinhood (MCP). Each connector exposes read-only account / positions / orders / quote / history**plus paper-account order placement**— test your strategies across these broker paper accounts. Five of them (Tiger, Alpaca, OKX, Binance, Futu) also support** bounded, mandate-gated order placement**behind the same safety model as Robinhood: a user-committed mandate (symbol universe / order size / exposure / leverage / daily cap), a filesystem kill switch, a fail-closed pre-trade gate, and a full audit ledger.**Longbridge is paper + read-only only**(its API exposes no runtime paper/live discriminator). Every paper/live distinction is a structural per-broker guard — account-id format, host separation, demo flag, or trade environment. New`trading_place_order`\n\n/`trading_cancel_order`\n\ntools; HK and A-share asset classes added to the mandate universe. Experimental / use at your own risk. -\n**2026-06-01**🚀** v0.1.9 released**(`pip install -U vibe-trading-ai`\n\n): 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`\n\nto relaunch failed/stale runs (**36 MCP tools** now). The`agent/cli/`\n\npackage refactor with a refreshed terminal UI, the`mootdx`\n\nno-token A-share loader, and a robustness pass across backtest / agent loop / sessions.`--version`\n\nnow always matches the installed package, fixing the 0.1.8 drift ([#156](https://github.com/HKUDS/Vibe-Trading/issues/156)). -\n**2026-05-31**🔌** Connector-first broker architecture (IBKR + Robinhood)**: Trading access now starts from a selectable connector profile instead of separate broker/live entry points.`vibe-trading connector list/use/check/account/positions/orders/quote/history`\n\nand the MCP`trading_*`\n\ntools 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`\n\nprobe 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. -\n**2026-05-30**🧰** Robustness pass — backtest, agent loop, sessions**: LLM-generated signal engines now pass pre-flight interface validation before instantiation, catching circular self-imports, a missing`generate()`\n\n, non-defaulted`__init__`\n\nargs, and wrong return types with actionable JSON errors instead of raw tracebacks ([#149](https://github.com/HKUDS/Vibe-Trading/pull/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`\n\nstatus 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](https://github.com/HKUDS/Vibe-Trading/pull/148)), guarded to fire only mid-run so it never displaces research-goal context. Session message writes now`flush + fsync`\n\neach 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`\n\nendpoint ([#147](https://github.com/HKUDS/Vibe-Trading/pull/147)). The Web composer also fixes IME Enter handling so a composition-confirming Enter no longer submits mid-word ([#146](https://github.com/HKUDS/Vibe-Trading/pull/146)). -\n**2026-05-29**🔐** Robinhood Agentic Trading support (opt-in, bounded autonomy)**: Adds support for Robinhood Agentic Trading (remote MCP, OAuth). Off and read-only by default; the agent acts only inside a user-committed mandate (symbols / order size / exposure / leverage / daily cap), with a filesystem-level instant kill switch, preemptive flatten, mandate auto-expiry, a full audit ledger, and a persistent autonomous runner. No custody, no venue — the broker holds funds and executes; we only relay intent. Experimental / use at your own risk. -\n**2026-05-28**🧪** Swarm safety + strict alpha gate + worker MCP**: Swarm DAG blocks downstream tasks when upstream fails ([#145](https://github.com/HKUDS/Vibe-Trading/pull/145)). New`run_bench_strict()`\n\nadds a same-universe random control + OOS split to catch factors that just track market beta ([#143](https://github.com/HKUDS/Vibe-Trading/pull/143), thanks @Soli22de). Swarm workers can call operator-configured external MCP servers, with trust boundary pinned ([#142](https://github.com/HKUDS/Vibe-Trading/pull/142), thanks @shadowinlife). -\n**2026-05-27**📊** mootdx A-share data source + output polish**: New`mootdx`\n\nloader 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](https://github.com/HKUDS/Vibe-Trading/issues/107)). CCXT loader now reads`HTTP_PROXY/HTTPS_PROXY/ALL_PROXY`\n\nso Binance/OKX public data works from restricted networks ([#126](https://github.com/HKUDS/Vibe-Trading/pull/126), thanks @ruok808). Final-answer rendering also dropped the ugly full-width`---`\n\nhorizontal separators on CLI and Web: the system prompt now nudges the agent toward markdown tables and`##`\n\nheadings, the CLI renderer strips standalone HRs as defense-in-depth, and the chat bubble hides any`<hr>`\n\nthat slips through ([#139](https://github.com/HKUDS/Vibe-Trading/issues/139), thanks @sdwxm188). -\n**2026-05-26**✅** Research Goal lifecycle closure**: Goal mode now behaves like a real task runner: Web UI goal creation creates or binds the session and immediately sends the kickoff turn; active goals can be continued, edited, cancelled, and completed across Web/API/CLI/MCP; and the agent advances from the current goal snapshot (criteria, evidence, claims, open items) instead of only the original prompt. Covered-but-still-active goals now enter an audit/status update instead of stopping silently, with regression coverage across backend, CLI, MCP, and frontend events. -\n**2026-05-25**🧼** Cleaner chat UI + composer workflow**: The Web UI keeps chat focused on the next action: upload, swarm, and research-goal modes now live behind the composer`+`\n\nmenu 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. -\n**2026-05-24**🎯** Research Goal runtime**: Added a session-scoped Research Goal layer across backend, CLI, API/MCP, SSE, and Web UI. Goals persist claims, acceptance criteria, evidence rows, budgets, and completion policy; agent tools can create goals and attach evidence;`/goal`\n\ngives 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. -\n**2026-05-23**🖥️** Interactive CLI refresh**: The terminal front door now opens with a larger Vibe-Trading banner, a cleaner prompt divider, prior-turn recap, post-run timing, and a Claude Code-style activity rail for live agent work. Tool calls, web/data fetches, shell-style actions, Markdown answers, and pipe tables render in a more readable transcript, while piped or non-TTY runs keep plain-text output for automation. Generated CLI screenshots are now treated as local artifacts instead of committed docs files, keeping the repository lighter. -\n**2026-05-22**🧭** Swarm recovery + MCP keepalive**: Swarm status now reconciles from live task files on every read, so API/MCP/SSE/list views recover crashed or stale runs instead of showing permanent`running`\n\nsnapshots.`run_swarm`\n\nsends MCP progress heartbeats while it polls, with a fixed first frame of`swarm_started run_id=<id>`\n\nfor 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`\n\nno longer cancels a still-running team just because its wait budget elapsed, and MCP clients can call`reap_stale_runs()`\n\nfor explicit cleanup. Today's DX pass also refreshed provider default models and aligned CI syntax checks with the new`agent/cli/`\n\npackage. 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. -\n**2026-05-21**🧱** CLI package refactor**:`agent/cli.py`\n\n(3216 LOC) split into the`agent/cli/`\n\npackage — interactive front door, slash router, Rich components, plus a`_legacy.py`\n\nshim that preserves every subcommand and re-exports every public symbol so`cli.cmd_*`\n\n/`cli._INIT_ENV_PATH`\n\n/`cli.Confirm`\n\nkeep working. New FastAPI middleware serves the SPA shell when a browser opens`/runs/{id}`\n\nor`/correlation`\n\ndirectly; same narrowing landed in the Vite dev proxy. Version unified via`cli/_version.py`\n\n(no more drift between`--version`\n\nand the banner),`python -m cli`\n\nrestored via`__main__.py`\n\n, and the chat-gate narrowed so`chat --help`\n\n/`chat extra`\n\nreach legacy argparse instead of being swallowed by the REPL. -\n**2026-05-20**🔬** Hypothesis Registry CLI**: Closes the CLI side of the Hypothesis Registry shipped backend-only on 2026-05-16.`vibe-trading hypothesis list`\n\nprints a Rich table or JSON (`--status`\n\nfilter,`--limit`\n\n);`show <id>`\n\nrenders a detail panel including linked run cards;`invalidate <id> --note \"...\"`\n\nflips status to`rejected`\n\nwhile preserving prior invalidation notes when`--note`\n\nis omitted. Honors the existing`VIBE_TRADING_HYPOTHESES_PATH`\n\nenv override and adds a per-invocation`--path`\n\n. 22 new tests cover wiring, JSON output, status filter, limit, missing-id errors, and note persistence. -\n**2026-05-19**✨** Live tool feedback + graceful cancel**: Long-running tools (backtests, large PDFs, swarm workers) no longer look frozen. Each tool call now emits a 3-second heartbeat plus structured per-stage progress —`run_backtest`\n\nshows phase markers (`validate`\n\n/`simulate`\n\n/`finalize`\n\n),`read_document`\n\nticks per page on PDF or per sheet on Excel,`read_url`\n\nmarks`fetch`\n\n/`parse`\n\n. 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`\n\nwith rAF-coalesced renders, ARIA`role=\"status\"`\n\n+ hidden native`<progress>`\n\nfor screen readers, and a determinate`ProgressRing`\n\nSVG when total is known. First`Ctrl+C`\n\nduring a CLI run now calls`agent.cancel()`\n\nfor graceful exit (current step finishes, trace closes cleanly); a second within 2s force-quits. Reusable primitives extracted along the way:`ProgressBar.tsx`\n\nand`lib/tools.ts`\n\n(shared tool-name i18n). -\n**2026-05-18**🧹** Cleanup pass + three latent bug fixes**:`CompositeEngine`\n\nno longer misroutes bare Chinese-futures codes like`RB2410`\n\nto`GlobalFuturesEngine`\n\n—`_is_china_futures`\n\nmoved into a shared`_market_hooks`\n\nmodule 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`\n\n. The Vite dev-mode proxy gained the missing`/alpha`\n\nentry so the AlphaZoo page resolves on`npm run dev`\n\n.`tests/test_e2e_harness_v2.py`\n\n(real-LLM e2e suite) is now gated behind`VIBE_TRADING_RUN_LIVE_E2E=1`\n\nso CI no longer changes shape based on env-key presence. Ruff`per-file-ignores`\n\nadded for the factor zoo (3783 → 0 F401 noise), frontend tsconfig enables`noUnusedLocals`\n\n/`noUnusedParameters`\n\nas regression guards, and 76 unused`vw = vwap(...)`\n\nboilerplate lines were dropped from`gtja191`\n\nalphas. Net**-918 LOC**. -\n**2026-05-17**🧬** Alpha Zoo v1 (0.1.8)**: 452 pre-built quant alphas across 4 zoos —`qlib158`\n\n(Microsoft Qlib, Apache-2 attribution),`alpha101`\n\n(Kakushadze 101 Formulaic Alphas, paper rewrite from arXiv:1601.00991),`gtja191`\n\n(Guotai Junan 2014 short-horizon factor report), and`academic`\n\n(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`\n\n. Ships with AST purity gate, lookahead-guard test,`pytest-socket`\n\nnetwork 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/](https://vibetrading.wiki/alpha-library/)+ research-lab post[Which of the 191 GTJA alphas still work in 2026?](https://vibetrading.wiki/research-lab/posts/alpha-191-in-2026.html). -\n**2026-05-16**🧪** Research spine update**: Added a backend Hypothesis Registry with`create_hypothesis`\n\n,`update_hypothesis`\n\n,`link_backtest`\n\n, and`search_hypotheses`\n\n; external-content readers now attach warning-only`security_warnings`\n\n; and Shadow Account scanning now uses deterministic OHLCV feature evaluation instead of the old calendar-phase stub. -\n**2026-05-15**🪪 The run detail page now surfaces the Trust Layer run card alongside metrics and artifacts, completing the UI side of the`run_card.json`\n\nwork landed on 2026-05-12.`PersistentMemory.add()`\n\nwas also hardened on length, empty/whitespace-only names, and C0/C1 control bytes from the #108/#109/#110 triage ([#112](https://github.com/HKUDS/Vibe-Trading/pull/112), thanks @Teerapat-Vatpitak). -\n**2026-05-14**🌐 the public wiki is now live at[vibetrading.wiki](https://vibetrading.wiki/)with docs, tutorials, Research Lab, and Alpha Library sections deployed through Cloudflare Pages. Persistent memory is also inspectable from the CLI via`vibe-trading memory list/show/search/forget`\n\n([#102](https://github.com/HKUDS/Vibe-Trading/pull/102), thanks @Teerapat-Vatpitak), and memory tokenization/slugs now support Thai, Arabic, Hebrew, and Cyrillic text ([#104](https://github.com/HKUDS/Vibe-Trading/pull/104)). -\n**2026-05-13**🧭 Swarm runs now ground workers with fetched market data and cleaner persisted reports ([#93](https://github.com/HKUDS/Vibe-Trading/pull/93),[#84](https://github.com/HKUDS/Vibe-Trading/pull/84)). -\n**2026-05-12**🧾 Backtests now emit`run_card.json`\n\nand`run_card.md`\n\nalongside artifacts for reproducible research runs. -\n**2026-05-11**🧭** Memory slugs, swarm accounting, and CLI preflight**: Persistent memory now preserves CJK characters when generating file slugs, preventing silent filename collisions for Chinese/Japanese/Korean notes ([#95](https://github.com/HKUDS/Vibe-Trading/pull/95), thanks @voidborne-d). Swarm run totals now prefer provider-reported token usage with the existing estimate fallback ([#94](https://github.com/HKUDS/Vibe-Trading/pull/94), thanks @Teerapat-Vatpitak), and the CLI run UI gained a startup preflight check for common environment issues ([#96](https://github.com/HKUDS/Vibe-Trading/pull/96), thanks @ykykj). -\n**2026-05-10**🧱** Regression guardrails + run metadata**: Memory recall now treats underscores as token boundaries, so snake_case saved memories such as`mcp_wiring_test`\n\nmatch natural-language queries like \"mcp wiring\" ([#87](https://github.com/HKUDS/Vibe-Trading/pull/87), thanks @hp083625). The MCP server has a subprocess smoke test covering initialize →`tools/list`\n\n→`tools/call`\n\nto guard the first-call deadlock path ([#86](https://github.com/HKUDS/Vibe-Trading/pull/86)), while low-risk hardening landed for Windows path-sensitive tests, API best-effort exception handling, backtest`run_dir`\n\nallowed-root validation, and SwarmRun provider/model metadata ([#88](https://github.com/HKUDS/Vibe-Trading/pull/88),[#90](https://github.com/HKUDS/Vibe-Trading/pull/90),[#91](https://github.com/HKUDS/Vibe-Trading/pull/91),[#92](https://github.com/HKUDS/Vibe-Trading/pull/92), thanks @Teerapat-Vatpitak). -\n**2026-05-09**🛡️** API path hardening + MCP server stability**: API run/session routes now validate path IDs before lookup, rejecting malformed newline-containing parameters and pinning the behavior in the auth/security regression suite ([#80](https://github.com/HKUDS/Vibe-Trading/pull/80), thanks @SJoon99). The MCP server now pre-warms the tool registry on the main thread before serving`tools/call`\n\n, avoiding a first-call deadlock in lazy tool discovery ([#85](https://github.com/HKUDS/Vibe-Trading/pull/85), thanks @Teerapat-Vatpitak). The Vite dev proxy also honors`VITE_API_URL`\n\nfor non-default backend targets ([#82](https://github.com/HKUDS/Vibe-Trading/pull/82), thanks @voidborne-d). -\n**2026-05-08**🧾** Tushare statement fields in filters**: A-share daily backtests can now request PIT-safe financial statement fields through`fundamental_fields`\n\n, so signal engines can screen on`income_total_revenue`\n\n,`income_n_income`\n\n,`balancesheet_total_hldr_eqy_exc_min_int`\n\n,`fina_indicator_roe`\n\n, and similar table-prefixed columns after their announcement/disclosure dates ([#76](https://github.com/HKUDS/Vibe-Trading/pull/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](https://github.com/HKUDS/Vibe-Trading/pull/77)). -\n**2026-05-07**📈** Tushare fundamentals + community triage**: Added a point-in-time`TushareFundamentalProvider`\n\ncontract for fundamental research workflows, with regression coverage for the project`TUSHARE_TOKEN`\n\nenvironment path ([#74](https://github.com/HKUDS/Vibe-Trading/pull/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`\n\nis already bundled, and treats unofficial hosted deployments as untrusted places for API keys or data-source tokens. -\n**2026-05-06**🚀** v0.1.7 released**([Release notes](https://github.com/HKUDS/Vibe-Trading/releases/tag/v0.1.7),`pip install -U vibe-trading-ai`\n\n): 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. -\n**2026-05-05**🛡️** Security boundary follow-up**: Completes the remaining security-boundary hardening around explicit CORS origins, Settings credential indicators, web URL reading, and Shadow Account code generation, with regression tests added for each path. Normal localhost CLI/Web UI workflows stay the same; remote deployments should continue using`API_AUTH_KEY`\n\nand explicit trusted origins. -\n**2026-05-04**🖥️** Interactive CLI UX + CI cleanup**: Interactive mode now has a live bottom status bar showing provider/model, session duration, last-run latency, and cumulative tool-call stats, plus prompt history navigation and cursor editing with arrow keys via`prompt_toolkit`\n\n([#69](https://github.com/HKUDS/Vibe-Trading/pull/69)). The CLI still falls back to Rich prompts when`prompt_toolkit`\n\nor a TTY is unavailable. CI path expectations were also aligned with the hardened file-import sandbox and cross-platform`/tmp`\n\nresolution, returning main to green ().`bb67dc7`\n\n-\n**2026-05-03**🛡️** Security hardening patch**: Tightens default API authentication for non-local deployments, protects sensitive run/session/swarm reads, restricts upload and local file-reading boundaries, gates shell-capable tools by entry point, validates generated strategy loading before import, and runs the Docker image as a non-root user with a localhost-only published port by default. Local CLI and localhost Web UI workflows remain low-friction; remote API/Web deployments should set`API_AUTH_KEY`\n\n. -\n**2026-05-02**🧭** Dividend analysis + sharper roadmap**: Added the`dividend-analysis`\n\nskill 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. -\n**2026-05-01**🔥** Correlation heatmap + OpenAI Codex OAuth + A-share pre-ST filter**: New correlation dashboard/API computes rolling return correlations and renders an ECharts heatmap for portfolio and symbol analysis ([#64](https://github.com/HKUDS/Vibe-Trading/pull/64)). OpenAI Codex provider support now uses ChatGPT OAuth via`vibe-trading provider login openai-codex`\n\n, with Settings metadata and adapter regression tests ([#65](https://github.com/HKUDS/Vibe-Trading/pull/65)). Added and hardened the`ashare-pre-st-filter`\n\nskill for A-share ST/*ST risk screening, including Sina penalty relevance filtering so securities-account mentions do not inflate E2 counts ([#63](https://github.com/HKUDS/Vibe-Trading/pull/63)). -\n**2026-04-30**⚙️** Web UI Settings + validation CLI hardening**: New Settings page for LLM provider/model, base URL, reasoning effort, and data source credentials, backed by local/auth-protected settings APIs and data-driven provider metadata ([#57](https://github.com/HKUDS/Vibe-Trading/pull/57)). Also hardens`python -m backtest.validation <run_dir>`\n\nso missing, blank, malformed, non-existent, and non-directory inputs fail with clear operator-facing messages before validation starts ([#60](https://github.com/HKUDS/Vibe-Trading/pull/60)). -\n**2026-04-28**🚀** v0.1.6 released**(`pip install -U vibe-trading-ai`\n\n): Fixes`vibe-trading --swarm-presets`\n\nreturning empty after`pip install`\n\n/`uv tool install`\n\n([#55](https://github.com/HKUDS/Vibe-Trading/issues/55)) — preset YAMLs now bundled inside the`src.swarm`\n\npackage and pinned by a 6-test regression suite. Plus AKShare loader correctly routes ETFs (`510300.SH`\n\n) and forex (`USDCNH`\n\n) to the right endpoints with hardened registry fallback. Rolls up everything since v0.1.5: benchmark comparison panel,`/upload`\n\nstreaming + size limits, Futu loader (HK + A-share), vnpy export skill, security hardening, frontend lazy loading (688KB → 262KB). -\n**2026-04-27**📊** Benchmark panel + upload safety**: Backtest output now ships a benchmark comparison panel (ticker / benchmark return / excess return / information ratio) with yfinance-backed resolution for SPY, CSI 300, etc. ([#48](https://github.com/HKUDS/Vibe-Trading/issues/48)). Plus`/upload`\n\nstreams the request body in 1 MB chunks and aborts past`MAX_UPLOAD_SIZE`\n\n, bounding memory under oversized/malformed clients ([#53](https://github.com/HKUDS/Vibe-Trading/pull/53)) — pinned by a 4-case regression suite. -\n**2026-04-22**🛡️** Hardening + new integrations**: Path containment enforced in`safe_path`\n\n+ journal/shadow tool sandbox,`MANIFEST.in`\n\nships`.env.example`\n\n/ 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](https://github.com/HKUDS/Vibe-Trading/pull/47)) and vnpy CtaTemplate export skill ([#46](https://github.com/HKUDS/Vibe-Trading/pull/46)). -\n**2026-04-21**🛡️** Workspace + docs**: Relative`run_dir`\n\nnormalized to active run dir ([#43](https://github.com/HKUDS/Vibe-Trading/pull/43)). README usage examples ([#45](https://github.com/HKUDS/Vibe-Trading/pull/45)). -\n**2026-04-20**🔌** Reasoning + Swarm**:`reasoning_content`\n\npreserved across all`ChatOpenAI`\n\npaths — Kimi / DeepSeek / Qwen thinking work end-to-end ([#39](https://github.com/HKUDS/Vibe-Trading/issues/39)). Swarm streaming + clean Ctrl+C ([#42](https://github.com/HKUDS/Vibe-Trading/issues/42)). -\n**2026-04-19**📦** v0.1.5**: Published to PyPI & ClawHub.`python-multipart`\n\nCVE floor bump, 5 new MCP tools wired (`analyze_trade_journal`\n\n+ 4 shadow-account tools),`pattern_recognition`\n\n→`pattern`\n\nregistry fix, Docker dep parity, SKILL manifest synced (22 MCP tools / 71 skills). -\n**2026-04-18**👥** Shadow Account**: Extract your strategy rules from a broker journal → backtest the shadow across markets → 8-section HTML/PDF report showing exactly how much you leave on the table (rule violations, early exits, missed signals, counterfactual trades). 4 new tools, 1 skill, 32 tools total. Trade Journal + Shadow Account samples now live in the web UI welcome screen. -\n**2026-04-17**📊** Trade Journal Analyzer + Universal File Reader**: Upload broker exports (同花顺/东财/富途/generic CSV) → auto trading profile (holding days, win rate, PnL ratio, drawdown) + 4 bias diagnostics (disposition effect, overtrading, chasing momentum, anchoring).`read_document`\n\nnow dispatches PDF, Word, Excel, PowerPoint, images (OCR), and 40+ text formats behind one unified call. -\n**2026-04-16**🧠** Agent Harness**: Persistent cross-session memory, FTS5 session search, self-evolving skills (full CRUD), 5-layer context compression, read/write tool batching. 27 tools, 107 new tests. -\n**2026-04-15**🤖** Z.ai + MiniMax**: Z.ai provider ([#35](https://github.com/HKUDS/Vibe-Trading/pull/35)), MiniMax temperature fix + model update ([#33](https://github.com/HKUDS/Vibe-Trading/pull/33)). 13 providers. -\n**2026-04-14**🔧** MCP Stability**: Fixed backtest tool`Connection closed`\n\nerror on stdio transport ([#32](https://github.com/HKUDS/Vibe-Trading/pull/32)). -\n**2026-04-13**🌐** Cross-Market Composite Backtest**: New`CompositeEngine`\n\nbacktests 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. -\n**2026-04-12**🌍** Multi-Platform Export**:`/pine`\n\nexports strategies to TradingView (Pine Script v6), TDX (通达信/同花顺/东方财富), and MetaTrader 5 (MQL5) in one command. -\n**2026-04-11**🛡️** Reliability & DX**:`vibe-trading init`\n\n.env bootstrap ([#19](https://github.com/HKUDS/Vibe-Trading/pull/19)), preflight checks, runtime data-source fallback, hardened backtest engine. Multi-language README ([#21](https://github.com/HKUDS/Vibe-Trading/pull/21)). -\n**2026-04-10**📦** v0.1.4**: Docker fix ([#8](https://github.com/HKUDS/Vibe-Trading/issues/8)),`web_search`\n\nMCP tool, 12 LLM providers,`akshare`\n\n/`ccxt`\n\ndeps. Published to PyPI and ClawHub. -\n**2026-04-09**📊** Backtest Wave 2**: ChinaFutures, GlobalFutures, Forex, Options v2 engines. Monte Carlo, Bootstrap CI, Walk-Forward validation. -\n**2026-04-08**🔧** Multi-market backtest**with per-market rules, Pine Script v6 export, 5 data sources with auto-fallback.\n\nVibe-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.\n\nIt 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.\n\n| Task | Output |\n|---|---|\nAsk a trading question |\nMarket research with tools, data, documents, and reusable session context. |\nBacktest a strategy idea |\nStrategy code, metrics, benchmark context, validation artifacts, and run cards. |\nReview your own trades |\nBroker-journal parsing, behavior diagnostics, rule extraction, and Shadow Account comparisons. |\nImprove repeated research |\nPersistent memory and editable skills turn useful routines into reusable workflows. |\nRun analyst teams |\nMulti-agent research reviews for investment, quant, crypto, macro, and risk workflows. |\nShip usable artifacts |\nReports, TradingView Pine Script, TDX, MetaTrader 5, MCP tools, and later research sessions. |\nBench a pre-built alpha zoo |\nOne-line IC + alive/reversed/dead categorisation across 456 alphas (Qlib 158 + Kakushadze 101 + GTJA 191 + FF5 + Carhart) on your universe. |\n\n```\npip install vibe-trading-ai\n\n# Natural-language research\nvibe-trading run -p \"Backtest a BTC-USDT 20/50 moving-average strategy for 2024, summarize return and drawdown, then export the report\"\n\n# Bench a pre-built alpha zoo (one line)\nvibe-trading alpha bench --zoo gtja191 --universe csi300 --period 2018-2025 --top 20\nvibe-trading --upload trades_export.csv\nvibe-trading run -p \"Analyze my trading behavior, extract my shadow strategy, and compare it with my actual trades\"\n```\n\nShadow Account starts from your own trading records instead of a generic strategy template.\n\nUpload a broker export, let the agent summarize your behavior, then compare the actual trading path with a rule-based shadow strategy.\n\n| Step | Agent output |\n|---|---|\n1. Read your journal |\nParses broker exports from 同花顺, 东方财富, 富途, and generic CSV formats. |\n2. Profile your behavior |\nHolding days, win rate, PnL ratio, drawdown, disposition effect, overtrading, momentum chasing, and anchoring checks. |\n3. Extract your rules |\nTurns recurring entries/exits into an explicit strategy profile instead of a hand-wavy summary. |\n4. Run the shadow |\nBacktests the extracted rules and highlights rule breaks, early exits, missed signals, and alternative trade paths. |\n5. Deliver the report |\nProduces an HTML/PDF report that can be inspected, archived, or refined in a later session. |\n\n```\nvibe-trading --upload trades_export.csv\nvibe-trading run -p \"Analyze my trading behavior, extract my shadow strategy, and compare it with my actual trades\"\n```\n\nMost runs follow the same evidence path: route the request, load the right market context, execute tools, validate outputs, and keep the artifacts inspectable.\n\n| Layer | What happens |\n|---|---|\nPlan |\nSelects the relevant finance skills, tools, data sources, and swarm preset when useful. |\nGround |\nPulls A-shares, HK/US equities, crypto, futures, forex, documents, or web context through the available loaders. |\nExecute |\nGenerates testable strategy code, runs tools, and uses the matching backtest engine or analysis workflow. |\nValidate |\nAdds metrics, benchmark comparison, Monte Carlo, Bootstrap, Walk-Forward, run cards, and warnings where applicable. |\nDeliver |\nReturns reports, artifacts, tool traces, and exports for TradingView, TDX, MetaTrader 5, MCP clients, or later sessions. |\n\nOne `get_market_data`\n\ncall, **18 market-data sources**. Set `source: \"auto\"`\n\n— the loader picks by symbol, then walks a per-market chain ordered by **IP-ban risk**: never-banned public sources first, throttled / key-gated ones last. Zero config, no single point of failure.\n\n| Source | Markets | Auth | Role |\n|---|---|---|---|\n`tencent` · `mootdx` |\nA-share | none | never IP-banned (`mootdx` = 通达信 TCP) |\n`eastmoney` |\nA / US / HK | none | OHLCV + deep fundamentals & flow tools (throttled) |\n`baostock` · `akshare` |\nA (+ US/HK/futures/macro/fx) | none | free fallbacks |\n`tushare` |\nA / futures / fund / macro | token | richest A-share |\n`yahoo` · `sina` · `stooq` |\nUS (/HK) | none | direct chart/quotes/options · K-line to 1984 · EOD CSV |\n`yfinance` |\nUS / HK | none | wrapper |\n`finnhub` · `alphavantage` · `tiingo` · `fmp` |\nUS | key | optional providers |\n`okx` · `ccxt` |\ncrypto | none | OKX + 100+ exchanges |\n`futu` |\nHK / A | OpenD | optional local FutuOpenD |\n`local` |\nany | none | your own CSV / Parquet / DuckDB via `local:` prefix |\n\n**Fallback chains (by IP-ban risk):**\n\n**A-share**→`tencent`\n\n·`mootdx`\n\n·`eastmoney`\n\n·`baostock`\n\n·`akshare`\n\n·`tushare`\n\n·`local`\n\n**US**→`yahoo`\n\n·`stooq`\n\n·`sina`\n\n·`eastmoney`\n\n·`yfinance`\n\n·`tiingo`\n\n·`fmp`\n\n·`finnhub`\n\n·`alphavantage`\n\n·`akshare`\n\n·`local`\n\n**HK**→`eastmoney`\n\n·`yahoo`\n\n·`futu`\n\n·`yfinance`\n\n·`akshare`\n\n·`local`\n\n**Crypto**→`okx`\n\n·`ccxt`\n\n·`yfinance`\n\n·`local`\n\n·*(futures / fund / macro / forex →*`tushare`\n\n/`akshare`\n\n→`local`\n\n)\n\nBeyond OHLCV, **18 read-only data tools** reach into fundamentals & flow — fund flow, dragon-tiger, northbound, margin, block trades, shareholder count, lockup, sector, research reports, news, SEC filings, financial statements, options chains, institutional holdings, market screening, symbol search, and macro — all exposed over MCP. An explicit `local:`\n\nsymbol never silently falls back to a network source.\n\nDetailed inventories are folded below to keep the main README scannable. Open them when you want to inspect the available building blocks.\n\n**Finance Skill Library** 79 skills across 8 categories\n\n- 📊 79 specialized finance skills organized into 8 categories\n- 🌐 Complete coverage from traditional markets to crypto & DeFi\n- 🔬 Comprehensive capabilities spanning data sourcing to quantitative research\n\n| Category | Skills | Examples |\n|---|---|---|\n| Data Source | 9 | `data-routing` , `tushare` , `yfinance` , `okx-market` , `akshare` , `mootdx` , `ccxt` , `eastmoney` , `sec-edgar` |\n| Strategy | 17 | `strategy-generate` , `cross-market-strategy` , `technical-basic` , `candlestick` , `ichimoku` , `elliott-wave` , `smc` , `multi-factor` , `ml-strategy` |\n| Analysis | 17 | `factor-research` , `macro-analysis` , `global-macro` , `valuation-model` , `earnings-forecast` , `credit-analysis` , `dividend-analysis` |\n| Asset Class | 9 | `options-strategy` , `options-advanced` , `convertible-bond` , `etf-analysis` , `asset-allocation` , `sector-rotation` |\n| Crypto | 7 | `perp-funding-basis` , `liquidation-heatmap` , `stablecoin-flow` , `defi-yield` , `onchain-analysis` |\n| Flow | 7 | `hk-connect-flow` , `us-etf-flow` , `edgar-sec-filings` , `financial-statement` , `adr-hshare` |\n| Tool | 11 | `backtest-diagnose` , `report-generate` , `pine-script` , `doc-reader` , `web-reader` , `vnpy-export` , `alpha-zoo` |\n| Risk Analysis | 1 | `ashare-pre-st-filter` |\n\n**Custom Data Source** register your own historical OHLCV loader\n\nNeed a market or vendor we don't ship a loader for? Add your own historical-bar\nloader and select it with `source=\"<name>\"`\n\n. The steps edit package source, so\nrun from a clone (`pip install -e .`\n\n).\n\n-\n**Write the loader**— create`agent/backtest/loaders/<name>_loader.py`\n\nwith a class that satisfies`DataLoaderProtocol`\n\n(duck-typed, no base class needed) and is tagged with`@register`\n\n:\n\n``` python\nimport pandas as pd\nfrom backtest.loaders.registry import register\n\n@register\nclass DataLoader:\n    name = \"mysource\"            # the value you pass as source=\n    markets = {\"us_equity\"}      # a_share/us_equity/hk_equity/crypto/futures/fund/macro/forex\n    requires_auth = False\n\n    def is_available(self) -> bool:\n        return True              # token present? network reachable?\n\n    def fetch(self, codes, start_date, end_date, *, interval=\"1D\", fields=None):\n        # return {symbol: DataFrame indexed by trade_date,\n        #         columns: open, high, low, close, volume}\n        ...\n```\n\n-\n**Register the module** so`@register`\n\nfires — add`\"backtest.loaders.<name>_loader\"`\n\nto`_loader_modules`\n\nin`agent/backtest/loaders/registry.py`\n\n. -\n**Allow the name** through config validation — add`\"mysource\"`\n\nto`_VALID_SOURCES`\n\nin`agent/backtest/runner.py`\n\n. -\n*(Optional)*slot it into a market's`FALLBACK_CHAINS`\n\nin`registry.py`\n\nso`source=\"auto\"`\n\ncan reach it. -\n**Use it**—`source=\"mysource\"`\n\nin a backtest config, or via the CLI / agent.\n\nReal-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`\n\n/`binance`\n\n/`ccxt`\n\nfor crypto,`futu`\n\n/`tiger`\n\nfor equities.\n\n**Preset Trading Teams** 29 swarm presets\n\n- 🏢 29 ready-to-use agent teams\n- ⚡ Pre-configured finance workflows\n- 🎯 Investment, trading & risk management presets\n\n| Preset | Workflow |\n|---|---|\n`investment_committee` |\nBull/bear debate → risk review → PM final call |\n`global_equities_desk` |\nA-share + HK/US + crypto researcher → global strategist |\n`crypto_trading_desk` |\nFunding/basis + liquidation + flow → risk manager |\n`earnings_research_desk` |\nFundamental + revision + options → earnings strategist |\n`macro_rates_fx_desk` |\nRates + FX + commodity → macro PM |\n`quant_strategy_desk` |\nScreening + factor research → backtest → risk audit |\n`technical_analysis_panel` |\nClassic TA + Ichimoku + harmonic + Elliott + SMC → consensus |\n`risk_committee` |\nDrawdown + tail risk + regime review → sign-off |\n`global_allocation_committee` |\nA-shares + crypto + HK/US → cross-market allocation |\n\nPlus 20+ additional specialist presets — run vibe-trading --swarm-presets to explore all.\n\n**Alpha Zoo** 456 pre-built quant alphas across 4 zoos\n\n- 🧬 456 cross-sectional alphas, lookahead-banned at the operator layer\n- 📈 IC + IR + alive/reversed/dead categorisation in one CLI command\n- 🔬 AST purity gate + 300-row lookahead sentinel test +\n`pytest-socket`\n\nnetwork kill-switch - 📦 Apache-2 attribution for Qlib; per-zoo\n`LICENSE.md`\n\ndeclaring formulas as mathematical content - 🤝 Developer Certificate of Origin (DCO) sign-off workflow for community PRs\n\n| Zoo | Count | Source | License |\n|---|---|---|---|\nqlib158 |\n154 | Microsoft Qlib `Alpha158` (Apache-2.0, commit-pinned) |\nApache-2.0 |\nalpha101 |\n101 | Kakushadze (2015), \"101 Formulaic Alphas\", arXiv:1601.00991 | Formulas are mathematical content |\ngtja191 |\n191 | Guotai Junan (2014), \"191 Short-period Trading Alpha Factors\" | Formulas are mathematical content |\nacademic |\n10 | Fama-French 5 + Carhart momentum + Jegadeesh reversal + George-Hwang 52-week-high + Amihud illiquidity + Harvey-Siddique skew (price-based proxies) | Public academic literature |\n\nRun `vibe-trading alpha list`\n\nto browse, `vibe-trading alpha show <id>`\n\nfor formulas + source, `vibe-trading alpha bench --zoo X --universe Y --period Z`\n\nto score a whole zoo.\n\n## cli_sm.mp4 |\n## frontend_sm.mp4 |\n☝️ Natural-language backtest & multi-agent swarm debate — Web UI + CLI |\n\n```\npip install vibe-trading-ai\n```\n\nThen run a first research task:\n\n```\nvibe-trading init\nvibe-trading run -p \"Backtest a BTC-USDT 20/50 moving-average strategy for 2024 and summarize return and drawdown\"\n```\n\nUpgrading from an older version?0.1.10 moved to LangChain 1.x. If imports break after`pip install -U vibe-trading-ai`\n\nover a pre-0.1.10 install (e.g. langgraph fails to import), recreate the venv or run`pip install --force-reinstall vibe-trading-ai`\n\n. A fresh install is unaffected.\n\nPackage name vs commands:The PyPI package is`vibe-trading-ai`\n\n. Once installed, you get three commands:\n\nCommand Purpose `vibe-trading`\n\nInteractive CLI / TUI `vibe-trading serve`\n\nLaunch FastAPI web server `vibe-trading-mcp`\n\nStart MCP server (for Claude Desktop, OpenClaw, Cursor, etc.)\n\n```\nvibe-trading init              # interactive .env setup\nvibe-trading                   # launch CLI\nvibe-trading serve --port 8899 # launch web UI\nvibe-trading-mcp               # start MCP server (stdio)\n```\n\n| Path | Best for | Time |\n|---|---|---|\nA. Docker |\nTry it now, zero local setup | 2 min |\nB. Local install |\nDevelopment, full CLI access | 5 min |\nC. MCP plugin |\nPlug into your existing agent | 3 min |\nD. ClawHub |\nOne command, no cloning | 1 min |\n\n- An\n**LLM API key** from any supported provider — or run locally with**Ollama**(no key needed) **Python 3.11+** for Path B**Docker** for Path A- OpenAI Codex can also be used with ChatGPT OAuth: set\n`LANGCHAIN_PROVIDER=openai-codex`\n\n, then run`vibe-trading provider login openai-codex`\n\n. This does not use`OPENAI_API_KEY`\n\n.\n\nSupported LLM providers:OpenRouter, OpenAI, DeepSeek, Gemini, Groq, DashScope/Qwen, Zhipu, Moonshot/Kimi, MiniMax, Xiaomi MIMO, Z.ai, Ollama (local). See`.env.example`\n\nfor config.\n\nTip: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.\n\n```\ngit clone https://github.com/HKUDS/Vibe-Trading.git\ncd Vibe-Trading\ncp agent/.env.example agent/.env\n# Edit agent/.env — uncomment your LLM provider and set API key\ndocker compose up --build\n```\n\nOpen `http://localhost:8899`\n\n. Backend + frontend in one container.\n\nDocker publishes the backend on `127.0.0.1:8899`\n\nby 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`\n\nand send `Authorization: Bearer <key>`\n\nfrom clients.\n\nNote\n\n**Using Ollama with Docker:** the container reaches a host-side Ollama via `host.docker.internal`\n\n, not `localhost`\n\n(inside the container `localhost`\n\nis the container itself). `docker-compose.yml`\n\ndefaults `OLLAMA_BASE_URL`\n\nto `http://host.docker.internal:11434`\n\n; export `OLLAMA_BASE_URL`\n\n(or set it in a top-level `.env`\n\n) to point elsewhere. This relies on the `host-gateway`\n\nmapping in `extra_hosts`\n\n, which requires **Docker Engine ≥ 20.10 / Compose v2** (provided automatically on Docker Desktop).\n\nYour 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`\n\nkeeps them. They are deleted only by `docker compose down -v`\n\n.\n\n```\ngit clone https://github.com/HKUDS/Vibe-Trading.git\ncd Vibe-Trading\npython -m venv .venv\n\n# Activate\nsource .venv/bin/activate          # Linux / macOS\n# .venv\\Scripts\\Activate.ps1       # Windows PowerShell\n\npip install -e .\ncp agent/.env.example agent/.env   # Edit — set your LLM provider API key\nvibe-trading                       # Launch interactive TUI\n```\n\n**Start web UI (optional)**\n\n```\n# Terminal 1: API server\nvibe-trading serve --port 8899\n\n# Terminal 2: Frontend dev server\ncd frontend && npm install && npm run dev\n```\n\nOpen `http://localhost:5899`\n\n. The frontend proxies API calls to `localhost:8899`\n\n.\n\n**Production mode (single server):**\n\n```\ncd frontend && npm run build && cd ..\nvibe-trading serve --port 8899     # FastAPI serves dist/ as static files\n```\n\n[!NOTE]\n\n`vibe-trading serve`\n\nbinds`0.0.0.0`\n\nand is loopback-only by default: opening the UI on thesame machine(`http://localhost:8899`\n\n) works with zero config. If you browse fromanother machine, a VM host, or a phone on your LAN, sensitive endpoints return`403`\n\nand the chat shows \"Remote API access requires an API key\" — set a strong`API_AUTH_KEY`\n\nin`agent/.env`\n\n, restart, and enter the same key once inSettings. (Docker Desktop's host gateway: set`VIBE_TRADING_TRUST_DOCKER_LOOPBACK=1`\n\nwith the default`127.0.0.1`\n\nport bind.)\n\nSee [MCP Plugin](#-mcp-plugin) section below.\n\n```\nnpx clawhub@latest install vibe-trading --force\n```\n\nThe skill + MCP config is downloaded into your agent's skills directory. See [ClawHub install](#-mcp-plugin) for details.\n\nCopy `agent/.env.example`\n\nto `agent/.env`\n\nand uncomment the provider block you want. Each provider needs 3-4 variables:\n\n| Variable | Required | Description |\n|---|---|---|\n`LANGCHAIN_PROVIDER` |\nYes | Provider name (`openrouter` , `deepseek` , `groq` , `ollama` , etc.) |\n`<PROVIDER>_API_KEY` |\nYes* | API key (`OPENROUTER_API_KEY` , `DEEPSEEK_API_KEY` , etc.) |\n`<PROVIDER>_BASE_URL` |\nYes | API endpoint URL |\n`LANGCHAIN_MODEL_NAME` |\nYes | Model name (e.g. `deepseek-v4-pro` ) |\n`TUSHARE_TOKEN` |\nNo | Tushare Pro token for A-share data (falls back to AKShare) |\n`TIMEOUT_SECONDS` |\nNo | LLM call timeout, default 120s |\n`API_AUTH_KEY` |\nRecommended for network deployments | Bearer token required when the API is reachable from non-local clients |\n`VIBE_TRADING_ENABLE_SHELL_TOOLS` |\nNo | Explicit opt-in for shell-capable tools in remote API/MCP-SSE style deployments |\n`VIBE_TRADING_ALLOWED_FILE_ROOTS` |\nNo | Extra comma-separated roots for document and broker-journal imports |\n`VIBE_TRADING_ALLOWED_RUN_ROOTS` |\nNo | Extra comma-separated roots for generated-code run directories |\n`CONTENT_FILTER_WARNING_THRESHOLD` |\nNo | Content-filter warning ratio threshold (default 0.05 = 5%). When the ratio of LLM responses blocked by content moderation exceeds this, the run card warns you to switch providers. |\n\n* Ollama does not require an API key. OpenAI Codex uses ChatGPT OAuth and stores tokens via oauth-cli-kit, not in agent/.env.\n\n**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.\n\nVibe-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.\n\n| Tier | Examples | When to use |\n|---|---|---|\nBest |\n`anthropic/claude-opus-4.7` , `anthropic/claude-sonnet-4.6` , `openai/gpt-5.5-pro` , `google/gemini-3.5-flash` |\nComplex swarms (3+ agents), long research sessions, paper-grade analysis |\nSweet spot (default) |\n`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` |\nDaily driver — reliable tool-calling at ~1/10 the cost |\nAvoid for agent use |\n`*-nano` , `*-flash-lite` , `*-coder-next` , small / distilled variants |\nTool-calling is unreliable — the agent will appear to \"answer from memory\" instead of loading skills or running backtests |\n\nThe default `agent/.env.example`\n\nships with DeepSeek official API + `deepseek-v4-pro`\n\n; OpenRouter users can use `deepseek/deepseek-v4-pro`\n\n.\n\nThe interactive TUI (`vibe-trading`\n\n) 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`\n\n, pipes, and `--json`\n\nremain script-friendly.\n\n```\nvibe-trading               # interactive TUI\nvibe-trading run -p \"...\"  # single run\nvibe-trading serve         # API server\nvibe-trading alpha list    # browse 456 pre-built alphas; show / bench / compare / export-manifest sub-commands available\nvibe-trading provider doctor  # print redacted provider/proxy/package diagnostics\n```\n\n**Slash commands inside TUI**\n\n| Command | Description |\n|---|---|\n`/help` |\nShow all commands |\n`/skills` |\nList all 79 finance skills |\n`/swarm` |\nList 29 swarm team presets |\n`/swarm run <preset> [vars_json]` |\nRun a swarm team with live streaming |\n`/swarm list` |\nSwarm run history |\n`/swarm show <run_id>` |\nSwarm run details |\n`/swarm cancel <run_id>` |\nCancel a running swarm |\n`/list` |\nRecent runs |\n`/show <run_id>` |\nRun details + metrics |\n`/code <run_id>` |\nGenerated strategy code |\n`/pine <run_id>` |\nExport indicators (TradingView + TDX + MT5) |\n`/trace <run_id>` |\nFull execution replay |\n`/continue <run_id> <prompt>` |\nContinue a run with new instructions |\n`/sessions` |\nList chat sessions |\n`/settings` |\nShow runtime config |\n`/clear` |\nClear screen |\n`/quit` |\nExit |\n\n**Single run & flags**\n\n```\nvibe-trading run -p \"Backtest BTC-USDT MACD strategy, last 30 days\"\nvibe-trading run -p \"Analyze AAPL momentum\" --json\nvibe-trading run -f strategy.txt\necho \"Backtest 000001.SZ RSI\" | vibe-trading run\nvibe-trading -p \"your prompt\"\nvibe-trading --skills\nvibe-trading --swarm-presets\nvibe-trading --swarm-run investment_committee '{\"topic\":\"BTC outlook\"}'\nvibe-trading --list\nvibe-trading --show <run_id>\nvibe-trading --code <run_id>\nvibe-trading --pine <run_id>           # Export indicators (TradingView + TDX + MT5)\nvibe-trading --trace <run_id>\nvibe-trading --continue <run_id> \"refine the strategy\"\nvibe-trading --upload report.pdf\nvibe-trading alpha list --zoo gtja191 --limit 10\nvibe-trading alpha show gtja191_171\nvibe-trading alpha bench --zoo gtja191 --universe csi300 --period 2018-2025 --top 20\n# Moving average crossover on US equities\nvibe-trading run -p \"Backtest a 20/50-day moving average crossover on AAPL for the past year, show Sharpe ratio and max drawdown\"\n\n# RSI mean-reversion on crypto\nvibe-trading run -p \"Test RSI(14) mean-reversion on BTC-USDT: buy below 30, sell above 70, last 6 months\"\n\n# Multi-factor strategy on A-shares\nvibe-trading run -p \"Backtest a momentum + value + quality multi-factor strategy on CSI 300 constituents over 2 years\"\n\n# After backtesting, export to TradingView / TDX / MetaTrader 5\nvibe-trading --pine <run_id>\n```\n\n**Bench a pre-built alpha zoo** (one line):\n\n```\nvibe-trading alpha bench --zoo gtja191 --universe csi300 --period 2018-2025 --top 20\n```\n\n**Browse the catalogue** and inspect a single alpha:\n\n```\nvibe-trading alpha list --zoo gtja191 --theme reversal --limit 10\nvibe-trading alpha show gtja191_171\n```\n\n**Compose a multi-factor signal** from the zoo (Python):\n\n``` python\nfrom src.skills.multi_factor.zoo_signal_engine import ZooSignalEngine\nengine = ZooSignalEngine.from_zoo([\"gtja191_171\", \"gtja191_111\", \"gtja191_163\"])\npanel = ...  # your wide OHLCV panel\nsignal = engine.compute_signal(panel)\n# Equity deep-dive\nvibe-trading run -p \"Research NVDA: earnings trend, analyst consensus, option flow, and key risks for next quarter\"\n\n# Macro analysis\nvibe-trading run -p \"Analyze the current Fed rate path, USD strength, and impact on EM equities and gold\"\n\n# Crypto on-chain\nvibe-trading run -p \"Deep dive BTC on-chain: whale flows, exchange balances, miner activity, and funding rates\"\n# Bull/bear debate on a stock\nvibe-trading --swarm-run investment_committee '{\"topic\": \"Is TSLA a buy at current levels?\"}'\n\n# Quant strategy from screening to backtest\nvibe-trading --swarm-run quant_strategy_desk '{\"universe\": \"S&P 500\", \"horizon\": \"3 months\"}'\n\n# Crypto desk: funding + liquidation + flow → risk manager\nvibe-trading --swarm-run crypto_trading_desk '{\"asset\": \"ETH-USDT\", \"timeframe\": \"1w\"}'\n\n# Global macro portfolio allocation\nvibe-trading --swarm-run macro_rates_fx_desk '{\"focus\": \"Fed pivot impact on EM bonds\"}'\n# Save your preferences once\nvibe-trading run -p \"Remember: I prefer RSI-based strategies, max 10% drawdown, hold period 5–20 days\"\n\n# The agent recalls them in future sessions automatically\nvibe-trading run -p \"Build a crypto strategy that fits my risk profile\"\n# Analyze a broker export or earnings report\nvibe-trading --upload trades_export.csv\nvibe-trading run -p \"Profile my trading behavior and identify any biases\"\n\nvibe-trading --upload NVDA_Q1_earnings.pdf\nvibe-trading run -p \"Summarize the key risks and beats/misses from this earnings report\"\nvibe-trading serve --port 8899\n```\n\n| Method | Endpoint | Description |\n|---|---|---|\n`GET` |\n`/runs` |\nList runs |\n`GET` |\n`/runs/{run_id}` |\nRun details |\n`GET` |\n`/runs/{run_id}/pine` |\nMulti-platform indicator export |\n`POST` |\n`/sessions` |\nCreate session |\n`POST` |\n`/sessions/{id}/messages` |\nSend message |\n`GET` |\n`/sessions/{id}/events` |\nSSE event stream |\n`POST` |\n`/upload` |\nUpload PDF/file |\n`GET` |\n`/swarm/presets` |\nList swarm presets |\n`POST` |\n`/swarm/runs` |\nStart swarm run |\n`GET` |\n`/swarm/runs/{id}/events` |\nSwarm SSE stream |\n`GET` |\n`/alpha/list` |\nList alphas (filter by zoo/theme/universe) |\n`GET` |\n`/alpha/{alpha_id}` |\nAlpha metadata + source code |\n`POST` |\n`/alpha/bench` |\nStart a bench job (returns `job_id` ) |\n`GET` |\n`/alpha/bench/{job_id}/stream` |\nSSE progress stream |\n`GET` |\n`/settings/llm` |\nRead Web UI LLM settings |\n`PUT` |\n`/settings/llm` |\nUpdate local LLM settings |\n`GET` |\n`/settings/data-sources` |\nRead local data source settings |\n`PUT` |\n`/settings/data-sources` |\nUpdate local data source settings |\n`POST` |\n`/scheduled-runs` |\nCreate a scheduled research job (interval-ms or cron) |\n`GET` |\n`/scheduled-runs` |\nList scheduled jobs |\n`DELETE` |\n`/scheduled-runs/{job_id}` |\nCancel a scheduled job |\n\nInteractive docs: `http://localhost:8899/docs`\n\nFor localhost development, `vibe-trading serve`\n\nkeeps the browser workflow simple. For any non-local client, sensitive API endpoints require `API_AUTH_KEY`\n\n; use `Authorization: Bearer <key>`\n\nfor JSON/upload requests. Browser EventSource streams are handled by the Web UI after you enter the same key once in Settings.\n\nShell-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`\n\n. Document and journal readers are limited to upload/import roots by default; place files under `agent/uploads`\n\n, `agent/runs`\n\n, `./uploads`\n\n, `./data`\n\n, `~/.vibe-trading/uploads`\n\n, or `~/.vibe-trading/imports`\n\n, or add a dedicated directory through `VIBE_TRADING_ALLOWED_FILE_ROOTS`\n\n.\n\nThe 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`\n\n; provider defaults are loaded from `agent/src/providers/llm_providers.json`\n\n.\n\nSettings reads are side-effect free: `GET /settings/llm`\n\nand `GET /settings/data-sources`\n\nnever create `agent/.env`\n\n, 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`\n\nwhen configured. If `API_AUTH_KEY`\n\nis unset for dev mode, settings access is accepted only from loopback clients.\n\nRun a research prompt or backtest on a repeating schedule. The background executor is **off by default** — start the server with `VIBE_TRADING_ENABLE_SCHEDULER=1`\n\nto enable it:\n\n```\nVIBE_TRADING_ENABLE_SCHEDULER=1 vibe-trading serve --port 8899\n```\n\nThen create jobs over REST. `schedule`\n\nis either a bare integer (interval in **milliseconds**) or a 5-field cron expression (`min hour dom mon dow`\n\n):\n\n```\n# every 6 hours (cron)\ncurl -X POST http://localhost:8899/scheduled-runs \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"prompt\":\"Scan CSI300 for momentum breakouts and backtest the top 5\",\"schedule\":\"0 */6 * * *\"}'\n\n# list / cancel\ncurl http://localhost:8899/scheduled-runs\ncurl -X DELETE http://localhost:8899/scheduled-runs/<job_id>\n```\n\nEach fire runs the `prompt`\n\nthrough a fresh agent session (optional backtest parameters go in `config`\n\n), and jobs persist under `~/.vibe-trading/`\n\nso they survive restarts. Without the flag, the `/scheduled-runs`\n\nendpoints still record jobs but nothing fires. Add `-H \"Authorization: Bearer <key>\"`\n\nto each call when `API_AUTH_KEY`\n\nis set.\n\nVibe-Trading exposes 54 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`\n\nneeds an LLM key.\n\n**Claude Desktop**\n\nAdd to `claude_desktop_config.json`\n\n:\n\n```\n{\n  \"mcpServers\": {\n    \"vibe-trading\": {\n      \"command\": \"vibe-trading-mcp\"\n    }\n  }\n}\n```\n\n**OpenClaw**\n\nAdd to `~/.openclaw/config.yaml`\n\n:\n\n```\nskills:\n  - name: vibe-trading\n    command: vibe-trading-mcp\n```\n\nFor a first research-only smoke test, confirm tool discovery and run a market\ndata or backtest request before selecting a trading connector profile. Core\nresearch tools can run without broker credentials; connector-backed `trading_*`\n\ntools should be used only after you intentionally select and check a connector\nprofile. `run_swarm`\n\nrequires an LLM key.\n\n**Cursor / Windsurf / other MCP clients**\n\n```\nvibe-trading-mcp                  # stdio (default)\nvibe-trading-mcp --transport sse  # SSE for web clients\n```\n\n**MCP tools exposed (54):** `list_skills`\n\n, `load_skill`\n\n, `start_research_goal`\n\n, `get_research_goal`\n\n, `add_goal_evidence`\n\n, `update_research_goal_status`\n\n, `backtest`\n\n, `factor_analysis`\n\n, `analyze_options`\n\n, `pattern_recognition`\n\n, `read_url`\n\n, `read_document`\n\n, `web_search`\n\n, `write_file`\n\n, `read_file`\n\n, `trading_connections`\n\n, `trading_select_connection`\n\n, `trading_check`\n\n, `trading_account`\n\n, `trading_positions`\n\n, `trading_orders`\n\n, `trading_quote`\n\n, `trading_history`\n\n, `list_swarm_presets`\n\n, `run_swarm`\n\n, `get_market_data`\n\n, `get_fund_flow`\n\n, `get_dragon_tiger`\n\n, `get_northbound_flow`\n\n, `get_margin_trading`\n\n, `get_block_trades`\n\n, `get_shareholder_count`\n\n, `get_lockup_expiry`\n\n, `get_sector_info`\n\n, `get_research_reports`\n\n, `get_stock_news`\n\n, `get_sec_filings`\n\n, `get_financial_statements`\n\n, `get_options_chain`\n\n, `get_stock_profile`\n\n, `screen_market`\n\n, `search_symbol`\n\n, `get_macro_series`\n\n, `iwencai_search`\n\n, `get_swarm_status`\n\n, `get_run_result`\n\n, `list_runs`\n\n, `reap_stale_runs`\n\n, `retry_run`\n\n, `analyze_trade_journal`\n\n, `extract_shadow_strategy`\n\n, `run_shadow_backtest`\n\n, `render_shadow_report`\n\n, `scan_shadow_signals`\n\n.\n\n`run_swarm`\n\nworkers can call operator-approved tools from external MCP servers. Configure the server-side allowlist in `VIBE_TRADING_SWARM_AGENT_CONFIG`\n\n, `~/.vibe-trading/swarm-agent.json`\n\n, or the fallback `~/.vibe-trading/agent.json`\n\n; then list remote tools in a swarm preset using the local MCP wrapper name, such as `mcp_internal_kb_search`\n\n. Caller-provided `variables`\n\nstay template data only and cannot inject MCP URLs, commands, environment variables, or allowlist overrides.\n\n**Install from ClawHub (one command)**\n\n```\nnpx clawhub@latest install vibe-trading --force\n```\n\n`--force`\n\nis required because the skill references external APIs, which triggers VirusTotal's automated scan. The code is fully open-source and safe to inspect.\n\nThis downloads the skill + MCP config into your agent's skills directory. No cloning needed.\n\nBrowse on ClawHub: [clawhub.ai/skills/vibe-trading](https://clawhub.ai/skills/vibe-trading)\n\n**OpenSpace — self-evolving skills**\n\nAll 79 finance skills are published on [open-space.cloud](https://open-space.cloud) and evolve autonomously through OpenSpace's self-evolution engine.\n\nTo use with OpenSpace, add both MCP servers to your agent config:\n\n```\n{\n  \"mcpServers\": {\n    \"openspace\": {\n      \"command\": \"openspace-mcp\",\n      \"toolTimeout\": 600,\n      \"env\": {\n        \"OPENSPACE_HOST_SKILL_DIRS\": \"/path/to/vibe-trading/agent/src/skills\",\n        \"OPENSPACE_WORKSPACE\": \"/path/to/OpenSpace\"\n      }\n    },\n    \"vibe-trading\": {\n      \"command\": \"vibe-trading-mcp\"\n    }\n  }\n}\n```\n\nOpenSpace will auto-discover all 79 skills, enabling auto-fix, auto-improve, and community sharing. Search for Vibe-Trading skills via `search_skills(\"finance backtest\")`\n\nin any OpenSpace-connected agent.\n\nThis is the opposite direction from the MCP Plugin above.The MCP Plugin letsotheragents call Vibe-Trading tools. This section lets thebuilt-inVibe-Trading agent call tools fromyourexternal MCP servers.\n\nCreate `~/.vibe-trading/agent.json`\n\n:\n\n```\n{\n  \"mcpServers\": {\n    \"my-server\": {\n      \"command\": \"uvx\",\n      \"args\": [\"my-mcp-server\"]\n    }\n  }\n}\n```\n\nRun any CLI command — tools from ordinary external servers are automatically injected into the agent's registry after local tools:\n\n```\nvibe-trading run \"use my-server to do X\"\n```\n\nVibe-Trading can connect directly to Interactive Brokers' official remote MCP\nendpoint in read-only mode. Add this to `~/.vibe-trading/agent.json`\n\n:\n\n```\n{\n  \"mcpServers\": {\n    \"ibkr\": {\n      \"type\": \"streamableHttp\",\n      \"url\": \"https://api.ibkr.com/v1/api/mcp\",\n      \"auth\": {\n        \"type\": \"oauth\",\n        \"scopes\": [\"mcp.read\"],\n        \"clientName\": \"Vibe-Trading\",\n        \"cacheDir\": \"~/.vibe-trading/live/ibkr/oauth\"\n      },\n      \"enabledTools\": [\"*\"]\n    }\n  }\n}\n```\n\nThen start the browser OAuth flow:\n\n```\nvibe-trading connector authorize ibkr-live-official-mcp-readonly\n```\n\nThe wildcard is accepted only for IBKR's `mcp.read`\n\nprobe. Authorizing this\nprofile confirms access to IBKR's official read scope; generic `trading_account`\n\nand `trading_positions`\n\ncalls stay disabled until IBKR publishes stable read\ntool names that Vibe-Trading can map safely. A config that adds `mcp.write`\n\nmust\npin an explicit tool allowlist and still passes through the live order guard.\n\nIf IBKR issues a pre-registered OAuth client, add `clientId`\n\nand `clientSecret`\n\ninside `auth`\n\n.\n\nFor users who cannot wait for IBKR OAuth client approval, connect to a local\nTWS or IB Gateway session. Credentials stay inside IBKR's desktop app; Vibe-\nTrading only connects to `127.0.0.1`\n\nand exposes it as a connector profile.\n\nInstall the optional SDK:\n\n```\npip install \"vibe-trading-ai[ibkr]\"\n```\n\nOpen TWS paper trading or IB Gateway paper, enable API socket clients, then run:\n\n```\nvibe-trading connector list\nvibe-trading connector use ibkr-paper-local\nvibe-trading connector configure ibkr-paper-local --yes\nvibe-trading connector check\nvibe-trading connector account\nvibe-trading connector positions\nvibe-trading connector orders\nvibe-trading connector quote AAPL\nvibe-trading connector history AAPL --duration \"30 D\" --bar-size \"1 day\"\n```\n\nDefault local ports:\n\n| App | Paper | Live read-only |\n|---|---|---|\n| TWS | `7497` |\n`7496` |\n| IB Gateway | `4002` |\n`4001` |\n\nThe agent exposes connector-scoped tools named `trading_connections`\n\n,\n`trading_select_connection`\n\n, `trading_check`\n\n, `trading_account`\n\n,\n`trading_positions`\n\n, `trading_orders`\n\n, `trading_quote`\n\n, and `trading_history`\n\n.\nLive-broker raw MCP tools are not registered directly as `mcp_<broker>_*`\n\n.\nNo IBKR order-placement tool is registered.\n\n| Field | Type | Default | Description |\n|---|---|---|---|\n`type` |\nstring | inferred for stdio; required for HTTP | Omit for stdio, or set to `sse` / `streamableHttp` for URL-based servers. |\n`command` |\nstring | required for stdio | Executable to spawn for stdio servers. Invalid for `sse` / `streamableHttp` servers. |\n`args` |\narray | `[]` |\nCommand-line arguments for stdio servers only. |\n`env` |\nobject | `{}` |\nExtra environment variables merged into the subprocess env for stdio servers only. |\n`url` |\nstring | required for `sse` / `streamableHttp` |\nRemote SSE / streamable HTTP endpoint URL. Not used for stdio servers. |\n`headers` |\nobject | `{}` |\nExtra HTTP headers for `sse` / `streamableHttp` servers only. |\n`toolTimeout` |\nnumber | `30` |\nPer-tool call timeout in seconds |\n`initTimeout` |\nnumber | unset (`max(toolTimeout, 30)` ) |\nMCP initialize / OAuth authorization timeout in seconds. Use this for slow browser authorization without widening ordinary tool calls. |\n`enabledTools` |\narray | `[\"*\"]` |\nTool allowlist. Use `[\"*\"]` to expose all tools from the server |\n\nConfig file location: `~/.vibe-trading/agent.json`\n\n(JSON or YAML).\n\nFor URL-based transports, `type`\n\nis required. The agent no longer guesses between SSE and streamable HTTP from the URL suffix.\n\nWhen creating a session via the API you can pass `mcpServers`\n\ninside `session.config`\n\nto extend or override the global config for that session only:\n\n```\n{\n  \"config\": {\n    \"mcpServers\": {\n      \"research-server\": {\n        \"command\": \"uvx\",\n        \"args\": [\"research-mcp\"],\n        \"enabledTools\": [\"search\", \"fetch\"]\n      }\n    }\n  }\n}\n```\n\nOrdinary remote tools are exposed with stable names: `mcp_<server>_<tool>`\n\n.\nLive-broker MCP servers stay behind the `trading_*`\n\nconnector surface.\n\nIf two server names produce the same ASCII-safe local prefix (e.g. `foo-bar`\n\nand `foo_bar`\n\nboth become `foo_bar`\n\n), a deterministic hash suffix is appended at the server-segment level so names remain unique. The operator receives a warning:\n\n```\nWARNING: Configured MCP server 'foo-bar' collides with another server after local name\nnormalization. Using local tool prefix 'mcp_foo_bar_<hash>_<tool>' to keep generated\ntool names unique. Rename the server in agent config if you want a different prefix.\n```\n\n| Limit | Detail |\n|---|---|\n| Transport | stdio, SSE, and streamable HTTP |\n| Execution | serial only — MCP tools never enter the parallel readonly path |\n| Surfaces | tools only (resources and prompts excluded in v1) |\n| Hot reload | not supported — restart the process to pick up config changes |\n| Swarm path | MCP tools are not available inside Swarm worker registries in v1 |\n\n**Click to expand**\n\n```\nVibe-Trading/\n├── agent/                          # Backend (Python)\n│   ├── cli/                        # CLI package — interactive TUI + subcommands\n│   ├── api_server.py               # FastAPI server — runs, sessions, upload, swarm, SSE\n│   ├── mcp_server.py               # MCP server — 54 tools for OpenClaw / Claude Desktop\n│   │\n│   ├── src/\n│   │   ├── agent/                  # ReAct agent core\n│   │   │   ├── loop.py             #   5-layer compression + read/write tool batching\n│   │   │   ├── context.py          #   system prompt + auto-recall from persistent memory\n│   │   │   ├── skills.py           #   skill loader (79 bundled + user-created via CRUD)\n│   │   │   ├── tools.py            #   tool base class + registry\n│   │   │   ├── memory.py           #   lightweight workspace state per run\n│   │   │   ├── frontmatter.py      #   shared YAML frontmatter parser\n│   │   │   └── trace.py            #   execution trace writer\n│   │   │\n│   │   ├── memory/                 # Cross-session persistent memory\n│   │   │   └── persistent.py       #   file-based memory (~/.vibe-trading/memory/)\n│   │   │\n│   │   ├── tools/                  # 68 auto-discovered agent tools\n│   │   │   ├── backtest_tool.py    #   run backtests\n│   │   │   ├── remember_tool.py    #   cross-session memory (save/recall/forget)\n│   │   │   ├── skill_writer_tool.py #  skill CRUD (save/patch/delete/file)\n│   │   │   ├── session_search_tool.py # FTS5 cross-session search\n│   │   │   ├── swarm_tool.py       #   launch swarm teams\n│   │   │   ├── web_search_tool.py  #   DuckDuckGo web search\n│   │   │   └── ...                 #   bash, file I/O, factor analysis, options, alpha browser + bench, etc.\n│   │   │\n│   │   ├── factors/                # Alpha Zoo — 456 alphas across 4 zoos\n│   │   │   ├── base.py             #   19 operators (rank/scale/ts_*/delta/decay_linear/safe_div/vwap)\n│   │   │   ├── registry.py         #   AST-only metadata load + lazy compute + sanity gates\n│   │   │   ├── bench_runner.py     #   IC + alive/reversed/dead categorisation\n│   │   │   └── zoo/                #   qlib158 (154) + alpha101 (101) + gtja191 (191) + academic (10)\n│   │   │\n│   │   ├── api/                    # FastAPI route modules\n│   │   │   └── alpha_routes.py     #   /alpha/list, /alpha/{id}, /alpha/bench, SSE stream\n│   │   │\n│   │   ├── skills/                 # 79 finance skills in 8 categories (SKILL.md each)\n│   │   ├── swarm/                  # Swarm DAG execution engine\n│   │   │   └── presets/            #   29 swarm preset YAML definitions\n│   │   ├── session/                # Multi-turn chat + FTS5 session search\n│   │   └── providers/              # LLM provider abstraction\n│   │\n│   └── backtest/                   # Backtest engines\n│       ├── engines/                #   7 engines + composite cross-market engine + options_portfolio\n│       ├── loaders/                #   18 sources: tushare, okx, yfinance, akshare, baostock, tencent, mootdx, ccxt, futu, local, eastmoney, sina, stooq, yahoo, finnhub, alphavantage, tiingo, fmp\n│       │   ├── base.py             #   DataLoader Protocol\n│       │   └── registry.py         #   Registry + auto-fallback chains\n│       └── optimizers/             #   MVO, equal vol, max div, risk parity\n│\n├── frontend/                       # Web UI (React 19 + Vite + TypeScript)\n│   └── src/\n│       ├── pages/                  #   Home, Agent, AlphaZoo, RunDetail, Compare, Correlation, Settings\n│       ├── components/             #   chat, charts, layout\n│       └── stores/                 #   Zustand state management\n│\n├── Dockerfile                      # Multi-stage build\n├── docker-compose.yml              # One-command deploy\n├── pyproject.toml                  # Package config + CLI entrypoint\n├── tools/                          # Repo-level CI helpers\n│   └── ci_grep_gates.sh            # rejects yaml.load / trademark / per-stock-data leaks\n└── LICENSE                         # MIT\n```\n\nVibe-Trading is part of the ** HKUDS** agent ecosystem:\n\n|\nNanoBot |\n\nUltra-Lightweight Personal AI Assistant\n\n**AI-Trader** Agent-Native Signal & Copy Trading Platform**CLI-Anything** Making All Software Agent-Native**OpenSpace** Self-Evolving AI Agent Skills**ClawTeam** Agent Swarm IntelligenceWe ship in phases. Items move to\n\n[Issues]when work begins.\n\n| Phase | Feature | Status |\n|---|---|---|\nTrust Layer |\nReproducible run cards are emitted and shown in Run Detail; v1 adds tool traces and citations | v0 Shipped |\nHypothesis Registry |\nDurable research hypotheses with lifecycle status, data sources, skills, run-card links, and invalidation notes | Backend MVP Shipped |\nResearch Autopilot |\nManual-first research loop: hypothesis → deterministic backtest → evidence report | Phase 1–3 Shipped |\nData Bridge |\nBring-your-own data: local CSV/Parquet/SQL connectors with schema mapping | Local loader Shipped |\nOptions Lab |\nVol surface, Greeks dashboard, payoff/scenario explorer | Planned |\nPortfolio Studio |\nRisk x-ray, constraints, turnover-aware optimizer, rebalance notes | Planned |\nAlpha Zoo |\n452 pre-built alphas (Qlib 158 + Kakushadze 101 + GTJA 191 + FF5 + Carhart) with one-line bench, agent integration, and Web UI | Shipped 0.1.8 |\nResearch Delivery |\nScheduled briefs to Slack / Telegram / email-style channels | Scheduler Shipped |\nCommunity |\nShareable skills, presets, and strategy cards | Exploring |\n\nWe welcome contributions! See [CONTRIBUTING.md](/HKUDS/Vibe-Trading/blob/main/CONTRIBUTING.md) for guidelines.\n\n**Good first issues** are tagged with [ good first issue](https://github.com/HKUDS/Vibe-Trading/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) — pick one and get started.\n\nWant to contribute something bigger? Check the [Roadmap](#-roadmap) above and open an issue to discuss before starting.\n\nThanks to everyone who has contributed to Vibe-Trading!\n\nRecent v0.1.10 cycle contributors and credits:\n\n- @Hinotoi-agent — a security-hardening wave: local-shutdown auth (#241), loopback-host rebinding rejection (#242), agent shell-tool opt-in (#243), settings-write auth (#245), mandate proposal-id containment (#256), persistent-memory type validation (#257), and MCP swarm run-id containment (#258)\n- @mvanhorn — the opt-in local data cache (#177), Gemini thoughtSignature round-trip over OpenAI-compat tool calls (#176), the custom data loader guide (#194), and the glm/zhipu provider alias + model-name inference (#247)\n- @gyx09212214-prog — loader robustness for malformed crypto/RSSHub timeout env vars (#227, #240), requested yfinance end-date inclusion (#226), strict run-card JSON for non-finite metrics (#238), and ddgs retry-fallback coverage (#239)\n- @BillDin — swarm agent status in the chat UI (#188), explicit preset-name handling (#189), the loader-backed market-data tool for swarm workers (#199), and preset-context continuations (#200)\n- @Robin1987China — the Research Autopilot goal-hypothesis bridge (#260), the local CSV/Parquet/DuckDB data loader (#252), and an assistant-prefill fix + configurable Kimi User-Agent (#248)\n- @LemonCANDY42 — the read-only runtime status dashboard (#210), persisted AgentLoop usage artifacts (#223), and opt-in Run Detail chart payloads (#225)\n- @zwrong — the trace.jsonl overhaul with zero truncation + offload (#206) and session-id on exit +\n`resume <session-id>`\n\n(#218) - @forge-builder — the AI contributor guide (#173) and the OpenClaw MCP research-only smoke-test docs (#165)\n- @skloxo — Chinese (zh-CN) frontend localization (adopted from #217)\n- @LeeCQiang — Chinese docstrings across all 452 Alpha Zoo factors (#180)\n- @KaiLuettmann — GHCR pre-built image publishing on release (#187)\n- @ngoanpv — Gemini thought_signature preservation through the AgentLoop dict path (#184)\n- @ShahNewazKhan — Docker host-Ollama reachability via host.docker.internal (#196)\n- @sambazhu — frontend sync of completed chat attempts (#236)\n- @bhlt — baostock-native code format support (#230)\n- @octo-patch — MiniMax M3 default model upgrade (#162)\n- @warren618 / Haozhe Wu — the global data layer (8 sources + 18 read-only data tools), the 10 broker SDK connectors, the alpha-compare full stack, the provider-reliability overhaul, multi-engine web_search fallback, responsive Stop + SSE reconnect, and release integration\n\nVibe-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.\n\nMIT License — see [LICENSE](/HKUDS/Vibe-Trading/blob/main/LICENSE)\n\n⭐ If **Vibe-Trading** helps your research, a star helps more people find it.\n\nThanks for visiting **Vibe-Trading** ✨", "url": "https://wpnews.pro/news/vibe-trading-your-personal-trading-agent", "canonical_source": "https://github.com/HKUDS/Vibe-Trading", "published_at": "2026-06-29 06:42:05+00:00", "updated_at": "2026-06-29 06:58:36.042012+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "ai-products"], "entities": ["HKUDS", "Vibe-Trading", "Robinhood", "OpenAI", "Gemini", "tushare", "SignalEngine", "Shadow Account"], "alternates": {"html": "https://wpnews.pro/news/vibe-trading-your-personal-trading-agent", "markdown": "https://wpnews.pro/news/vibe-trading-your-personal-trading-agent.md", "text": "https://wpnews.pro/news/vibe-trading-your-personal-trading-agent.txt", "jsonld": "https://wpnews.pro/news/vibe-trading-your-personal-trading-agent.jsonld"}}