{"id":"d26a9f13-890b-423f-b3d4-b64481c55784","entityType":"agent","slug":"clawhub-warren618-vibe-trading","name":"vibe-trading","canonicalUrl":"https://www.xpersona.co/agent/clawhub-warren618-vibe-trading","canonicalPath":"/agent/clawhub-warren618-vibe-trading","generatedAt":"2026-10-09T21:18:59.222Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-09T04:00:57.966Z","emptyReason":null},"description":"Professional finance research toolkit — backtesting (10 engines + benchmark comparison panel), factor analysis, Alpha Zoo (462 pre-built alphas across qlib158/alpha101/gtja191/academic/fundamental), options pricing, 90 finance skills, 30 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract → backtest → render) across 28 market-data sources (tushare, yfinance, okx, binance, akshare, baostock, tencent, mootdx, ccxt, futu, mt5, tickerall, local, eastmoney, sina, stooq, yahoo, pykrx, india_broker, qveris, longbridge, nobitex, wallex, plus optional-key finnhub/alphavantage/tiingo/fmp/gildata). Skill: vibe-trading Owner: warren618 Summary: Professional finance research toolkit — backtesting (10 engines + benchmark comparison panel), factor analysis, Alpha Zoo (462 pre-built alphas across qlib158/alpha101/gtja191/academic/fundamental), options pricing, 90 finance skills, 30 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract → backtest → render) across 28 market-data sources (tushare","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 5.4K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s17aqp0drym9w3rnrc4hdqtsfh83zz2h:vibe-trading","sourceUrl":"https://clawhub.ai/warren618/vibe-trading","homepage":"https://clawhub.ai/warren618/skills/vibe-trading","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/warren618/vibe-trading","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/warren618/skills/vibe-trading","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":49,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Professional finance research toolkit — backtesting (10 engines + benchmark comparison panel), factor analysis, Alpha Zoo (462 pre-built alphas across qlib158/a"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T04:00:57.966Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T04:00:57.966Z","emptyReason":null},"stars":null,"forks":null,"downloads":5444,"packageName":null,"latestVersion":"0.1.16","tractionLabel":"5.4K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T04:00:57.966Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T04:00:57.966Z","lastCrawledAt":"2026-10-09T04:00:57.966Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T04:00:57.966Z","lastVerifiedAt":null,"highlights":[{"version":"0.1.16","createdAt":"2026-09-29T08:37:08.271Z","changelog":"0.1.16: the grounding gate checks each declared figure against tool evidence, a backtest's own output included; research runs keep what they fetched (compaction follows each model's real context window); Argentina (BYMA), weekly and monthly bars, Gildata, OpenCode, and KIS, Upbit, Toss Securities and Scalable Capital connectors.","fileCount":3,"zipByteSize":12489},{"version":"0.1.15","createdAt":"2026-09-09T07:49:37.799Z","changelog":"Futures loader chain now serves contracts off keyless Sina endpoints; Alpha Zoo NaN contract enforced at the registry (84 fabricating alphas -> 0); price-adjustment caliber stamped on served frames; UK equities, Zerodha Kite Connect, read-only multi-broker portfolio, 15 quantlib additions, pt-BR locale, offline evals harness.","fileCount":3,"zipByteSize":12534},{"version":"0.1.14","createdAt":"2026-08-20T00:36:38.851Z","changelog":"Run Detail gains four analysis tabs (factor research, positions structure, tearsheet, research dashboard) and the Web UI gains an Options Lab. Strategy Discovery ships both phases; scheduled research delivers itself through a leased outbox. smartmoneyconcepts moves to an opt-in [smc] extra so Intel-Mac installs no longer need CMake, and the stale <3.14 cap is gone. MCP grows to 74 tools; Vietnam (HOSE) is the 10th backtest engine.","fileCount":3,"zipByteSize":12843},{"version":"0.1.13","createdAt":"2026-08-10T11:56:05.564Z","changelog":"v0.1.13 — identity/grounding gate no longer refuses answers it has the evidence for (7 root causes, incl. .SS/.SH treated as different instruments); src/quantlib finance-math layer (265 functions across 19 modules) reachable via the read-only quantlib_call; valuation engine (DCF/comps/three-statement) that refuses to default a missing input; entity + irregular cash-flow spine; run manifests + hash-chained audit ledger; four read-only data tools (SEC 13F, ETF look-through, prediction markets, arXiv/OpenAlex); six institutional commands; eToro as the 13th broker connector; Korea (KRX) as the 9th backtest engine; MCP surface 60 -> 70 tools.","fileCount":3,"zipByteSize":11896},{"version":"0.1.12","createdAt":"2026-07-22T13:39:51.000Z","changelog":"v0.1.12: correlation regime timeline, 3 new LLM providers (SiliconFlow/iFlytek/native Anthropic) + robust endpoint resolution, MetaTrader 5 connector (12 brokers), Strategy Development Manager, Binance USD-M perps, pluggable OCR/vision, and a reliability wave (~90 fixes). 462 alphas, 88 skills, 23 data sources.","fileCount":3,"zipByteSize":9902},{"version":"0.1.11","createdAt":"2026-07-10T17:12:33.205Z","changelog":"India equity (NSE/BSE) engine, PIT-safe fundamental factor layer (Alpha Zoo 460 / 5 families), 16-adapter IM channel runtime, end-to-end scheduled research, optional QVeris premium data, turnover-aware optimizer, analyze_image vision tool. 30 swarm presets / 20 data sources / 54 MCP tools.","fileCount":3,"zipByteSize":9865},{"version":"0.1.10","createdAt":"2026-06-19T12:56:50.284Z","changelog":"v0.1.10 — Global data layer: 18 market-data sources + 18 read-only data tools over MCP; plus 10 broker connectors, alpha compare, provider-reliability overhaul, Research Autopilot Phase 1, and opt-in data cache.","fileCount":3,"zipByteSize":9420},{"version":"0.1.9","createdAt":"2026-06-01T15:01:32.164Z","changelog":"0.1.9: connector-first broker profiles (IBKR + Robinhood Agentic Trading), Research Goal runtime, swarm retry_run + MCP keepalive + worker MCP tools + strict alpha-bench, agent/cli package refactor, mootdx A-share loader, robustness pass, and --version drift fix. 36 MCP tools.","fileCount":3,"zipByteSize":8407}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17aqp0drym9w3rnrc4hdqtsfh83zz2h:vibe-trading","setupComplexity":"low","setupSteps":["Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-warren618-vibe-trading/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-warren618-vibe-trading/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-warren618-vibe-trading/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-warren618-vibe-trading/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-warren618-vibe-trading/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-warren618-vibe-trading/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-09T21:18:59.219Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-warren618-vibe-trading/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-warren618-vibe-trading/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-warren618-vibe-trading/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-warren618-vibe-trading/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-09T04:00:57.966Z","emptyReason":null},"readme":"Skill: vibe-trading\n\nOwner: warren618\n\nSummary: Professional finance research toolkit — backtesting (10 engines + benchmark comparison panel), factor analysis, Alpha Zoo (462 pre-built alphas across qlib158/alpha101/gtja191/academic/fundamental), options pricing, 90 finance skills, 30 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract → backtest → render) across 28 market-data sources (tushare, yfinance, okx, binance, akshare, baostock, tencent, mootdx, ccxt, futu, mt5, tickerall, local, eastmoney, sina, stooq, yahoo, pykrx, india_broker, qveris, longbridge, nobitex, wallex, plus optional-key finnhub/alphavantage/tiingo/fmp/gildata).\n\nTags: backtest:0.1.12, finance:0.1.12, latest:0.1.16, mcp:0.1.12, swarm:0.1.12, trading:0.1.12\n\nVersion history:\n\nv0.1.16 | 2026-09-29T08:37:08.271Z | user\n\n0.1.16: the grounding gate checks each declared figure against tool evidence, a backtest's own output included; research runs keep what they fetched (compaction follows each model's real context window); Argentina (BYMA), weekly and monthly bars, Gildata, OpenCode, and KIS, Upbit, Toss Securities and Scalable Capital connectors.\n\nv0.1.15 | 2026-09-09T07:49:37.799Z | user\n\nFutures loader chain now serves contracts off keyless Sina endpoints; Alpha Zoo NaN contract enforced at the registry (84 fabricating alphas -> 0); price-adjustment caliber stamped on served frames; UK equities, Zerodha Kite Connect, read-only multi-broker portfolio, 15 quantlib additions, pt-BR locale, offline evals harness.\n\nv0.1.14 | 2026-08-20T00:36:38.851Z | user\n\nRun Detail gains four analysis tabs (factor research, positions structure, tearsheet, research dashboard) and the Web UI gains an Options Lab. Strategy Discovery ships both phases; scheduled research delivers itself through a leased outbox. smartmoneyconcepts moves to an opt-in [smc] extra so Intel-Mac installs no longer need CMake, and the stale <3.14 cap is gone. MCP grows to 74 tools; Vietnam (HOSE) is the 10th backtest engine.\n\nv0.1.13 | 2026-08-10T11:56:05.564Z | user\n\nv0.1.13 — identity/grounding gate no longer refuses answers it has the evidence for (7 root causes, incl. .SS/.SH treated as different instruments); src/quantlib finance-math layer (265 functions across 19 modules) reachable via the read-only quantlib_call; valuation engine (DCF/comps/three-statement) that refuses to default a missing input; entity + irregular cash-flow spine; run manifests + hash-chained audit ledger; four read-only data tools (SEC 13F, ETF look-through, prediction markets, arXiv/OpenAlex); six institutional commands; eToro as the 13th broker connector; Korea (KRX) as the 9th backtest engine; MCP surface 60 -> 70 tools.\n\nv0.1.12 | 2026-07-22T13:39:51.000Z | user\n\nv0.1.12: correlation regime timeline, 3 new LLM providers (SiliconFlow/iFlytek/native Anthropic) + robust endpoint resolution, MetaTrader 5 connector (12 brokers), Strategy Development Manager, Binance USD-M perps, pluggable OCR/vision, and a reliability wave (~90 fixes). 462 alphas, 88 skills, 23 data sources.\n\nv0.1.11 | 2026-07-10T17:12:33.205Z | user\n\nIndia equity (NSE/BSE) engine, PIT-safe fundamental factor layer (Alpha Zoo 460 / 5 families), 16-adapter IM channel runtime, end-to-end scheduled research, optional QVeris premium data, turnover-aware optimizer, analyze_image vision tool. 30 swarm presets / 20 data sources / 54 MCP tools.\n\nv0.1.10 | 2026-06-19T12:56:50.284Z | user\n\nv0.1.10 — Global data layer: 18 market-data sources + 18 read-only data tools over MCP; plus 10 broker connectors, alpha compare, provider-reliability overhaul, Research Autopilot Phase 1, and opt-in data cache.\n\nv0.1.9 | 2026-06-01T15:01:32.164Z | user\n\n0.1.9: connector-first broker profiles (IBKR + Robinhood Agentic Trading), Research Goal runtime, swarm retry_run + MCP keepalive + worker MCP tools + strict alpha-bench, agent/cli package refactor, mootdx A-share loader, robustness pass, and --version drift fix. 36 MCP tools.\n\nv0.1.8 | 2026-05-17T12:21:16.038Z | user\n\nAlpha Zoo v1: 452 pre-built quant alphas across 4 zoos (qlib158 / alpha101 / gtja191 / academic) with one-line CLI bench, agent integration, and a new Web UI at /alpha-zoo. 75 skills total (+ alpha-zoo). See https://vibetrading.wiki/alpha-library/ and the Alpha 191 in 2026 research-lab post.\n\nv0.1.7 | 2026-05-06T12:10:42.835Z | user\n\nSecurity hardening patch: strengthens API, file, URL, code-generation, Docker, CLI, Web UI, and MCP/ClawHub boundaries while preserving localhost workflows.\n\nv0.1.6 | 2026-04-28T09:52:10.869Z | user\n\nv0.1.6: Fixes #55 (swarm presets bundled inside src.swarm package — vibe-trading --swarm-presets now works after pip/uv tool install). Plus AKShare ETF/forex routing fix. Rolls up benchmark panel + upload safety + Futu loader + vnpy export skill since v0.1.5.\n\nv0.1.5 | 2026-04-19T03:06:32.996Z | user\n\nShadow Account: extract broker rules → backtest shadow → P&L leakage report (4 new tools + 1 skill). Trade Journal Analyzer: 4 behavior bias diagnostics (disposition / overtrading / momentum-chasing / anchoring). Universal File Reader: pdf/docx/xlsx/pptx/images/40+ text formats in one envelope. Agent Harness v2: persistent memory + FTS5 session search + self-evolving skills. 22 MCP tools, 71 skills, 29 swarm presets.\n\nv0.1.4 | 2026-04-10T13:23:39.772Z | user\n\nAdd web_search MCP tool, akshare/ccxt data sources, fix Docker build, bump to 68 skills\n\nv0.2.3 | 2026-04-01T06:08:31.940Z | user\n\nRemove bundled mcp_server.py — MCP runs via pip-installed vibe-trading-mcp command\n\nv0.2.2 | 2026-04-01T06:05:07.674Z | user\n\nClarify API key requirements: 15/16 MCP tools work with zero keys, add per-tool key column\n\nv0.2.1 | 2026-04-01T06:01:25.392Z | user\n\nClarify API key requirements: 15/16 MCP tools work with zero keys, add per-tool key column to tools table\n\nv0.2.0 | 2026-03-31T18:43:59.360Z | user\n\nAdd vibe-trading-mcp entry point, document package vs commands\n\nv0.1.1 | 2026-03-31T18:07:46.111Z | user\n\nAdd get_market_data, get_swarm_status, get_run_result, list_runs tools\n\nv0.1.0 | 2026-03-31T17:15:49.256Z | auto\n\nInitial public release of vibe-trading: a professional finance research toolkit.\n\n- Adds 64 specialized finance skills covering backtesting, factor analysis, risk, options, and more.\n- Includes 29 multi-agent swarm teams for investment research and quant strategy.\n- Supports data and backtesting for HK/US equities (via yfinance), cryptocurrency (via OKX), and China A-shares (via Tushare; key optional).\n- Provides 16 MCP tools for workflows such as skill discovery, multi-agent execution, data fetch, file handling, and report generation.\n- No API keys required for HK/US/crypto; optional TUSHARE_TOKEN for China A-shares.\n\nArchive index:\n\nArchive v0.1.16: 3 files, 12489 bytes\n\nFiles: skill-card.md (1794b), SKILL.md (25977b), _meta.json (132b)\n\nFile v0.1.16:SKILL.md\n\n---\nname: vibe-trading\nversion: 0.1.16\ndescription: Professional finance research toolkit — backtesting (10 engines + benchmark comparison panel), factor analysis, Alpha Zoo (462 pre-built alphas across qlib158/alpha101/gtja191/academic/fundamental), options pricing, 90 finance skills, 30 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract → backtest → render) across 28 market-data sources (tushare, yfinance, okx, binance, akshare, baostock, tencent, mootdx, ccxt, futu, mt5, tickerall, local, eastmoney, sina, stooq, yahoo, pykrx, india_broker, qveris, longbridge, nobitex, wallex, plus optional-key finnhub/alphavantage/tiingo/fmp/gildata).\ndependencies:\n  python: \">=3.11\"\n  pip:\n    - vibe-trading-ai\nenv:\n  - name: TUSHARE_TOKEN\n    description: \"Tushare API token for China A-share data (optional — HK/US/Canada/crypto work without any key)\"\n    required: false\n  - name: OPENAI_API_KEY\n    description: \"OpenAI-compatible API key — only needed for run_swarm (multi-agent teams). All other tools work without it.\"\n    required: false\n  - name: LANGCHAIN_MODEL_NAME\n    description: \"LLM model name for run_swarm (e.g. deepseek/deepseek-v4-pro). Only needed if using run_swarm.\"\n    required: false\nmcp:\n  command: vibe-trading-mcp\n  args: []\n---\n\n# Vibe-Trading\n\nProfessional finance research toolkit with AI-powered backtesting (10 engines), multi-agent teams, 90 specialized skills, the **Alpha Zoo** (462 pre-built quantitative alphas across qlib158 / alpha101 / gtja191 / academic / fundamental with one-line CLI benchmarking), and the Shadow Account loop — extract your implicit trading rules from a journal, backtest them across A股/港股/美股/crypto, then see where they would have served you better.\n\n## Setup\n\n```bash\npip install vibe-trading-ai\n```\n\n> **Package name vs commands:** The PyPI package is `vibe-trading-ai`. Once installed, you get:\n>\n> | Command | Purpose |\n> |---------|---------|\n> | `vibe-trading` | Interactive CLI / TUI |\n> | `vibe-trading serve` | Launch FastAPI web server |\n> | `vibe-trading-mcp` | Start MCP server (for Claude Desktop, OpenClaw, Cursor, etc.) |\n\nAdd to your agent's MCP config:\n\n```json\n{\n  \"mcpServers\": {\n    \"vibe-trading\": {\n      \"command\": \"vibe-trading-mcp\"\n    }\n  }\n}\n```\n\n### API Key Requirements\n\nCore research MCP tools work with zero API keys for HK/US/Canada/crypto. After `pip install`, backtesting, market data, factor analysis, options pricing, chart patterns, web search, document reading, trade journal analysis, shadow-account extraction/backtest/report, the Alpha Zoo (462 pre-built alphas), and all 90 skills are ready to use. IBKR tools require a local TWS / IB Gateway session; `run_swarm` requires an LLM key.\n\n| Feature | Key needed | When |\n|---------|-----------|------|\n| HK/US/Canada equities & crypto | None | Always free (yfinance / stooq / yahoo + OKX) |\n| China A-share data | None | Free via akshare / baostock / tencent / sina / eastmoney / mootdx fallback (`TUSHARE_TOKEN` optional for premium quality) |\n| Premium US fundamentals/quotes | `FINNHUB_API_KEY` / `ALPHAVANTAGE_API_KEY` / `TIINGO_API_KEY` / `FMP_API_KEY` | Only for optional-key providers (graceful fallback to free sources) |\n| Multi-agent swarm (`run_swarm`) | `OPENAI_API_KEY` + `LANGCHAIN_MODEL_NAME` | Swarm spawns internal LLM workers |\n\n## What You Can Do\n\n### Shadow Account — flagship loop\n\nFeed a CSV broker export (同花顺 / 东财 / 富途 / generic), and the agent will:\n1. `analyze_trade_journal` — profile your behavior (holding period, win rate, disposition effect, chasing, overtrading, anchoring).\n2. `extract_shadow_strategy` — distill 3-5 if-then rules that describe your profitable roundtrips.\n3. `run_shadow_backtest` — backtest those rules across A/HK/US/crypto and compute delta-PnL vs your realized trades.\n4. `render_shadow_report` — produce an HTML/PDF report (8 sections + charts) with today's matching signals.\n5. `scan_shadow_signals` — list today's symbols that match your shadow's entry cadence (research only).\n\n### Backtesting\nCreate and run quantitative strategies across 10 engines (ChinaA, GlobalEquity, IndiaEquity, KoreaEquity, VietnamEquity, Crypto, ChinaFutures, GlobalFutures, Forex + options) with 28 market-data sources (auto-detect + ordered fallback; the hosted forex `tickerall` source is explicit-only):\n- **HK/US equities** via yfinance / stooq / yahoo (free, no API key); optionally via **Longbridge** historical OHLCV (`longbridge`, requires the optional SDK and `LONGBRIDGE_APP_KEY` / `LONGBRIDGE_APP_SECRET` / `LONGBRIDGE_ACCESS_TOKEN`). To force it for a run, set `\"source\": \"longbridge\"` in `config.json`.\n- **Canada equities (TSX/TSXV)** via yahoo / yfinance using Yahoo's canonical `<TICKER>.TO` (TSX, e.g. `TD.TO`) or `<TICKER>.V` (TSXV, e.g. `PNG.V`) suffixes — free, no API key. The GlobalEquity engine uses CAD identity, whole-share orders, configurable Canadian commission/slippage, and the TSX/TSXV price-increment grid.\n- **India equities (NSE/BSE)** via yahoo / yfinance using `<SYMBOL>.NS` (NSE, e.g. `RELIANCE.NS`) or `<SCRIP>.BO` (BSE, e.g. `500325.BO`) — free, no API key. The `IndiaEquityEngine` models T+1 delivery, no overnight shorts (set `allow_short` for intraday), configurable circuit bands, 1-share lots, and the STT/stamp-duty/exchange/GST cost stack. Optionally back-fill from your live broker via the `india_broker` source (Shoonya/Dhan; requires broker login).\n- **Korea equities (KRX: KOSPI/KOSDAQ)** via pykrx using `<CODE>.KS` (KOSPI, e.g. `005930.KS`) or `<CODE>.KQ` (KOSDAQ, e.g. `247540.KQ`) — free, no API key (`pip install \"vibe-trading-ai[krx]\"`; yahoo/yfinance fallback needs no extra). pykrx serves **daily bars only** (an intraday request falls through to another source) and its adjusted series is Naver-backed rather than a verbatim KRX print. The `KoreaEquityEngine` models same-day round trips (no T+1), the ±30% daily price limit measured from the previous close and quantized to the KRX tick grid, tick-rounded fills, the 0.20% sell-side transaction tax (2026 rate), and 1-share lots. It is **long-only**: `allow_short` is refused, because KRX covered-short and uptick rules cannot be enforced on daily bars.\n- **Vietnam equities (HOSE)** via yahoo / yfinance using `<TICKER>.VN` (e.g. `VIC.VN`) — no API key. Yahoo officially lists HOSE but not HNX or UPCOM; those venues are unsupported and need the `local` source. yfinance is an unofficial Yahoo client, so availability is best-effort and subject to Yahoo's personal-use terms. The `VietnamEquityEngine` approximates the formal T+2 settlement cycle — shares bought on day T normally become sellable during the afternoon session on T+2, informally called T+1.5 — as a two-bar hold on daily data (`vn_settlement_bars` covers scenario testing and future rule changes). It applies HOSE's normal ±7% band around the reference price, rounding the ceiling down and the floor up to the 10/50/100-VND tick grid, and uses 100-share round lots; odd-lot trading is not modelled. Costs are configurable brokerage plus, for individual investors, 0.1% sell-side personal income tax on gross proceeds. It is **long-only**, because operational cash-equity short selling is not generally available in Vietnam.\n- **Cryptocurrency** via OKX or CCXT/100+ exchanges (free, no API key)\n- **China A-shares** via AKShare / baostock / tencent / sina / eastmoney / mootdx (free, no API key) — `TUSHARE_TOKEN` optional for premium quality\n- **Futures, forex, macro** via AKShare (free, no API key)\n- **Forex / metals with no local terminal** via the hosted **TickerAll** MetaTrader 5 feed (`source=\"tickerall\"`, `TICKERALL_API_KEY` + `TICKERALL_ACCOUNT_ID`, read-only) — the same broker feed as the `mt5` loader but over a hosted API on any OS. **Explicit-only** (never an automatic fallback).\n- **HK & A-share equities** via Futu (broker login required, optional)\n- **Local CSV/parquet bars** via the `local` loader (offline, no network)\n- **Premium cross-market data** via QVeris (optional API key)\n- **Premium US data** via optional-key finnhub / alphavantage / tiingo / fmp (graceful fallback to free sources)\n\nFactors: the Alpha101 and QLib158 zoos are tagged for the `equity_in` and `equity_kr` universes, so they compute on NSE/BSE and KRX bars (the GTJA191 zoo stays China-only). Live/paper India trading uses the Shoonya / Dhan connectors (paper + read-only live; live order placement is structurally disabled because those brokers expose no paper/live switch). Live/paper Korea equity trading uses the **KIS** connector (한국투자증권; genuine 모의투자 paper sandbox on a separate host/port from 실전투자 live, plus read-only live — no mandate-gated live-trade profile yet). Live/paper Korea crypto trading uses the **Upbit** connector (KRW markets; paper + read-only live — no runtime paper/live discriminator, so live order placement is structurally disabled, same as Shoonya/Dhan). Read-only Korea/US equity access is also available via the **Toss Securities** connector (토스증권) — no verified sandbox, so order placement always refuses, same as Trading 212.\n\nExample workflow:\n1. Use `list_skills()` to discover strategy patterns\n2. Use `load_skill(\"strategy-generate\")` for the strategy creation guide\n3. Use `write_file()` to create `config.json` and `code/signal_engine.py`\n4. Use `backtest()` to run and get metrics (Sharpe, return, drawdown, etc.)\n\n### Multi-Agent Swarm Teams\n30 pre-built agent teams for complex research:\n- **Investment Committee**: bull/bear debate → risk review → PM decision\n- **Global Equities Desk**: A-share + HK/US + crypto → global strategist\n- **Crypto Trading Desk**: funding/basis + liquidation + flow → risk manager\n- **Earnings Research Desk**: fundamentals + revisions + options → earnings strategist\n- **Macro/Rates/FX Desk**: rates + FX + commodities → macro PM\n- **Quant Strategy Desk**: screening → factor research → backtest → risk audit\n- **Risk Committee**: drawdown, tail risk, regime analysis\n- And 23 more specialized teams\n\nUse `list_swarm_presets()` to see all teams, then `run_swarm()` to execute.\n\n### Alpha Zoo (462 pre-built alphas)\nOne-line cross-sectional IC / IR / alive-reversed-dead categorisation across five bundled zoos:\n- **qlib158** (154 alphas) — Microsoft Qlib's `Alpha158` feature handler, Apache-2.0 with pinned commit SHA.\n- **alpha101** (101 alphas) — Kakushadze (2015) \"101 Formulaic Alphas\" (arXiv:1601.00991), written from the paper appendix.\n- **gtja191** (191 alphas) — Guotai Junan 2014 \"191 Short-period Trading Alpha Factors\" research report.\n- **academic** (12 factors) — Fama-French 5 + Carhart momentum + Jegadeesh reversal + George-Hwang 52-week-high + Amihud illiquidity + Harvey-Siddique skew + Frazzini-Pedersen betting-against-beta (price-based proxies) + a correlation-rewiring stability score (from the in-repo correlation-regime skill).\n- **fundamental** (4 factors) — PIT-safe earnings yield, ROE, gross profitability, and asset growth from daily fundamental panels.\n\nEach alpha ships with `__alpha_meta__` (formula LaTeX + theme + universe + warmup + columns required), guarded by an AST purity gate + 300-row lookahead sentinel test. Use the `vibe-trading alpha {list,show,bench,compare,export-manifest}` CLI, the `/alpha/*` REST routes (browser at `/alpha-zoo`), or compose multi-factor signals via `ZooSignalEngine.from_zoo(...)`.\n\n### Finance Skills (90)\nComprehensive knowledge base covering:\n- Technical analysis (candlestick, Elliott wave, Ichimoku, SMC, harmonic, chanlun)\n- Quantitative methods (factor research, ML strategy, pair trading, multi-factor)\n- Risk management (VaR/CVaR, stress testing, hedging)\n- Options (Black-Scholes, Greeks, multi-leg strategies, payoff diagrams)\n- HK/US equities (SEC filings, earnings revisions, ETF flows, ADR/H-share arbitrage)\n- Crypto trading desk (funding rates, liquidation heatmaps, stablecoin flows, token unlocks, DeFi yields)\n- Behavioral finance, trade journal diagnostics, shadow account\n- Macro analysis, credit research, sector rotation, and more\n\nUse `load_skill(name)` to access full methodology docs with code templates.\n\n## Available MCP Tools (74)\n\n| Tool | Description | API Key |\n|------|-------------|---------|\n| `list_skills` | List all 90 finance skills | None |\n| `load_skill` | Load full skill documentation | None |\n| `start_research_goal` | Create an auditable research goal | None |\n| `get_research_goal` | Read the current research goal | None |\n| `add_goal_evidence` | Attach evidence to a research goal | None |\n| `update_research_goal_status` | Update goal lifecycle status | None |\n| `backtest` | Run vectorized backtest engine | None* |\n| `factor_analysis` | IC/IR analysis + layered backtest | None* |\n| `alpha_zoo` | Browse bundled alpha metadata and registry health | None |\n| `alpha_bench` | Benchmark one alpha or a complete zoo | None* |\n| `analyze_options` | Black-Scholes price + Greeks | None |\n| `analyze_options_payoff` | Multi-leg expiry payoff + spot/IV scenarios | None |\n| `pattern_recognition` | Detect chart patterns (H&S, double top, etc.) | None |\n| `get_market_data` | Fetch OHLCV data (auto-detect + ordered fallback across 28 sources) | None* |\n| `get_fund_flow` | Capital fund-flow (main/retail net inflow) | None* |\n| `get_dragon_tiger` | Dragon-tiger list (龙虎榜) top buyer/seller seats | None* |\n| `get_northbound_flow` | Northbound (Stock Connect) net flow | None* |\n| `get_margin_trading` | Margin trading & short-selling balances | None* |\n| `get_block_trades` | Block-trade (大宗交易) records | None* |\n| `get_shareholder_count` | Shareholder-count history per symbol | None* |\n| `get_lockup_expiry` | Restricted-share lockup release schedule | None* |\n| `get_sector_info` | Sector / industry constituents & performance | None* |\n| `get_research_reports` | Sell-side analyst research reports | None* |\n| `get_stock_news` | Market & company news headlines | None* |\n| `get_sec_filings` | SEC EDGAR filings (10-K/10-Q/8-K, etc.) | None |\n| `get_financial_statements` | Income / balance / cash-flow statements | None* |\n| `get_options_chain` | Options chain (strikes, IV, OI, Greeks) | None* |\n| `get_stock_profile` | Valuation, analyst estimates & institutional holdings (US/HK) | None |\n| `screen_market` | Market screener with fundamental/technical filters | None* |\n| `search_symbol` | Symbol / ticker search across markets | None |\n| `get_macro_series` | FRED macroeconomic series | FRED_API_KEY |\n| `iwencai_search` | A-share natural-language research search | IWENCAI_KEY |\n| `qveris_search` | Search QVeris premium data/tool marketplace (free discovery) | QVERIS_API_KEY + paid mode |\n| `qveris_inspect` | Inspect QVeris tool schemas before executing (free) | QVERIS_API_KEY + paid mode |\n| `qveris_execute` | Execute a QVeris capability; budget-bounded, may be billable | QVERIS_API_KEY + paid mode |\n| `web_search` | Search the web via DuckDuckGo | None |\n| `read_url` | Fetch web page as Markdown | None |\n| `read_document` | Extract text from PDF/DOCX/XLSX/PPTX/images | None |\n| `write_file` | Write files (config, strategy code) | None |\n| `read_file` | Read file contents | None |\n| `list_strategies` | Browse discoverable strategies (Alpha Zoo + SDM store) | None |\n| `query_strategies` | Evidence-gated query: regime / Sharpe / quality / cost filters | None |\n| `get_strategy_evidence` | Per-regime evidence rows for one strategy | None |\n| `refresh_strategy_evidence` | Rebuild the disposable strategy-evidence cache from run artifacts | None |\n| `analyze_trade_journal` | Parse broker CSV → profile + behavior diagnostics | None |\n| `extract_shadow_strategy` | Distill 3-5 if-then rules from profitable roundtrips | None |\n| `run_shadow_backtest` | Multi-market backtest + delta-PnL attribution | None* |\n| `render_shadow_report` | HTML/PDF shadow report (8 sections + charts) | None |\n| `scan_shadow_signals` | Today's symbols matching the shadow's cadence | None |\n| `list_swarm_presets` | List multi-agent team presets | None |\n| `run_swarm` | Execute a multi-agent research team | LLM key |\n| `get_swarm_status` | Poll swarm run status without blocking | None |\n| `get_run_result` | Get final report and task summaries | None |\n| `list_runs` | List recent swarm runs with metadata | None |\n| `reap_stale_runs` | Finalize stale swarm runs | None |\n| `retry_run` | Re-run a failed/stale swarm run | LLM key |\n| `trading_connections` | List selectable connector profiles | None |\n| `trading_select_connection` | Select the default connector profile | None |\n| `trading_check` | Check connector readiness | Connector app/OAuth |\n| `trading_account` | Read account summary from selected connector | Connector app/OAuth |\n| `trading_positions` | Read positions from selected connector | Connector app/OAuth |\n| `trading_orders` | Read open orders from selected connector | Connector app/OAuth |\n| `trading_quote` | Read a quote snapshot from selected connector | Connector app/OAuth |\n| `trading_history` | Read historical bars from selected connector | Connector app/OAuth |\n| `get_institutional_holdings` | SEC 13F-HR holdings by manager/ticker + quarter-over-quarter position diffs | None |\n| `etf_holdings` | ETF look-through — SEC N-PORT (US) and full-book A-share fund reports | None |\n| `prediction_market` | Event-contract search/market/history as labelled implied probability | None |\n| `research_papers` | arXiv + OpenAlex search/read with source-anchored claim extraction | None |\n| `quantlib_call` | Pure-compute finance math — 265 functions across 19 quantlib modules | None |\n| `cashflow_performance` | XIRR / MOIC / DPI / TVPI / TWR / Modified Dietz over dated cash flows | None |\n| `orderbook_depth` | Crypto L2 ladder — spread bps, depth imbalance, impact cost | None |\n| `sentiment` | Local lexicon text scoring + crypto Fear & Greed Index | None |\n| `technical_indicators` | RSI / MACD / Bollinger / SMA / EMA through the existing loaders | None* |\n| `get_fundamentals` | PIT-safe SEC fundamentals panels (filed-date anchored) | None |\n\n<sub>*A-share symbols require `TUSHARE_TOKEN`. HK/US/Canada/crypto are free. Trading connector rows use the selected connector profile, e.g. IBKR local TWS/Gateway or Robinhood MCP OAuth.</sub>\n\n## Quick Start\n\n```bash\npip install vibe-trading-ai\n```\n\nThat's it — no API keys needed for HK/US/Canada/crypto markets. Start using `backtest`, `get_market_data`, `analyze_options`, `analyze_trade_journal`, `extract_shadow_strategy`, `web_search`, the **Alpha Zoo** (`vibe-trading alpha bench --zoo gtja191 --universe csi300 --period 2018-2025`), and all 90 skills immediately.\n\n## Loading Tools from External MCP Servers\n\nThe built-in agent can load tools from your own external MCP servers in addition to its local toolset.\n\n> **Note:** This is the *MCP client* path — the opposite of the MCP plugin listed above. The plugin above makes Vibe-Trading's tools available to your agents. This section lets Vibe-Trading's own agent call tools from *your* servers.\n\n### Setup\n\nCreate `~/.vibe-trading/agent.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"my-server\": {\n      \"command\": \"uvx\",\n      \"args\": [\"my-mcp-server\"],\n      \"toolTimeout\": 30,\n      \"enabledTools\": [\"*\"]\n    }\n  }\n}\n```\n\nOrdinary external MCP tools appear automatically in every `vibe-trading run` / `vibe-trading chat` call. They are injected after local tools under stable names: `mcp_<server>_<tool>`. Live-broker MCP servers are consumed through the connector-scoped `trading_*` tools instead of exposing raw `mcp_<broker>_*` tools to the agent.\n\n### Official IBKR MCP read-only probe\n\nAdd Interactive Brokers' official MCP endpoint as a read-only external server:\n\n```json\n{\n  \"mcpServers\": {\n    \"ibkr\": {\n      \"type\": \"streamableHttp\",\n      \"url\": \"https://api.ibkr.com/v1/api/mcp-public\",\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\nAuthorize it with `vibe-trading connector authorize ibkr-live-official-mcp-readonly`. The wildcard is accepted\nonly for this `mcp.read` probe. Generic `trading_account` and `trading_positions`\ncalls stay disabled until IBKR publishes stable read tool names that Vibe-Trading\ncan map safely; `mcp.write` requires an explicit tool allowlist and live\norder-guard handling. If IBKR issues a pre-registered OAuth client, add\n`clientId` and `clientSecret` inside `auth`.\n\n### Official eToro Public API MCP (discovery + dev)\n\neToro ships a hosted MCP at `https://mcp.public-api.etoro.com` with live OpenAPI\nroute discovery (`get-all-routes`, `get-route-spec`) and optional execution\n(`execute-read`, `execute-write`). Use it for **API exploration and codegen** —\nproduction agent trading in Vibe-Trading goes through the built-in `etoro-*`\nconnector profiles and `trading_*` / `etoro_*` tools (mandate gate on live writes).\n\nAdd to `~/.vibe-trading/agent.json` (credentials on the connection, not in chat):\n\n```json\n{\n  \"mcpServers\": {\n    \"etoro-public-api\": {\n      \"type\": \"streamableHttp\",\n      \"url\": \"https://mcp.public-api.etoro.com\",\n      \"headers\": {\n        \"x-api-key\": \"YOUR_PUBLIC_API_KEY\",\n        \"x-user-key\": \"YOUR_USER_KEY\"\n      },\n      \"enabledTools\": [\"get-all-routes\", \"get-route-spec\", \"execute-read\"]\n    }\n  }\n}\n```\n\nOmit `execute-write` unless you want the MCP to place trades directly (bypasses\nVibe-Trading's live mandate gate). Install skill:\n`https://mcp.public-api.etoro.com/skill`\n\n### Trading connector profiles\n\nThe public trading surface is connector-first. Choose a connector profile, then\npaper/live is just an attribute under that connector.\n\n```bash\npip install \"vibe-trading-ai[ibkr]\"\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 ports are TWS paper `7497`, IB Gateway paper `4002`, TWS live-readonly\n`7496`, and IB Gateway live-readonly `4001`.\n\n### Config fields\n\n| Field | Required | Default | Description |\n|-------|----------|---------|-------------|\n| `type` | stdio: no, HTTP: yes | inferred only for stdio | Transport type. Use `sse` or `streamableHttp` for URL-based servers. |\n| `command` | stdio: yes | — | Executable to launch |\n| `args` | no | `[]` | Command arguments |\n| `env` | no | `{}` | Extra env vars for the subprocess |\n| `url` | HTTP: yes | — | Remote SSE / streamable HTTP endpoint URL |\n| `headers` | no | `{}` | Extra HTTP headers for SSE / streamable HTTP servers |\n| `toolTimeout` | no | `30` | Seconds before a tool call is cancelled |\n| `enabledTools` | no | `[\"*\"]` | Allowlist of remote tool names. `[\"*\"]` enables all |\n\nFor URL-based transports, `type` is required. The agent no longer guesses between SSE and streamable HTTP from the URL suffix.\n\n### Per-session override (API)\n\n> **Security — disabled by default.** `mcpServers` defines subprocess `command`/`args`/`env` and is therefore restricted to operator-level trust. API callers **cannot** inject MCP server definitions through `POST /sessions` unless the server operator explicitly opts in.\n\nTo enable session-level MCP injection, set the environment variable on the server before starting the agent:\n\n```bash\nexport ALLOW_SESSION_MCP_SERVERS=1\n```\n\nWith the opt-in active, pass `mcpServers` inside `session.config` to extend or replace the global config for that session only:\n\n```json\n{\n  \"config\": {\n    \"mcpServers\": {\n      \"research\": {\n        \"command\": \"uvx\",\n        \"args\": [\"research-mcp\"],\n        \"enabledTools\": [\"search\"]\n      }\n    }\n  }\n}\n```\n\nWithout `ALLOW_SESSION_MCP_SERVERS=1`, any `mcpServers` key in `session.config` is silently stripped before config loading. The global operator config on disk (`~/.vibe-trading/agent.json`) is always respected regardless of this flag.\n\n### v1 limits\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 are not exposed.\n- **Swarm:** MCP tools are excluded from Swarm worker registries in v1.\n- **Hot reload:** not supported. Restart the process to pick up config changes.\n\n### Failure handling\n\n| Case | Behavior |\n|------|----------|\n| Missing config file | falls back to empty config — no MCP servers loaded |\n| Invalid config file | logs a warning and falls back to empty config |\n| Server fails to start | that server is skipped; local tools and other servers still load |\n| Tool call times out | returns a normalized error payload instead of raising |\n| Two server names collide after sanitization | deterministic hash suffix appended; operator warning emitted |\n\n\n\n## Examples\n\n**Backtest a MACD strategy on Apple:**\n> Backtest AAPL with MACD crossover strategy (fast=12, slow=26, signal=9) for 2024\n\n**Analyze my trade journal and build a Shadow Account:**\n> Call analyze_trade_journal on ~/Downloads/tonghuashun.csv, then extract_shadow_strategy with min_support=3, then run_shadow_backtest for the last year, then render_shadow_report.\n\n**Run an investment committee review:**\n> Use run_swarm with investment_committee preset to evaluate NVDA. Variables: target=NVDA.US, market=US\n\n**Factor analysis on CSI 300:**\n> Run factor_analysis on CSI 300 stocks using pe_ttm factor from 2023 to 2024\n\n**Options analysis:**\n> Use analyze_options: spot=100, strike=105, 90 days, vol=25%, rate=3%\n\n**Multi-leg options payoff:**\n> Use analyze_options_payoff for a 95/105 bull call spread at spot 100 with 30 days remaining: long one 95 call at premium 8, short one 105 call at premium 3, multiplier 100, commission rate 0.001.\n\nFile v0.1.16:_meta.json\n\n{\n  \"ownerId\": \"kn770cyb3pxyn6295zdsexszb983yf2p\",\n  \"slug\": \"vibe-trading\",\n  \"version\": \"0.1.16\",\n  \"publishedAt\": 1790671028271\n}\n\nFile v0.1.16:skill-card.md\n\n## Description:\n\nA finance research toolkit for market analysis, strategy backtesting, factor and options analysis, trade-journal review, and multi-agent research.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[warren618](https://clawhub.ai/user/warren618)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nTraders, researchers, and developers use this skill to analyze market data, test investment strategies, review trading behavior, and produce research reports across equity and crypto markets.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: External MCP servers can expose arbitrary tools when wildcard access is enabled.\n\nMitigation: Enable only trusted MCP servers and explicitly allowlist the tools the agent needs.\n\nRisk: Broker and OAuth connections can grant higher-risk trading access.\n\nMitigation: Keep credentials limited to read-only or paper profiles unless live trading is intentionally authorized.\n\n## Reference(s):\n\n- [Vibe-Trading on ClawHub](https://clawhub.ai/warren618/skills/vibe-trading)\n\n## Skill Output:\n\n**Output Type(s):** [Analysis, Markdown, Code, Shell commands, Configuration instructions]\n\n**Output Format:** [Text and structured tool results, with optional HTML or PDF research reports]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Some data providers, multi-agent research, and broker connectors require separate credentials.]\n\n## Skill Version(s):\n\n0.1.16 (source: skill frontmatter and server release)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v0.1.15: 3 files, 12534 bytes\n\nFiles: skill-card.md (2558b), SKILL.md (25343b), _meta.json (132b)\n\nFile v0.1.15:SKILL.md\n\n---\nname: vibe-trading\nversion: 0.1.15\ndescription: Professional finance research toolkit — backtesting (10 engines + benchmark comparison panel), factor analysis, Alpha Zoo (462 pre-built alphas across qlib158/alpha101/gtja191/academic/fundamental), options pricing, 90 finance skills, 30 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract → backtest → render) across 27 market-data sources (tushare, yfinance, okx, binance, akshare, baostock, tencent, mootdx, ccxt, futu, mt5, tickerall, local, eastmoney, sina, stooq, yahoo, pykrx, india_broker, qveris, longbridge, nobitex, wallex, plus optional-key finnhub/alphavantage/tiingo/fmp).\ndependencies:\n  python: \">=3.11\"\n  pip:\n    - vibe-trading-ai\nenv:\n  - name: TUSHARE_TOKEN\n    description: \"Tushare API token for China A-share data (optional — HK/US/Canada/crypto work without any key)\"\n    required: false\n  - name: OPENAI_API_KEY\n    description: \"OpenAI-compatible API key — only needed for run_swarm (multi-agent teams). All other tools work without it.\"\n    required: false\n  - name: LANGCHAIN_MODEL_NAME\n    description: \"LLM model name for run_swarm (e.g. deepseek/deepseek-v4-pro). Only needed if using run_swarm.\"\n    required: false\nmcp:\n  command: vibe-trading-mcp\n  args: []\n---\n\n# Vibe-Trading\n\nProfessional finance research toolkit with AI-powered backtesting (10 engines), multi-agent teams, 90 specialized skills, the **Alpha Zoo** (462 pre-built quantitative alphas across qlib158 / alpha101 / gtja191 / academic / fundamental with one-line CLI benchmarking), and the Shadow Account loop — extract your implicit trading rules from a journal, backtest them across A股/港股/美股/crypto, then see where they would have served you better.\n\n## Setup\n\n```bash\npip install vibe-trading-ai\n```\n\n> **Package name vs commands:** The PyPI package is `vibe-trading-ai`. Once installed, you get:\n>\n> | Command | Purpose |\n> |---------|---------|\n> | `vibe-trading` | Interactive CLI / TUI |\n> | `vibe-trading serve` | Launch FastAPI web server |\n> | `vibe-trading-mcp` | Start MCP server (for Claude Desktop, OpenClaw, Cursor, etc.) |\n\nAdd to your agent's MCP config:\n\n```json\n{\n  \"mcpServers\": {\n    \"vibe-trading\": {\n      \"command\": \"vibe-trading-mcp\"\n    }\n  }\n}\n```\n\n### API Key Requirements\n\nCore research MCP tools work with zero API keys for HK/US/Canada/crypto. After `pip install`, backtesting, market data, factor analysis, options pricing, chart patterns, web search, document reading, trade journal analysis, shadow-account extraction/backtest/report, the Alpha Zoo (462 pre-built alphas), and all 90 skills are ready to use. IBKR tools require a local TWS / IB Gateway session; `run_swarm` requires an LLM key.\n\n| Feature | Key needed | When |\n|---------|-----------|------|\n| HK/US/Canada equities & crypto | None | Always free (yfinance / stooq / yahoo + OKX) |\n| China A-share data | None | Free via akshare / baostock / tencent / sina / eastmoney / mootdx fallback (`TUSHARE_TOKEN` optional for premium quality) |\n| Premium US fundamentals/quotes | `FINNHUB_API_KEY` / `ALPHAVANTAGE_API_KEY` / `TIINGO_API_KEY` / `FMP_API_KEY` | Only for optional-key providers (graceful fallback to free sources) |\n| Multi-agent swarm (`run_swarm`) | `OPENAI_API_KEY` + `LANGCHAIN_MODEL_NAME` | Swarm spawns internal LLM workers |\n\n## What You Can Do\n\n### Shadow Account — flagship loop\n\nFeed a CSV broker export (同花顺 / 东财 / 富途 / generic), and the agent will:\n1. `analyze_trade_journal` — profile your behavior (holding period, win rate, disposition effect, chasing, overtrading, anchoring).\n2. `extract_shadow_strategy` — distill 3-5 if-then rules that describe your profitable roundtrips.\n3. `run_shadow_backtest` — backtest those rules across A/HK/US/crypto and compute delta-PnL vs your realized trades.\n4. `render_shadow_report` — produce an HTML/PDF report (8 sections + charts) with today's matching signals.\n5. `scan_shadow_signals` — list today's symbols that match your shadow's entry cadence (research only).\n\n### Backtesting\nCreate and run quantitative strategies across 10 engines (ChinaA, GlobalEquity, IndiaEquity, KoreaEquity, VietnamEquity, Crypto, ChinaFutures, GlobalFutures, Forex + options) with 27 market-data sources (auto-detect + ordered fallback; the hosted forex `tickerall` source is explicit-only):\n- **HK/US equities** via yfinance / stooq / yahoo (free, no API key); optionally via **Longbridge** historical OHLCV (`longbridge`, requires the optional SDK and `LONGBRIDGE_APP_KEY` / `LONGBRIDGE_APP_SECRET` / `LONGBRIDGE_ACCESS_TOKEN`). To force it for a run, set `\"source\": \"longbridge\"` in `config.json`.\n- **Canada equities (TSX/TSXV)** via yahoo / yfinance using Yahoo's canonical `<TICKER>.TO` (TSX, e.g. `TD.TO`) or `<TICKER>.V` (TSXV, e.g. `PNG.V`) suffixes — free, no API key. The GlobalEquity engine uses CAD identity, whole-share orders, configurable Canadian commission/slippage, and the TSX/TSXV price-increment grid.\n- **India equities (NSE/BSE)** via yahoo / yfinance using `<SYMBOL>.NS` (NSE, e.g. `RELIANCE.NS`) or `<SCRIP>.BO` (BSE, e.g. `500325.BO`) — free, no API key. The `IndiaEquityEngine` models T+1 delivery, no overnight shorts (set `allow_short` for intraday), configurable circuit bands, 1-share lots, and the STT/stamp-duty/exchange/GST cost stack. Optionally back-fill from your live broker via the `india_broker` source (Shoonya/Dhan; requires broker login).\n- **Korea equities (KRX: KOSPI/KOSDAQ)** via pykrx using `<CODE>.KS` (KOSPI, e.g. `005930.KS`) or `<CODE>.KQ` (KOSDAQ, e.g. `247540.KQ`) — free, no API key (`pip install \"vibe-trading-ai[krx]\"`; yahoo/yfinance fallback needs no extra). pykrx serves **daily bars only** (an intraday request falls through to another source) and its adjusted series is Naver-backed rather than a verbatim KRX print. The `KoreaEquityEngine` models same-day round trips (no T+1), the ±30% daily price limit measured from the previous close and quantized to the KRX tick grid, tick-rounded fills, the 0.20% sell-side transaction tax (2026 rate), and 1-share lots. It is **long-only**: `allow_short` is refused, because KRX covered-short and uptick rules cannot be enforced on daily bars.\n- **Vietnam equities (HOSE)** via yahoo / yfinance using `<TICKER>.VN` (e.g. `VIC.VN`) — no API key. Yahoo officially lists HOSE but not HNX or UPCOM; those venues are unsupported and need the `local` source. yfinance is an unofficial Yahoo client, so availability is best-effort and subject to Yahoo's personal-use terms. The `VietnamEquityEngine` approximates the formal T+2 settlement cycle — shares bought on day T normally become sellable during the afternoon session on T+2, informally called T+1.5 — as a two-bar hold on daily data (`vn_settlement_bars` covers scenario testing and future rule changes). It applies HOSE's normal ±7% band around the reference price, rounding the ceiling down and the floor up to the 10/50/100-VND tick grid, and uses 100-share round lots; odd-lot trading is not modelled. Costs are configurable brokerage plus, for individual investors, 0.1% sell-side personal income tax on gross proceeds. It is **long-only**, because operational cash-equity short selling is not generally available in Vietnam.\n- **Cryptocurrency** via OKX or CCXT/100+ exchanges (free, no API key)\n- **China A-shares** via AKShare / baostock / tencent / sina / eastmoney / mootdx (free, no API key) — `TUSHARE_TOKEN` optional for premium quality\n- **Futures, forex, macro** via AKShare (free, no API key)\n- **Forex / metals with no local terminal** via the hosted **TickerAll** MetaTrader 5 feed (`source=\"tickerall\"`, `TICKERALL_API_KEY` + `TICKERALL_ACCOUNT_ID`, read-only) — the same broker feed as the `mt5` loader but over a hosted API on any OS. **Explicit-only** (never an automatic fallback).\n- **HK & A-share equities** via Futu (broker login required, optional)\n- **Local CSV/parquet bars** via the `local` loader (offline, no network)\n- **Premium cross-market data** via QVeris (optional API key)\n- **Premium US data** via optional-key finnhub / alphavantage / tiingo / fmp (graceful fallback to free sources)\n\nFactors: the Alpha101 and QLib158 zoos are tagged for the `equity_in` and `equity_kr` universes, so they compute on NSE/BSE and KRX bars (the GTJA191 zoo stays China-only). Live/paper India trading uses the Shoonya / Dhan connectors (paper + read-only live; live order placement is structurally disabled because those brokers expose no paper/live switch).\n\nExample workflow:\n1. Use `list_skills()` to discover strategy patterns\n2. Use `load_skill(\"strategy-generate\")` for the strategy creation guide\n3. Use `write_file()` to create `config.json` and `code/signal_engine.py`\n4. Use `backtest()` to run and get metrics (Sharpe, return, drawdown, etc.)\n\n### Multi-Agent Swarm Teams\n30 pre-built agent teams for complex research:\n- **Investment Committee**: bull/bear debate → risk review → PM decision\n- **Global Equities Desk**: A-share + HK/US + crypto → global strategist\n- **Crypto Trading Desk**: funding/basis + liquidation + flow → risk manager\n- **Earnings Research Desk**: fundamentals + revisions + options → earnings strategist\n- **Macro/Rates/FX Desk**: rates + FX + commodities → macro PM\n- **Quant Strategy Desk**: screening → factor research → backtest → risk audit\n- **Risk Committee**: drawdown, tail risk, regime analysis\n- And 23 more specialized teams\n\nUse `list_swarm_presets()` to see all teams, then `run_swarm()` to execute.\n\n### Alpha Zoo (462 pre-built alphas)\nOne-line cross-sectional IC / IR / alive-reversed-dead categorisation across five bundled zoos:\n- **qlib158** (154 alphas) — Microsoft Qlib's `Alpha158` feature handler, Apache-2.0 with pinned commit SHA.\n- **alpha101** (101 alphas) — Kakushadze (2015) \"101 Formulaic Alphas\" (arXiv:1601.00991), written from the paper appendix.\n- **gtja191** (191 alphas) — Guotai Junan 2014 \"191 Short-period Trading Alpha Factors\" research report.\n- **academic** (12 factors) — Fama-French 5 + Carhart momentum + Jegadeesh reversal + George-Hwang 52-week-high + Amihud illiquidity + Harvey-Siddique skew + Frazzini-Pedersen betting-against-beta (price-based proxies) + a correlation-rewiring stability score (from the in-repo correlation-regime skill).\n- **fundamental** (4 factors) — PIT-safe earnings yield, ROE, gross profitability, and asset growth from daily fundamental panels.\n\nEach alpha ships with `__alpha_meta__` (formula LaTeX + theme + universe + warmup + columns required), guarded by an AST purity gate + 300-row lookahead sentinel test. Use the `vibe-trading alpha {list,show,bench,compare,export-manifest}` CLI, the `/alpha/*` REST routes (browser at `/alpha-zoo`), or compose multi-factor signals via `ZooSignalEngine.from_zoo(...)`.\n\n### Finance Skills (90)\nComprehensive knowledge base covering:\n- Technical analysis (candlestick, Elliott wave, Ichimoku, SMC, harmonic, chanlun)\n- Quantitative methods (factor research, ML strategy, pair trading, multi-factor)\n- Risk management (VaR/CVaR, stress testing, hedging)\n- Options (Black-Scholes, Greeks, multi-leg strategies, payoff diagrams)\n- HK/US equities (SEC filings, earnings revisions, ETF flows, ADR/H-share arbitrage)\n- Crypto trading desk (funding rates, liquidation heatmaps, stablecoin flows, token unlocks, DeFi yields)\n- Behavioral finance, trade journal diagnostics, shadow account\n- Macro analysis, credit research, sector rotation, and more\n\nUse `load_skill(name)` to access full methodology docs with code templates.\n\n## Available MCP Tools (74)\n\n| Tool | Description | API Key |\n|------|-------------|---------|\n| `list_skills` | List all 90 finance skills | None |\n| `load_skill` | Load full skill documentation | None |\n| `start_research_goal` | Create an auditable research goal | None |\n| `get_research_goal` | Read the current research goal | None |\n| `add_goal_evidence` | Attach evidence to a research goal | None |\n| `update_research_goal_status` | Update goal lifecycle status | None |\n| `backtest` | Run vectorized backtest engine | None* |\n| `factor_analysis` | IC/IR analysis + layered backtest | None* |\n| `alpha_zoo` | Browse bundled alpha metadata and registry health | None |\n| `alpha_bench` | Benchmark one alpha or a complete zoo | None* |\n| `analyze_options` | Black-Scholes price + Greeks | None |\n| `analyze_options_payoff` | Multi-leg expiry payoff + spot/IV scenarios | None |\n| `pattern_recognition` | Detect chart patterns (H&S, double top, etc.) | None |\n| `get_market_data` | Fetch OHLCV data (auto-detect + ordered fallback across 27 sources) | None* |\n| `get_fund_flow` | Capital fund-flow (main/retail net inflow) | None* |\n| `get_dragon_tiger` | Dragon-tiger list (龙虎榜) top buyer/seller seats | None* |\n| `get_northbound_flow` | Northbound (Stock Connect) net flow | None* |\n| `get_margin_trading` | Margin trading & short-selling balances | None* |\n| `get_block_trades` | Block-trade (大宗交易) records | None* |\n| `get_shareholder_count` | Shareholder-count history per symbol | None* |\n| `get_lockup_expiry` | Restricted-share lockup release schedule | None* |\n| `get_sector_info` | Sector / industry constituents & performance | None* |\n| `get_research_reports` | Sell-side analyst research reports | None* |\n| `get_stock_news` | Market & company news headlines | None* |\n| `get_sec_filings` | SEC EDGAR filings (10-K/10-Q/8-K, etc.) | None |\n| `get_financial_statements` | Income / balance / cash-flow statements | None* |\n| `get_options_chain` | Options chain (strikes, IV, OI, Greeks) | None* |\n| `get_stock_profile` | Valuation, analyst estimates & institutional holdings (US/HK) | None |\n| `screen_market` | Market screener with fundamental/technical filters | None* |\n| `search_symbol` | Symbol / ticker search across markets | None |\n| `get_macro_series` | FRED macroeconomic series | FRED_API_KEY |\n| `iwencai_search` | A-share natural-language research search | IWENCAI_KEY |\n| `qveris_search` | Search QVeris premium data/tool marketplace (free discovery) | QVERIS_API_KEY + paid mode |\n| `qveris_inspect` | Inspect QVeris tool schemas before executing (free) | QVERIS_API_KEY + paid mode |\n| `qveris_execute` | Execute a QVeris capability; budget-bounded, may be billable | QVERIS_API_KEY + paid mode |\n| `web_search` | Search the web via DuckDuckGo | None |\n| `read_url` | Fetch web page as Markdown | None |\n| `read_document` | Extract text from PDF/DOCX/XLSX/PPTX/images | None |\n| `write_file` | Write files (config, strategy code) | None |\n| `read_file` | Read file contents | None |\n| `list_strategies` | Browse discoverable strategies (Alpha Zoo + SDM store) | None |\n| `query_strategies` | Evidence-gated query: regime / Sharpe / quality / cost filters | None |\n| `get_strategy_evidence` | Per-regime evidence rows for one strategy | None |\n| `refresh_strategy_evidence` | Rebuild the disposable strategy-evidence cache from run artifacts | None |\n| `analyze_trade_journal` | Parse broker CSV → profile + behavior diagnostics | None |\n| `extract_shadow_strategy` | Distill 3-5 if-then rules from profitable roundtrips | None |\n| `run_shadow_backtest` | Multi-market backtest + delta-PnL attribution | None* |\n| `render_shadow_report` | HTML/PDF shadow report (8 sections + charts) | None |\n| `scan_shadow_signals` | Today's symbols matching the shadow's cadence | None |\n| `list_swarm_presets` | List multi-agent team presets | None |\n| `run_swarm` | Execute a multi-agent research team | LLM key |\n| `get_swarm_status` | Poll swarm run status without blocking | None |\n| `get_run_result` | Get final report and task summaries | None |\n| `list_runs` | List recent swarm runs with metadata | None |\n| `reap_stale_runs` | Finalize stale swarm runs | None |\n| `retry_run` | Re-run a failed/stale swarm run | LLM key |\n| `trading_connections` | List selectable connector profiles | None |\n| `trading_select_connection` | Select the default connector profile | None |\n| `trading_check` | Check connector readiness | Connector app/OAuth |\n| `trading_account` | Read account summary from selected connector | Connector app/OAuth |\n| `trading_positions` | Read positions from selected connector | Connector app/OAuth |\n| `trading_orders` | Read open orders from selected connector | Connector app/OAuth |\n| `trading_quote` | Read a quote snapshot from selected connector | Connector app/OAuth |\n| `trading_history` | Read historical bars from selected connector | Connector app/OAuth |\n| `get_institutional_holdings` | SEC 13F-HR holdings by manager/ticker + quarter-over-quarter position diffs | None |\n| `etf_holdings` | ETF look-through — SEC N-PORT (US) and full-book A-share fund reports | None |\n| `prediction_market` | Event-contract search/market/history as labelled implied probability | None |\n| `research_papers` | arXiv + OpenAlex search/read with source-anchored claim extraction | None |\n| `quantlib_call` | Pure-compute finance math — 265 functions across 19 quantlib modules | None |\n| `cashflow_performance` | XIRR / MOIC / DPI / TVPI / TWR / Modified Dietz over dated cash flows | None |\n| `orderbook_depth` | Crypto L2 ladder — spread bps, depth imbalance, impact cost | None |\n| `sentiment` | Local lexicon text scoring + crypto Fear & Greed Index | None |\n| `technical_indicators` | RSI / MACD / Bollinger / SMA / EMA through the existing loaders | None* |\n| `get_fundamentals` | PIT-safe SEC fundamentals panels (filed-date anchored) | None |\n\n<sub>*A-share symbols require `TUSHARE_TOKEN`. HK/US/Canada/crypto are free. Trading connector rows use the selected connector profile, e.g. IBKR local TWS/Gateway or Robinhood MCP OAuth.</sub>\n\n## Quick Start\n\n```bash\npip install vibe-trading-ai\n```\n\nThat's it — no API keys needed for HK/US/Canada/crypto markets. Start using `backtest`, `get_market_data`, `analyze_options`, `analyze_trade_journal`, `extract_shadow_strategy`, `web_search`, the **Alpha Zoo** (`vibe-trading alpha bench --zoo gtja191 --universe csi300 --period 2018-2025`), and all 90 skills immediately.\n\n## Loading Tools from External MCP Servers\n\nThe built-in agent can load tools from your own external MCP servers in addition to its local toolset.\n\n> **Note:** This is the *MCP client* path — the opposite of the MCP plugin listed above. The plugin above makes Vibe-Trading's tools available to your agents. This section lets Vibe-Trading's own agent call tools from *your* servers.\n\n### Setup\n\nCreate `~/.vibe-trading/agent.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"my-server\": {\n      \"command\": \"uvx\",\n      \"args\": [\"my-mcp-server\"],\n      \"toolTimeout\": 30,\n      \"enabledTools\": [\"*\"]\n    }\n  }\n}\n```\n\nOrdinary external MCP tools appear automatically in every `vibe-trading run` / `vibe-trading chat` call. They are injected after local tools under stable names: `mcp_<server>_<tool>`. Live-broker MCP servers are consumed through the connector-scoped `trading_*` tools instead of exposing raw `mcp_<broker>_*` tools to the agent.\n\n### Official IBKR MCP read-only probe\n\nAdd Interactive Brokers' official MCP endpoint as a read-only external server:\n\n```json\n{\n  \"mcpServers\": {\n    \"ibkr\": {\n      \"type\": \"streamableHttp\",\n      \"url\": \"https://api.ibkr.com/v1/api/mcp-public\",\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\nAuthorize it with `vibe-trading connector authorize ibkr-live-official-mcp-readonly`. The wildcard is accepted\nonly for this `mcp.read` probe. Generic `trading_account` and `trading_positions`\ncalls stay disabled until IBKR publishes stable read tool names that Vibe-Trading\ncan map safely; `mcp.write` requires an explicit tool allowlist and live\norder-guard handling. If IBKR issues a pre-registered OAuth client, add\n`clientId` and `clientSecret` inside `auth`.\n\n### Official eToro Public API MCP (discovery + dev)\n\neToro ships a hosted MCP at `https://mcp.public-api.etoro.com` with live OpenAPI\nroute discovery (`get-all-routes`, `get-route-spec`) and optional execution\n(`execute-read`, `execute-write`). Use it for **API exploration and codegen** —\nproduction agent trading in Vibe-Trading goes through the built-in `etoro-*`\nconnector profiles and `trading_*` / `etoro_*` tools (mandate gate on live writes).\n\nAdd to `~/.vibe-trading/agent.json` (credentials on the connection, not in chat):\n\n```json\n{\n  \"mcpServers\": {\n    \"etoro-public-api\": {\n      \"type\": \"streamableHttp\",\n      \"url\": \"https://mcp.public-api.etoro.com\",\n      \"headers\": {\n        \"x-api-key\": \"YOUR_PUBLIC_API_KEY\",\n        \"x-user-key\": \"YOUR_USER_KEY\"\n      },\n      \"enabledTools\": [\"get-all-routes\", \"get-route-spec\", \"execute-read\"]\n    }\n  }\n}\n```\n\nOmit `execute-write` unless you want the MCP to place trades directly (bypasses\nVibe-Trading's live mandate gate). Install skill:\n`https://mcp.public-api.etoro.com/skill`\n\n### Trading connector profiles\n\nThe public trading surface is connector-first. Choose a connector profile, then\npaper/live is just an attribute under that connector.\n\n```bash\npip install \"vibe-trading-ai[ibkr]\"\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 ports are TWS paper `7497`, IB Gateway paper `4002`, TWS live-readonly\n`7496`, and IB Gateway live-readonly `4001`.\n\n### Config fields\n\n| Field | Required | Default | Description |\n|-------|----------|---------|-------------|\n| `type` | stdio: no, HTTP: yes | inferred only for stdio | Transport type. Use `sse` or `streamableHttp` for URL-based servers. |\n| `command` | stdio: yes | — | Executable to launch |\n| `args` | no | `[]` | Command arguments |\n| `env` | no | `{}` | Extra env vars for the subprocess |\n| `url` | HTTP: yes | — | Remote SSE / streamable HTTP endpoint URL |\n| `headers` | no | `{}` | Extra HTTP headers for SSE / streamable HTTP servers |\n| `toolTimeout` | no | `30` | Seconds before a tool call is cancelled |\n| `enabledTools` | no | `[\"*\"]` | Allowlist of remote tool names. `[\"*\"]` enables all |\n\nFor URL-based transports, `type` is required. The agent no longer guesses between SSE and streamable HTTP from the URL suffix.\n\n### Per-session override (API)\n\n> **Security — disabled by default.** `mcpServers` defines subprocess `command`/`args`/`env` and is therefore restricted to operator-level trust. API callers **cannot** inject MCP server definitions through `POST /sessions` unless the server operator explicitly opts in.\n\nTo enable session-level MCP injection, set the environment variable on the server before starting the agent:\n\n```bash\nexport ALLOW_SESSION_MCP_SERVERS=1\n```\n\nWith the opt-in active, pass `mcpServers` inside `session.config` to extend or replace the global config for that session only:\n\n```json\n{\n  \"config\": {\n    \"mcpServers\": {\n      \"research\": {\n        \"command\": \"uvx\",\n        \"args\": [\"research-mcp\"],\n        \"enabledTools\": [\"search\"]\n      }\n    }\n  }\n}\n```\n\nWithout `ALLOW_SESSION_MCP_SERVERS=1`, any `mcpServers` key in `session.config` is silently stripped before config loading. The global operator config on disk (`~/.vibe-trading/agent.json`) is always respected regardless of this flag.\n\n### v1 limits\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 are not exposed.\n- **Swarm:** MCP tools are excluded from Swarm worker registries in v1.\n- **Hot reload:** not supported. Restart the process to pick up config changes.\n\n### Failure handling\n\n| Case | Behavior |\n|------|----------|\n| Missing config file | falls back to empty config — no MCP servers loaded |\n| Invalid config file | logs a warning and falls back to empty config |\n| Server fails to start | that server is skipped; local tools and other servers still load |\n| Tool call times out | returns a normalized error payload instead of raising |\n| Two server names collide after sanitization | deterministic hash suffix appended; operator warning emitted |\n\n\n\n## Examples\n\n**Backtest a MACD strategy on Apple:**\n> Backtest AAPL with MACD crossover strategy (fast=12, slow=26, signal=9) for 2024\n\n**Analyze my trade journal and build a Shadow Account:**\n> Call analyze_trade_journal on ~/Downloads/tonghuashun.csv, then extract_shadow_strategy with min_support=3, then run_shadow_backtest for the last year, then render_shadow_report.\n\n**Run an investment committee review:**\n> Use run_swarm with investment_committee preset to evaluate NVDA. Variables: target=NVDA.US, market=US\n\n**Factor analysis on CSI 300:**\n> Run factor_analysis on CSI 300 stocks using pe_ttm factor from 2023 to 2024\n\n**Options analysis:**\n> Use analyze_options: spot=100, strike=105, 90 days, vol=25%, rate=3%\n\n**Multi-leg options payoff:**\n> Use analyze_options_payoff for a 95/105 bull call spread at spot 100 with 30 days remaining: long one 95 call at premium 8, short one 105 call at premium 3, multiplier 100, commission rate 0.001.\n\nFile v0.1.15:_meta.json\n\n{\n  \"ownerId\": \"kn770cyb3pxyn6295zdsexszb983yf2p\",\n  \"slug\": \"vibe-trading\",\n  \"version\": \"0.1.15\",\n  \"publishedAt\": 1788940177799\n}\n\nFile v0.1.15:skill-card.md\n\n## Description:\n\nVibe-Trading is a professional finance research toolkit for backtesting, factor analysis, alpha exploration, options analysis, trade-journal review, shadow-account reports, market data access, and multi-agent finance research.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[warren618](https://clawhub.ai/user/warren618)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers, analysts, and finance researchers use this skill to run market-data workflows, backtests, factor analysis, options calculations, trade-journal analysis, and structured multi-agent investment research.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The security evidence flags broad external tool loading and an optional broker-write path that can bypass trading safeguards.\n\nMitigation: Use a dedicated virtual environment or container, pin and verify the package version, keep broker connections read-only or paper-only by default, and require explicit allowlists and account-level approvals before enabling broker-write tools.\n\nRisk: Agent workflows can access market data, broker connectors, web content, documents, and optional LLM-backed swarm teams, which may expose credentials or sensitive portfolio data if configured broadly.\n\nMitigation: Provide only the environment variables and connector credentials required for the intended workflow, prefer read-only scopes, and avoid wildcard MCP tool exposure except for deliberately trusted read-only probes.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/warren618/skills/vibe-trading)\n- [IBKR public MCP endpoint](https://api.ibkr.com/v1/api/mcp-public)\n- [eToro public API MCP](https://mcp.public-api.etoro.com)\n- [eToro public API MCP skill](https://mcp.public-api.etoro.com/skill)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, Code, Shell commands, Configuration, Guidance]\n\n**Output Format:** [Markdown, JSON, HTML/PDF reports, shell commands, and configuration snippets]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May call external market-data, broker, document, web, and LLM services depending on configured tools and credentials.]\n\n## Skill Version(s):\n\n0.1.15 (source: server release evidence and skill frontmatter)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v0.1.14: 3 files, 12843 bytes\n\nFiles: skill-card.md (3210b), SKILL.md (25319b), _meta.json (132b)\n\nFile v0.1.14:SKILL.md\n\n---\nname: vibe-trading\nversion: 0.1.14\ndescription: Professional finance research toolkit — backtesting (10 engines + benchmark comparison panel), factor analysis, Alpha Zoo (462 pre-built alphas across qlib158/alpha101/gtja191/academic/fundamental), options pricing, 90 finance skills, 30 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract → backtest → render) across 25 market-data sources (tushare, yfinance, okx, binance, akshare, baostock, tencent, mootdx, ccxt, futu, mt5, tickerall, local, eastmoney, sina, stooq, yahoo, pykrx, india_broker, qveris, longbridge, plus optional-key finnhub/alphavantage/tiingo/fmp).\ndependencies:\n  python: \">=3.11\"\n  pip:\n    - vibe-trading-ai\nenv:\n  - name: TUSHARE_TOKEN\n    description: \"Tushare API token for China A-share data (optional — HK/US/Canada/crypto work without any key)\"\n    required: false\n  - name: OPENAI_API_KEY\n    description: \"OpenAI-compatible API key — only needed for run_swarm (multi-agent teams). All other tools work without it.\"\n    required: false\n  - name: LANGCHAIN_MODEL_NAME\n    description: \"LLM model name for run_swarm (e.g. deepseek/deepseek-v4-pro). Only needed if using run_swarm.\"\n    required: false\nmcp:\n  command: vibe-trading-mcp\n  args: []\n---\n\n# Vibe-Trading\n\nProfessional finance research toolkit with AI-powered backtesting (10 engines), multi-agent teams, 90 specialized skills, the **Alpha Zoo** (462 pre-built quantitative alphas across qlib158 / alpha101 / gtja191 / academic / fundamental with one-line CLI benchmarking), and the Shadow Account loop — extract your implicit trading rules from a journal, backtest them across A股/港股/美股/crypto, then see where they would have served you better.\n\n## Setup\n\n```bash\npip install vibe-trading-ai\n```\n\n> **Package name vs commands:** The PyPI package is `vibe-trading-ai`. Once installed, you get:\n>\n> | Command | Purpose |\n> |---------|---------|\n> | `vibe-trading` | Interactive CLI / TUI |\n> | `vibe-trading serve` | Launch FastAPI web server |\n> | `vibe-trading-mcp` | Start MCP server (for Claude Desktop, OpenClaw, Cursor, etc.) |\n\nAdd to your agent's MCP config:\n\n```json\n{\n  \"mcpServers\": {\n    \"vibe-trading\": {\n      \"command\": \"vibe-trading-mcp\"\n    }\n  }\n}\n```\n\n### API Key Requirements\n\nCore research MCP tools work with zero API keys for HK/US/Canada/crypto. After `pip install`, backtesting, market data, factor analysis, options pricing, chart patterns, web search, document reading, trade journal analysis, shadow-account extraction/backtest/report, the Alpha Zoo (462 pre-built alphas), and all 90 skills are ready to use. IBKR tools require a local TWS / IB Gateway session; `run_swarm` requires an LLM key.\n\n| Feature | Key needed | When |\n|---------|-----------|------|\n| HK/US/Canada equities & crypto | None | Always free (yfinance / stooq / yahoo + OKX) |\n| China A-share data | None | Free via akshare / baostock / tencent / sina / eastmoney / mootdx fallback (`TUSHARE_TOKEN` optional for premium quality) |\n| Premium US fundamentals/quotes | `FINNHUB_API_KEY` / `ALPHAVANTAGE_API_KEY` / `TIINGO_API_KEY` / `FMP_API_KEY` | Only for optional-key providers (graceful fallback to free sources) |\n| Multi-agent swarm (`run_swarm`) | `OPENAI_API_KEY` + `LANGCHAIN_MODEL_NAME` | Swarm spawns internal LLM workers |\n\n## What You Can Do\n\n### Shadow Account — flagship loop\n\nFeed a CSV broker export (同花顺 / 东财 / 富途 / generic), and the agent will:\n1. `analyze_trade_journal` — profile your behavior (holding period, win rate, disposition effect, chasing, overtrading, anchoring).\n2. `extract_shadow_strategy` — distill 3-5 if-then rules that describe your profitable roundtrips.\n3. `run_shadow_backtest` — backtest those rules across A/HK/US/crypto and compute delta-PnL vs your realized trades.\n4. `render_shadow_report` — produce an HTML/PDF report (8 sections + charts) with today's matching signals.\n5. `scan_shadow_signals` — list today's symbols that match your shadow's entry cadence (research only).\n\n### Backtesting\nCreate and run quantitative strategies across 10 engines (ChinaA, GlobalEquity, IndiaEquity, KoreaEquity, VietnamEquity, Crypto, ChinaFutures, GlobalFutures, Forex + options) with 25 market-data sources (auto-detect + ordered fallback; the hosted forex `tickerall` source is explicit-only):\n- **HK/US equities** via yfinance / stooq / yahoo (free, no API key); optionally via **Longbridge** historical OHLCV (`longbridge`, requires the optional SDK and `LONGBRIDGE_APP_KEY` / `LONGBRIDGE_APP_SECRET` / `LONGBRIDGE_ACCESS_TOKEN`). To force it for a run, set `\"source\": \"longbridge\"` in `config.json`.\n- **Canada equities (TSX/TSXV)** via yahoo / yfinance using Yahoo's canonical `<TICKER>.TO` (TSX, e.g. `TD.TO`) or `<TICKER>.V` (TSXV, e.g. `PNG.V`) suffixes — free, no API key. The GlobalEquity engine uses CAD identity, whole-share orders, configurable Canadian commission/slippage, and the TSX/TSXV price-increment grid.\n- **India equities (NSE/BSE)** via yahoo / yfinance using `<SYMBOL>.NS` (NSE, e.g. `RELIANCE.NS`) or `<SCRIP>.BO` (BSE, e.g. `500325.BO`) — free, no API key. The `IndiaEquityEngine` models T+1 delivery, no overnight shorts (set `allow_short` for intraday), configurable circuit bands, 1-share lots, and the STT/stamp-duty/exchange/GST cost stack. Optionally back-fill from your live broker via the `india_broker` source (Shoonya/Dhan; requires broker login).\n- **Korea equities (KRX: KOSPI/KOSDAQ)** via pykrx using `<CODE>.KS` (KOSPI, e.g. `005930.KS`) or `<CODE>.KQ` (KOSDAQ, e.g. `247540.KQ`) — free, no API key (`pip install \"vibe-trading-ai[krx]\"`; yahoo/yfinance fallback needs no extra). pykrx serves **daily bars only** (an intraday request falls through to another source) and its adjusted series is Naver-backed rather than a verbatim KRX print. The `KoreaEquityEngine` models same-day round trips (no T+1), the ±30% daily price limit measured from the previous close and quantized to the KRX tick grid, tick-rounded fills, the 0.20% sell-side transaction tax (2026 rate), and 1-share lots. It is **long-only**: `allow_short` is refused, because KRX covered-short and uptick rules cannot be enforced on daily bars.\n- **Vietnam equities (HOSE)** via yahoo / yfinance using `<TICKER>.VN` (e.g. `VIC.VN`) — no API key. Yahoo officially lists HOSE but not HNX or UPCOM; those venues are unsupported and need the `local` source. yfinance is an unofficial Yahoo client, so availability is best-effort and subject to Yahoo's personal-use terms. The `VietnamEquityEngine` approximates the formal T+2 settlement cycle — shares bought on day T normally become sellable during the afternoon session on T+2, informally called T+1.5 — as a two-bar hold on daily data (`vn_settlement_bars` covers scenario testing and future rule changes). It applies HOSE's normal ±7% band around the reference price, rounding the ceiling down and the floor up to the 10/50/100-VND tick grid, and uses 100-share round lots; odd-lot trading is not modelled. Costs are configurable brokerage plus, for individual investors, 0.1% sell-side personal income tax on gross proceeds. It is **long-only**, because operational cash-equity short selling is not generally available in Vietnam.\n- **Cryptocurrency** via OKX or CCXT/100+ exchanges (free, no API key)\n- **China A-shares** via AKShare / baostock / tencent / sina / eastmoney / mootdx (free, no API key) — `TUSHARE_TOKEN` optional for premium quality\n- **Futures, forex, macro** via AKShare (free, no API key)\n- **Forex / metals with no local terminal** via the hosted **TickerAll** MetaTrader 5 feed (`source=\"tickerall\"`, `TICKERALL_API_KEY` + `TICKERALL_ACCOUNT_ID`, read-only) — the same broker feed as the `mt5` loader but over a hosted API on any OS. **Explicit-only** (never an automatic fallback).\n- **HK & A-share equities** via Futu (broker login required, optional)\n- **Local CSV/parquet bars** via the `local` loader (offline, no network)\n- **Premium cross-market data** via QVeris (optional API key)\n- **Premium US data** via optional-key finnhub / alphavantage / tiingo / fmp (graceful fallback to free sources)\n\nFactors: the Alpha101 and QLib158 zoos are tagged for the `equity_in` and `equity_kr` universes, so they compute on NSE/BSE and KRX bars (the GTJA191 zoo stays China-only). Live/paper India trading uses the Shoonya / Dhan connectors (paper + read-only live; live order placement is structurally disabled because those brokers expose no paper/live switch).\n\nExample workflow:\n1. Use `list_skills()` to discover strategy patterns\n2. Use `load_skill(\"strategy-generate\")` for the strategy creation guide\n3. Use `write_file()` to create `config.json` and `code/signal_engine.py`\n4. Use `backtest()` to run and get metrics (Sharpe, return, drawdown, etc.)\n\n### Multi-Agent Swarm Teams\n30 pre-built agent teams for complex research:\n- **Investment Committee**: bull/bear debate → risk review → PM decision\n- **Global Equities Desk**: A-share + HK/US + crypto → global strategist\n- **Crypto Trading Desk**: funding/basis + liquidation + flow → risk manager\n- **Earnings Research Desk**: fundamentals + revisions + options → earnings strategist\n- **Macro/Rates/FX Desk**: rates + FX + commodities → macro PM\n- **Quant Strategy Desk**: screening → factor research → backtest → risk audit\n- **Risk Committee**: drawdown, tail risk, regime analysis\n- And 23 more specialized teams\n\nUse `list_swarm_presets()` to see all teams, then `run_swarm()` to execute.\n\n### Alpha Zoo (462 pre-built alphas)\nOne-line cross-sectional IC / IR / alive-reversed-dead categorisation across five bundled zoos:\n- **qlib158** (154 alphas) — Microsoft Qlib's `Alpha158` feature handler, Apache-2.0 with pinned commit SHA.\n- **alpha101** (101 alphas) — Kakushadze (2015) \"101 Formulaic Alphas\" (arXiv:1601.00991), written from the paper appendix.\n- **gtja191** (191 alphas) — Guotai Junan 2014 \"191 Short-period Trading Alpha Factors\" research report.\n- **academic** (12 factors) — Fama-French 5 + Carhart momentum + Jegadeesh reversal + George-Hwang 52-week-high + Amihud illiquidity + Harvey-Siddique skew + Frazzini-Pedersen betting-against-beta (price-based proxies) + a correlation-rewiring stability score (from the in-repo correlation-regime skill).\n- **fundamental** (4 factors) — PIT-safe earnings yield, ROE, gross profitability, and asset growth from daily fundamental panels.\n\nEach alpha ships with `__alpha_meta__` (formula LaTeX + theme + universe + warmup + columns required), guarded by an AST purity gate + 300-row lookahead sentinel test. Use the `vibe-trading alpha {list,show,bench,compare,export-manifest}` CLI, the `/alpha/*` REST routes (browser at `/alpha-zoo`), or compose multi-factor signals via `ZooSignalEngine.from_zoo(...)`.\n\n### Finance Skills (90)\nComprehensive knowledge base covering:\n- Technical analysis (candlestick, Elliott wave, Ichimoku, SMC, harmonic, chanlun)\n- Quantitative methods (factor research, ML strategy, pair trading, multi-factor)\n- Risk management (VaR/CVaR, stress testing, hedging)\n- Options (Black-Scholes, Greeks, multi-leg strategies, payoff diagrams)\n- HK/US equities (SEC filings, earnings revisions, ETF flows, ADR/H-share arbitrage)\n- Crypto trading desk (funding rates, liquidation heatmaps, stablecoin flows, token unlocks, DeFi yields)\n- Behavioral finance, trade journal diagnostics, shadow account\n- Macro analysis, credit research, sector rotation, and more\n\nUse `load_skill(name)` to access full methodology docs with code templates.\n\n## Available MCP Tools (74)\n\n| Tool | Description | API Key |\n|------|-------------|---------|\n| `list_skills` | List all 90 finance skills | None |\n| `load_skill` | Load full skill documentation | None |\n| `start_research_goal` | Create an auditable research goal | None |\n| `get_research_goal` | Read the current research goal | None |\n| `add_goal_evidence` | Attach evidence to a research goal | None |\n| `update_research_goal_status` | Update goal lifecycle status | None |\n| `backtest` | Run vectorized backtest engine | None* |\n| `factor_analysis` | IC/IR analysis + layered backtest | None* |\n| `alpha_zoo` | Browse bundled alpha metadata and registry health | None |\n| `alpha_bench` | Benchmark one alpha or a complete zoo | None* |\n| `analyze_options` | Black-Scholes price + Greeks | None |\n| `analyze_options_payoff` | Multi-leg expiry payoff + spot/IV scenarios | None |\n| `pattern_recognition` | Detect chart patterns (H&S, double top, etc.) | None |\n| `get_market_data` | Fetch OHLCV data (auto-detect + ordered fallback across 25 sources) | None* |\n| `get_fund_flow` | Capital fund-flow (main/retail net inflow) | None* |\n| `get_dragon_tiger` | Dragon-tiger list (龙虎榜) top buyer/seller seats | None* |\n| `get_northbound_flow` | Northbound (Stock Connect) net flow | None* |\n| `get_margin_trading` | Margin trading & short-selling balances | None* |\n| `get_block_trades` | Block-trade (大宗交易) records | None* |\n| `get_shareholder_count` | Shareholder-count history per symbol | None* |\n| `get_lockup_expiry` | Restricted-share lockup release schedule | None* |\n| `get_sector_info` | Sector / industry constituents & performance | None* |\n| `get_research_reports` | Sell-side analyst research reports | None* |\n| `get_stock_news` | Market & company news headlines | None* |\n| `get_sec_filings` | SEC EDGAR filings (10-K/10-Q/8-K, etc.) | None |\n| `get_financial_statements` | Income / balance / cash-flow statements | None* |\n| `get_options_chain` | Options chain (strikes, IV, OI, Greeks) | None* |\n| `get_stock_profile` | Valuation, analyst estimates & institutional holdings (US/HK) | None |\n| `screen_market` | Market screener with fundamental/technical filters | None* |\n| `search_symbol` | Symbol / ticker search across markets | None |\n| `get_macro_series` | FRED macroeconomic series | FRED_API_KEY |\n| `iwencai_search` | A-share natural-language research search | IWENCAI_KEY |\n| `qveris_search` | Search QVeris premium data/tool marketplace (free discovery) | QVERIS_API_KEY + paid mode |\n| `qveris_inspect` | Inspect QVeris tool schemas before executing (free) | QVERIS_API_KEY + paid mode |\n| `qveris_execute` | Execute a QVeris capability; budget-bounded, may be billable | QVERIS_API_KEY + paid mode |\n| `web_search` | Search the web via DuckDuckGo | None |\n| `read_url` | Fetch web page as Markdown | None |\n| `read_document` | Extract text from PDF/DOCX/XLSX/PPTX/images | None |\n| `write_file` | Write files (config, strategy code) | None |\n| `read_file` | Read file contents | None |\n| `list_strategies` | Browse discoverable strategies (Alpha Zoo + SDM store) | None |\n| `query_strategies` | Evidence-gated query: regime / Sharpe / quality / cost filters | None |\n| `get_strategy_evidence` | Per-regime evidence rows for one strategy | None |\n| `refresh_strategy_evidence` | Rebuild the disposable strategy-evidence cache from run artifacts | None |\n| `analyze_trade_journal` | Parse broker CSV → profile + behavior diagnostics | None |\n| `extract_shadow_strategy` | Distill 3-5 if-then rules from profitable roundtrips | None |\n| `run_shadow_backtest` | Multi-market backtest + delta-PnL attribution | None* |\n| `render_shadow_report` | HTML/PDF shadow report (8 sections + charts) | None |\n| `scan_shadow_signals` | Today's symbols matching the shadow's cadence | None |\n| `list_swarm_presets` | List multi-agent team presets | None |\n| `run_swarm` | Execute a multi-agent research team | LLM key |\n| `get_swarm_status` | Poll swarm run status without blocking | None |\n| `get_run_result` | Get final report and task summaries | None |\n| `list_runs` | List recent swarm runs with metadata | None |\n| `reap_stale_runs` | Finalize stale swarm runs | None |\n| `retry_run` | Re-run a failed/stale swarm run | LLM key |\n| `trading_connections` | List selectable connector profiles | None |\n| `trading_select_connection` | Select the default connector profile | None |\n| `trading_check` | Check connector readiness | Connector app/OAuth |\n| `trading_account` | Read account summary from selected connector | Connector app/OAuth |\n| `trading_positions` | Read positions from selected connector | Connector app/OAuth |\n| `trading_orders` | Read open orders from selected connector | Connector app/OAuth |\n| `trading_quote` | Read a quote snapshot from selected connector | Connector app/OAuth |\n| `trading_history` | Read historical bars from selected connector | Connector app/OAuth |\n| `get_institutional_holdings` | SEC 13F-HR holdings by manager/ticker + quarter-over-quarter position diffs | None |\n| `etf_holdings` | ETF look-through — SEC N-PORT (US) and full-book A-share fund reports | None |\n| `prediction_market` | Event-contract search/market/history as labelled implied probability | None |\n| `research_papers` | arXiv + OpenAlex search/read with source-anchored claim extraction | None |\n| `quantlib_call` | Pure-compute finance math — 265 functions across 19 quantlib modules | None |\n| `cashflow_performance` | XIRR / MOIC / DPI / TVPI / TWR / Modified Dietz over dated cash flows | None |\n| `orderbook_depth` | Crypto L2 ladder — spread bps, depth imbalance, impact cost | None |\n| `sentiment` | Local lexicon text scoring + crypto Fear & Greed Index | None |\n| `technical_indicators` | RSI / MACD / Bollinger / SMA / EMA through the existing loaders | None* |\n| `get_fundamentals` | PIT-safe SEC fundamentals panels (filed-date anchored) | None |\n\n<sub>*A-share symbols require `TUSHARE_TOKEN`. HK/US/Canada/crypto are free. Trading connector rows use the selected connector profile, e.g. IBKR local TWS/Gateway or Robinhood MCP OAuth.</sub>\n\n## Quick Start\n\n```bash\npip install vibe-trading-ai\n```\n\nThat's it — no API keys needed for HK/US/Canada/crypto markets. Start using `backtest`, `get_market_data`, `analyze_options`, `analyze_trade_journal`, `extract_shadow_strategy`, `web_search`, the **Alpha Zoo** (`vibe-trading alpha bench --zoo gtja191 --universe csi300 --period 2018-2025`), and all 90 skills immediately.\n\n## Loading Tools from External MCP Servers\n\nThe built-in agent can load tools from your own external MCP servers in addition to its local toolset.\n\n> **Note:** This is the *MCP client* path — the opposite of the MCP plugin listed above. The plugin above makes Vibe-Trading's tools available to your agents. This section lets Vibe-Trading's own agent call tools from *your* servers.\n\n### Setup\n\nCreate `~/.vibe-trading/agent.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"my-server\": {\n      \"command\": \"uvx\",\n      \"args\": [\"my-mcp-server\"],\n      \"toolTimeout\": 30,\n      \"enabledTools\": [\"*\"]\n    }\n  }\n}\n```\n\nOrdinary external MCP tools appear automatically in every `vibe-trading run` / `vibe-trading chat` call. They are injected after local tools under stable names: `mcp_<server>_<tool>`. Live-broker MCP servers are consumed through the connector-scoped `trading_*` tools instead of exposing raw `mcp_<broker>_*` tools to the agent.\n\n### Official IBKR MCP read-only probe\n\nAdd Interactive Brokers' official MCP endpoint as a read-only external server:\n\n```json\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\nAuthorize it with `vibe-trading connector authorize ibkr-live-official-mcp-readonly`. The wildcard is accepted\nonly for this `mcp.read` probe. Generic `trading_account` and `trading_positions`\ncalls stay disabled until IBKR publishes stable read tool names that Vibe-Trading\ncan map safely; `mcp.write` requires an explicit tool allowlist and live\norder-guard handling. If IBKR issues a pre-registered OAuth client, add\n`clientId` and `clientSecret` inside `auth`.\n\n### Official eToro Public API MCP (discovery + dev)\n\neToro ships a hosted MCP at `https://mcp.public-api.etoro.com` with live OpenAPI\nroute discovery (`get-all-routes`, `get-route-spec`) and optional execution\n(`execute-read`, `execute-write`). Use it for **API exploration and codegen** —\nproduction agent trading in Vibe-Trading goes through the built-in `etoro-*`\nconnector profiles and `trading_*` / `etoro_*` tools (mandate gate on live writes).\n\nAdd to `~/.vibe-trading/agent.json` (credentials on the connection, not in chat):\n\n```json\n{\n  \"mcpServers\": {\n    \"etoro-public-api\": {\n      \"type\": \"streamableHttp\",\n      \"url\": \"https://mcp.public-api.etoro.com\",\n      \"headers\": {\n        \"x-api-key\": \"YOUR_PUBLIC_API_KEY\",\n        \"x-user-key\": \"YOUR_USER_KEY\"\n      },\n      \"enabledTools\": [\"get-all-routes\", \"get-route-spec\", \"execute-read\"]\n    }\n  }\n}\n```\n\nOmit `execute-write` unless you want the MCP to place trades directly (bypasses\nVibe-Trading's live mandate gate). Install skill:\n`https://mcp.public-api.etoro.com/skill`\n\n### Trading connector profiles\n\nThe public trading surface is connector-first. Choose a connector profile, then\npaper/live is just an attribute under that connector.\n\n```bash\npip install \"vibe-trading-ai[ibkr]\"\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 ports are TWS paper `7497`, IB Gateway paper `4002`, TWS live-readonly\n`7496`, and IB Gateway live-readonly `4001`.\n\n### Config fields\n\n| Field | Required | Default | Description |\n|-------|----------|---------|-------------|\n| `type` | stdio: no, HTTP: yes | inferred only for stdio | Transport type. Use `sse` or `streamableHttp` for URL-based servers. |\n| `command` | stdio: yes | — | Executable to launch |\n| `args` | no | `[]` | Command arguments |\n| `env` | no | `{}` | Extra env vars for the subprocess |\n| `url` | HTTP: yes | — | Remote SSE / streamable HTTP endpoint URL |\n| `headers` | no | `{}` | Extra HTTP headers for SSE / streamable HTTP servers |\n| `toolTimeout` | no | `30` | Seconds before a tool call is cancelled |\n| `enabledTools` | no | `[\"*\"]` | Allowlist of remote tool names. `[\"*\"]` enables all |\n\nFor URL-based transports, `type` is required. The agent no longer guesses between SSE and streamable HTTP from the URL suffix.\n\n### Per-session override (API)\n\n> **Security — disabled by default.** `mcpServers` defines subprocess `command`/`args`/`env` and is therefore restricted to operator-level trust. API callers **cannot** inject MCP server definitions through `POST /sessions` unless the server operator explicitly opts in.\n\nTo enable session-level MCP injection, set the environment variable on the server before starting the agent:\n\n```bash\nexport ALLOW_SESSION_MCP_SERVERS=1\n```\n\nWith the opt-in active, pass `mcpServers` inside `session.config` to extend or replace the global config for that session only:\n\n```json\n{\n  \"config\": {\n    \"mcpServers\": {\n      \"research\": {\n        \"command\": \"uvx\",\n        \"args\": [\"research-mcp\"],\n        \"enabledTools\": [\"search\"]\n      }\n    }\n  }\n}\n```\n\nWithout `ALLOW_SESSION_MCP_SERVERS=1`, any `mcpServers` key in `session.config` is silently stripped before config loading. The global operator config on disk (`~/.vibe-trading/agent.json`) is always respected regardless of this flag.\n\n### v1 limits\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 are not exposed.\n- **Swarm:** MCP tools are excluded from Swarm worker registries in v1.\n- **Hot reload:** not supported. Restart the process to pick up config changes.\n\n### Failure handling\n\n| Case | Behavior |\n|------|----------|\n| Missing config file | falls back to empty config — no MCP servers loaded |\n| Invalid config file | logs a warning and falls back to empty config |\n| Server fails to start | that server is skipped; local tools and other servers still load |\n| Tool call times out | returns a normalized error payload instead of raising |\n| Two server names collide after sanitization | deterministic hash suffix appended; operator warning emitted |\n\n\n\n## Examples\n\n**Backtest a MACD strategy on Apple:**\n> Backtest AAPL with MACD crossover strategy (fast=12, slow=26, signal=9) for 2024\n\n**Analyze my trade journal and build a Shadow Account:**\n> Call analyze_trade_journal on ~/Downloads/tonghuashun.csv, then extract_shadow_strategy with min_support=3, then run_shadow_backtest for the last year, then render_shadow_report.\n\n**Run an investment committee review:**\n> Use run_swarm with investment_committee preset to evaluate NVDA. Variables: target=NVDA.US, market=US\n\n**Factor analysis on CSI 300:**\n> Run factor_analysis on CSI 300 stocks using pe_ttm factor from 2023 to 2024\n\n**Options analysis:**\n> Use analyze_options: spot=100, strike=105, 90 days, vol=25%, rate=3%\n\n**Multi-leg options payoff:**\n> Use analyze_options_payoff for a 95/105 bull call spread at spot 100 with 30 days remaining: long one 95 call at premium 8, short one 105 call at premium 3, multiplier 100, commission rate 0.001.\n\nFile v0.1.14:_meta.json\n\n{\n  \"ownerId\": \"kn770cyb3pxyn6295zdsexszb983yf2p\",\n  \"slug\": \"vibe-trading\",\n  \"version\": \"0.1.14\",\n  \"publishedAt\": 1787186198851\n}\n\nFile v0.1.14:skill-card.md\n\n## Description:\n\nProfessional finance research toolkit — backtesting (10 engines + benchmark comparison panel), factor analysis, Alpha Zoo (462 pre-built alphas across qlib158/alpha101/gtja191/academic/fundamental), options pricing, 90 finance skills, 30 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract → backtest → render) across 25 market-data sources (tushare, yfinance, okx, binance, akshare, baostock, tencent, mootdx, ccxt, futu, mt5, tickerall, local, eastmoney, sina, stooq, yahoo, pykrx, india_broker, qveris, longbridge, plus optional-key finnhub/alphavantage/tiingo/fmp).\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[warren618](https://clawhub.ai/user/warren618)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and developers use this skill to connect agents to finance research workflows, including market data retrieval, backtesting, factor analysis, options analysis, trade journal review, and multi-agent investment research.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Financial credentials and account data may be exposed or misused when broker connectors, external MCP servers, or market-data API keys are enabled.\n\nMitigation: Only enable trusted connectors and MCP servers, keep API keys out of chats and version control, and start with read-only or paper profiles before granting broader authority.\n\nRisk: Direct write or trading tools can authorize actions the user did not intend if enabled without clear operational controls.\n\nMitigation: Do not enable direct write or trading tools unless the deployment intentionally grants the agent that authority and the user has reviewed the connector settings.\n\nRisk: Backtests, factor results, shadow-account signals, and generated investment research can be incomplete or misleading if used as trading advice without review.\n\nMitigation: Treat generated research as decision support, review assumptions and data sources, and validate results independently before making financial decisions.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/warren618/skills/vibe-trading)\n- [Publisher profile](https://clawhub.ai/user/warren618)\n- [IBKR MCP endpoint](https://api.ibkr.com/v1/api/mcp)\n- [eToro Public API MCP](https://mcp.public-api.etoro.com)\n- [eToro Public API MCP skill](https://mcp.public-api.etoro.com/skill)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown, JSON, HTML/PDF reports, shell commands, and configuration snippets depending on the selected tool workflow]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May require optional API keys, broker connectors, local trading gateways, or explicitly configured external MCP servers for some workflows.]\n\n## Skill Version(s):\n\n0.1.14 (source: frontmatter and server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v0.1.13: 3 files, 11896 bytes\n\nFiles: skill-card.md (2834b), SKILL.md (23533b), _meta.json (132b)\n\nFile v0.1.13:SKILL.md\n\n---\nname: vibe-trading\nversion: 0.1.13\ndescription: Professional finance research toolkit — backtesting (9 engines + benchmark comparison panel), factor analysis, Alpha Zoo (462 pre-built alphas across qlib158/alpha101/gtja191/academic/fundamental), options pricing, 89 finance skills, 30 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract → backtest → render) across 24 market-data sources (tushare, yfinance, okx, binance, akshare, baostock, tencent, mootdx, ccxt, futu, mt5, local, eastmoney, sina, stooq, yahoo, pykrx, india_broker, qveris, longbridge, plus optional-key finnhub/alphavantage/tiingo/fmp).\ndependencies:\n  python: \">=3.11,<3.14\"\n  pip:\n    - vibe-trading-ai\nenv:\n  - name: TUSHARE_TOKEN\n    description: \"Tushare API token for China A-share data (optional — HK/US/Canada/crypto work without any key)\"\n    required: false\n  - name: OPENAI_API_KEY\n    description: \"OpenAI-compatible API key — only needed for run_swarm (multi-agent teams). All other tools work without it.\"\n    required: false\n  - name: LANGCHAIN_MODEL_NAME\n    description: \"LLM model name for run_swarm (e.g. deepseek/deepseek-v4-pro). Only needed if using run_swarm.\"\n    required: false\nmcp:\n  command: vibe-trading-mcp\n  args: []\n---\n\n# Vibe-Trading\n\nProfessional finance research toolkit with AI-powered backtesting (9 engines), multi-agent teams, 89 specialized skills, the **Alpha Zoo** (462 pre-built quantitative alphas across qlib158 / alpha101 / gtja191 / academic / fundamental with one-line CLI benchmarking), and the Shadow Account loop — extract your implicit trading rules from a journal, backtest them across A股/港股/美股/crypto, then see where they would have served you better.\n\n## Setup\n\n```bash\npip install vibe-trading-ai\n```\n\n> **Package name vs commands:** The PyPI package is `vibe-trading-ai`. Once installed, you get:\n>\n> | Command | Purpose |\n> |---------|---------|\n> | `vibe-trading` | Interactive CLI / TUI |\n> | `vibe-trading serve` | Launch FastAPI web server |\n> | `vibe-trading-mcp` | Start MCP server (for Claude Desktop, OpenClaw, Cursor, etc.) |\n\nAdd to your agent's MCP config:\n\n```json\n{\n  \"mcpServers\": {\n    \"vibe-trading\": {\n      \"command\": \"vibe-trading-mcp\"\n    }\n  }\n}\n```\n\n### API Key Requirements\n\nCore research MCP tools work with zero API keys for HK/US/Canada/crypto. After `pip install`, backtesting, market data, factor analysis, options pricing, chart patterns, web search, document reading, trade journal analysis, shadow-account extraction/backtest/report, the Alpha Zoo (462 pre-built alphas), and all 89 skills are ready to use. IBKR tools require a local TWS / IB Gateway session; `run_swarm` requires an LLM key.\n\n| Feature | Key needed | When |\n|---------|-----------|------|\n| HK/US/Canada equities & crypto | None | Always free (yfinance / stooq / yahoo + OKX) |\n| China A-share data | None | Free via akshare / baostock / tencent / sina / eastmoney / mootdx fallback (`TUSHARE_TOKEN` optional for premium quality) |\n| Premium US fundamentals/quotes | `FINNHUB_API_KEY` / `ALPHAVANTAGE_API_KEY` / `TIINGO_API_KEY` / `FMP_API_KEY` | Only for optional-key providers (graceful fallback to free sources) |\n| Multi-agent swarm (`run_swarm`) | `OPENAI_API_KEY` + `LANGCHAIN_MODEL_NAME` | Swarm spawns internal LLM workers |\n\n## What You Can Do\n\n### Shadow Account — flagship loop\n\nFeed a CSV broker export (同花顺 / 东财 / 富途 / generic), and the agent will:\n1. `analyze_trade_journal` — profile your behavior (holding period, win rate, disposition effect, chasing, overtrading, anchoring).\n2. `extract_shadow_strategy` — distill 3-5 if-then rules that describe your profitable roundtrips.\n3. `run_shadow_backtest` — backtest those rules across A/HK/US/crypto and compute delta-PnL vs your realized trades.\n4. `render_shadow_report` — produce an HTML/PDF report (8 sections + charts) with today's matching signals.\n5. `scan_shadow_signals` — list today's symbols that match your shadow's entry cadence (research only).\n\n### Backtesting\nCreate and run quantitative strategies across 9 engines (ChinaA, GlobalEquity, IndiaEquity, KoreaEquity, Crypto, ChinaFutures, GlobalFutures, Forex + options) with 24 market-data sources (auto-detect + ordered fallback):\n- **HK/US equities** via yfinance / stooq / yahoo (free, no API key); optionally via **Longbridge** historical OHLCV (`longbridge`, requires the optional SDK and `LONGBRIDGE_APP_KEY` / `LONGBRIDGE_APP_SECRET` / `LONGBRIDGE_ACCESS_TOKEN`). To force it for a run, set `\"source\": \"longbridge\"` in `config.json`.\n- **Canada equities (TSX/TSXV)** via yahoo / yfinance using Yahoo's canonical `<TICKER>.TO` (TSX, e.g. `TD.TO`) or `<TICKER>.V` (TSXV, e.g. `PNG.V`) suffixes — free, no API key. The GlobalEquity engine uses CAD identity, whole-share orders, configurable Canadian commission/slippage, and the TSX/TSXV price-increment grid.\n- **India equities (NSE/BSE)** via yahoo / yfinance using `<SYMBOL>.NS` (NSE, e.g. `RELIANCE.NS`) or `<SCRIP>.BO` (BSE, e.g. `500325.BO`) — free, no API key. The `IndiaEquityEngine` models T+1 delivery, no overnight shorts (set `allow_short` for intraday), configurable circuit bands, 1-share lots, and the STT/stamp-duty/exchange/GST cost stack. Optionally back-fill from your live broker via the `india_broker` source (Shoonya/Dhan; requires broker login).\n- **Korea equities (KRX: KOSPI/KOSDAQ)** via pykrx using `<CODE>.KS` (KOSPI, e.g. `005930.KS`) or `<CODE>.KQ` (KOSDAQ, e.g. `247540.KQ`) — free, no API key (`pip install \"vibe-trading-ai[krx]\"`; yahoo/yfinance fallback needs no extra). pykrx serves **daily bars only** (an intraday request falls through to another source) and its adjusted series is Naver-backed rather than a verbatim KRX print. The `KoreaEquityEngine` models same-day round trips (no T+1), the ±30% daily price limit measured from the previous close and quantized to the KRX tick grid, tick-rounded fills, the 0.20% sell-side transaction tax (2026 rate), and 1-share lots. It is **long-only**: `allow_short` is refused, because KRX covered-short and uptick rules cannot be enforced on daily bars.\n- **Cryptocurrency** via OKX or CCXT/100+ exchanges (free, no API key)\n- **China A-shares** via AKShare / baostock / tencent / sina / eastmoney / mootdx (free, no API key) — `TUSHARE_TOKEN` optional for premium quality\n- **Futures, forex, macro** via AKShare (free, no API key)\n- **HK & A-share equities** via Futu (broker login required, optional)\n- **Local CSV/parquet bars** via the `local` loader (offline, no network)\n- **Premium cross-market data** via QVeris (optional API key)\n- **Premium US data** via optional-key finnhub / alphavantage / tiingo / fmp (graceful fallback to free sources)\n\nFactors: the Alpha101 and QLib158 zoos are tagged for the `equity_in` and `equity_kr` universes, so they compute on NSE/BSE and KRX bars (the GTJA191 zoo stays China-only). Live/paper India trading uses the Shoonya / Dhan connectors (paper + read-only live; live order placement is structurally disabled because those brokers expose no paper/live switch).\n\nExample workflow:\n1. Use `list_skills()` to discover strategy patterns\n2. Use `load_skill(\"strategy-generate\")` for the strategy creation guide\n3. Use `write_file()` to create `config.json` and `code/signal_engine.py`\n4. Use `backtest()` to run and get metrics (Sharpe, return, drawdown, etc.)\n\n### Multi-Agent Swarm Teams\n30 pre-built agent teams for complex research:\n- **Investment Committee**: bull/bear debate → risk review → PM decision\n- **Global Equities Desk**: A-share + HK/US + crypto → global strategist\n- **Crypto Trading Desk**: funding/basis + liquidation + flow → risk manager\n- **Earnings Research Desk**: fundamentals + revisions + options → earnings strategist\n- **Macro/Rates/FX Desk**: rates + FX + commodities → macro PM\n- **Quant Strategy Desk**: screening → factor research → backtest → risk audit\n- **Risk Committee**: drawdown, tail risk, regime analysis\n- And 23 more specialized teams\n\nUse `list_swarm_presets()` to see all teams, then `run_swarm()` to execute.\n\n### Alpha Zoo (462 pre-built alphas)\nOne-line cross-sectional IC / IR / alive-reversed-dead categorisation across five bundled zoos:\n- **qlib158** (154 alphas) — Microsoft Qlib's `Alpha158` feature handler, Apache-2.0 with pinned commit SHA.\n- **alpha101** (101 alphas) — Kakushadze (2015) \"101 Formulaic Alphas\" (arXiv:1601.00991), written from the paper appendix.\n- **gtja191** (191 alphas) — Guotai Junan 2014 \"191 Short-period Trading Alpha Factors\" research report.\n- **academic** (12 factors) — Fama-French 5 + Carhart momentum + Jegadeesh reversal + George-Hwang 52-week-high + Amihud illiquidity + Harvey-Siddique skew + Frazzini-Pedersen betting-against-beta (price-based proxies) + a correlation-rewiring stability score (from the in-repo correlation-regime skill).\n- **fundamental** (4 factors) — PIT-safe earnings yield, ROE, gross profitability, and asset growth from daily fundamental panels.\n\nEach alpha ships with `__alpha_meta__` (formula LaTeX + theme + universe + warmup + columns required), guarded by an AST purity gate + 300-row lookahead sentinel test. Use the `vibe-trading alpha {list,show,bench,compare,export-manifest}` CLI, the `/alpha/*` REST routes (browser at `/alpha-zoo`), or compose multi-factor signals via `ZooSignalEngine.from_zoo(...)`.\n\n### Finance Skills (89)\nComprehensive knowledge base covering:\n- Technical analysis (candlestick, Elliott wave, Ichimoku, SMC, harmonic, chanlun)\n- Quantitative methods (factor research, ML strategy, pair trading, multi-factor)\n- Risk management (VaR/CVaR, stress testing, hedging)\n- Options (Black-Scholes, Greeks, multi-leg strategies, payoff diagrams)\n- HK/US equities (SEC filings, earnings revisions, ETF flows, ADR/H-share arbitrage)\n- Crypto trading desk (funding rates, liquidation heatmaps, stablecoin flows, token unlocks, DeFi yields)\n- Behavioral finance, trade journal diagnostics, shadow account\n- Macro analysis, credit research, sector rotation, and more\n\nUse `load_skill(name)` to access full methodology docs with code templates.\n\n## Available MCP Tools (70)\n\n| Tool | Description | API Key |\n|------|-------------|---------|\n| `list_skills` | List all 89 finance skills | None |\n| `load_skill` | Load full skill documentation | None |\n| `start_research_goal` | Create an auditable research goal | None |\n| `get_research_goal` | Read the current research goal | None |\n| `add_goal_evidence` | Attach evidence to a research goal | None |\n| `update_research_goal_status` | Update goal lifecycle status | None |\n| `backtest` | Run vectorized backtest engine | None* |\n| `factor_analysis` | IC/IR analysis + layered backtest | None* |\n| `alpha_zoo` | Browse bundled alpha metadata and registry health | None |\n| `alpha_bench` | Benchmark one alpha or a complete zoo | None* |\n| `analyze_options` | Black-Scholes price + Greeks | None |\n| `analyze_options_payoff` | Multi-leg expiry payoff + spot/IV scenarios | None |\n| `pattern_recognition` | Detect chart patterns (H&S, double top, etc.) | None |\n| `get_market_data` | Fetch OHLCV data (auto-detect + ordered fallback across 24 sources) | None* |\n| `get_fund_flow` | Capital fund-flow (main/retail net inflow) | None* |\n| `get_dragon_tiger` | Dragon-tiger list (龙虎榜) top buyer/seller seats | None* |\n| `get_northbound_flow` | Northbound (Stock Connect) net flow | None* |\n| `get_margin_trading` | Margin trading & short-selling balances | None* |\n| `get_block_trades` | Block-trade (大宗交易) records | None* |\n| `get_shareholder_count` | Shareholder-count history per symbol | None* |\n| `get_lockup_expiry` | Restricted-share lockup release schedule | None* |\n| `get_sector_info` | Sector / industry constituents & performance | None* |\n| `get_research_reports` | Sell-side analyst research reports | None* |\n| `get_stock_news` | Market & company news headlines | None* |\n| `get_sec_filings` | SEC EDGAR filings (10-K/10-Q/8-K, etc.) | None |\n| `get_financial_statements` | Income / balance / cash-flow statements | None* |\n| `get_options_chain` | Options chain (strikes, IV, OI, Greeks) | None* |\n| `get_stock_profile` | Valuation, analyst estimates & institutional holdings (US/HK) | None |\n| `screen_market` | Market screener with fundamental/technical filters | None* |\n| `search_symbol` | Symbol / ticker search across markets | None |\n| `get_macro_series` | FRED macroeconomic series | FRED_API_KEY |\n| `iwencai_search` | A-share natural-language research search | IWENCAI_KEY |\n| `qveris_search` | Search QVeris premium data/tool marketplace (free discovery) | QVERIS_API_KEY + paid mode |\n| `qveris_inspect` | Inspect QVeris tool schemas before executing (free) | QVERIS_API_KEY + paid mode |\n| `qveris_execute` | Execute a QVeris capability; budget-bounded, may be billable | QVERIS_API_KEY + paid mode |\n| `web_search` | Search the web via DuckDuckGo | None |\n| `read_url` | Fetch web page as Markdown | None |\n| `read_document` | Extract text from PDF/DOCX/XLSX/PPTX/images | None |\n| `write_file` | Write files (config, strategy code) | None |\n| `read_file` | Read file contents | None |\n| `analyze_trade_journal` | Parse broker CSV → profile + behavior diagnostics | None |\n| `extract_shadow_strategy` | Distill 3-5 if-then rules from profitable roundtrips | None |\n| `run_shadow_backtest` | Multi-market backtest + delta-PnL attribution | None* |\n| `render_shadow_report` | HTML/PDF shadow report (8 sections + charts) | None |\n| `scan_shadow_signals` | Today's symbols matching the shadow's cadence | None |\n| `list_swarm_presets` | List multi-agent team presets | None |\n| `run_swarm` | Execute a multi-agent research team | LLM key |\n| `get_swarm_status` | Poll swarm run status without blocking | None |\n| `get_run_result` | Get final report and task summaries | None |\n| `list_runs` | List recent swarm runs with metadata | None |\n| `reap_stale_runs` | Finalize stale swarm runs | None |\n| `retry_run` | Re-run a failed/stale swarm run | LLM key |\n| `trading_connections` | List selectable connector profiles | None |\n| `trading_select_connection` | Select the default connector profile | None |\n| `trading_check` | Check connector readiness | Connector app/OAuth |\n| `trading_account` | Read account summary from selected connector | Connector app/OAuth |\n| `trading_positions` | Read positions from selected connector | Connector app/OAuth |\n| `trading_orders` | Read open orders from selected connector | Connector app/OAuth |\n| `trading_quote` | Read a quote snapshot from selected connector | Connector app/OAuth |\n| `trading_history` | Read historical bars from selected connector | Connector app/OAuth |\n| `get_institutional_holdings` | SEC 13F-HR holdings by manager/ticker + quarter-over-quarter position diffs | None |\n| `etf_holdings` | ETF look-through — SEC N-PORT (US) and full-book A-share fund reports | None |\n| `prediction_market` | Event-contract search/market/history as labelled implied probability | None |\n| `research_papers` | arXiv + OpenAlex search/read with source-anchored claim extraction | None |\n| `quantlib_call` | Pure-compute finance math — 265 functions across 19 quantlib modules | None |\n| `cashflow_performance` | XIRR / MOIC / DPI / TVPI / TWR / Modified Dietz over dated cash flows | None |\n| `orderbook_depth` | Crypto L2 ladder — spread bps, depth imbalance, impact cost | None |\n| `sentiment` | Local lexicon text scoring + crypto Fear & Greed Index | None |\n| `technical_indicators` | RSI / MACD / Bollinger / SMA / EMA through the existing loaders | None* |\n| `get_fundamentals` | PIT-safe SEC fundamentals panels (filed-date anchored) | None |\n\n<sub>*A-share symbols require `TUSHARE_TOKEN`. HK/US/Canada/crypto are free. Trading connector rows use the selected connector profile, e.g. IBKR local TWS/Gateway or Robinhood MCP OAuth.</sub>\n\n## Quick Start\n\n```bash\npip install vibe-trading-ai\n```\n\nThat's it — no API keys needed for HK/US/Canada/crypto markets. Start using `backtest`, `get_market_data`, `analyze_options`, `analyze_trade_journal`, `extract_shadow_strategy`, `web_search`, the **Alpha Zoo** (`vibe-trading alpha bench --zoo gtja191 --universe csi300 --period 2018-2025`), and all 89 skills immediately.\n\n## Loading Tools from External MCP Servers\n\nThe built-in agent can load tools from your own external MCP servers in addition to its local toolset.\n\n> **Note:** This is the *MCP client* path — the opposite of the MCP plugin listed above. The plugin above makes Vibe-Trading's tools available to your agents. This section lets Vibe-Trading's own agent call tools from *your* servers.\n\n### Setup\n\nCreate `~/.vibe-trading/agent.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"my-server\": {\n      \"command\": \"uvx\",\n      \"args\": [\"my-mcp-server\"],\n      \"toolTimeout\": 30,\n      \"enabledTools\": [\"*\"]\n    }\n  }\n}\n```\n\nOrdinary external MCP tools appear automatically in every `vibe-trading run` / `vibe-trading chat` call. They are injected after local tools under stable names: `mcp_<server>_<tool>`. Live-broker MCP servers are consumed through the connector-scoped `trading_*` tools instead of exposing raw `mcp_<broker>_*` tools to the agent.\n\n### Official IBKR MCP read-only probe\n\nAdd Interactive Brokers' official MCP endpoint as a read-only external server:\n\n```json\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\nAuthorize it with `vibe-trading connector authorize ibkr-live-official-mcp-readonly`. The wildcard is accepted\nonly for this `mcp.read` probe. Generic `trading_account` and `trading_positions`\ncalls stay disabled until IBKR publishes stable read tool names that Vibe-Trading\ncan map safely; `mcp.write` requires an explicit tool allowlist and live\norder-guard handling. If IBKR issues a pre-registered OAuth client, add\n`clientId` and `clientSecret` inside `auth`.\n\n### Official eToro Public API MCP (discovery + dev)\n\neToro ships a hosted MCP at `https://mcp.public-api.etoro.com` with live OpenAPI\nroute discovery (`get-all-routes`, `get-route-spec`) and optional execution\n(`execute-read`, `execute-write`). Use it for **API exploration and codegen** —\nproduction agent trading in Vibe-Trading goes through the built-in `etoro-*`\nconnector profiles and `trading_*` / `etoro_*` tools (mandate gate on live writes).\n\nAdd to `~/.vibe-trading/agent.json` (credentials on the connection, not in chat):\n\n```json\n{\n  \"mcpServers\": {\n    \"etoro-public-api\": {\n      \"type\": \"streamableHttp\",\n      \"url\": \"https://mcp.public-api.etoro.com\",\n      \"headers\": {\n        \"x-api-key\": \"YOUR_PUBLIC_API_KEY\",\n        \"x-user-key\": \"YOUR_USER_KEY\"\n      },\n      \"enabledTools\": [\"get-all-routes\", \"get-route-spec\", \"execute-read\"]\n    }\n  }\n}\n```\n\nOmit `execute-write` unless you want the MCP to place trades directly (bypasses\nVibe-Trading's live mandate gate). Install skill:\n`https://mcp.public-api.etoro.com/skill`\n\n### Trading connector profiles\n\nThe public trading surface is connector-first. Choose a connector profile, then\npaper/live is just an attribute under that connector.\n\n```bash\npip install \"vibe-trading-ai[ibkr]\"\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 ports are TWS paper `7497`, IB Gateway paper `4002`, TWS live-readonly\n`7496`, and IB Gateway live-readonly `4001`.\n\n### Config fields\n\n| Field | Required | Default | Description |\n|-------|----------|---------|-------------|\n| `type` | stdio: no, HTTP: yes | inferred only for stdio | Transport type. Use `sse` or `streamableHttp` for URL-based servers. |\n| `command` | stdio: yes | — | Executable to launch |\n| `args` | no | `[]` | Command arguments |\n| `env` | no | `{}` | Extra env vars for the subprocess |\n| `url` | HTTP: yes | — | Remote SSE / streamable HTTP endpoint URL |\n| `headers` | no | `{}` | Extra HTTP headers for SSE / streamable HTTP servers |\n| `toolTimeout` | no | `30` | Seconds before a tool call is cancelled |\n| `enabledTools` | no | `[\"*\"]` | Allowlist of remote tool names. `[\"*\"]` enables all |\n\nFor URL-based transports, `type` is required. The agent no longer guesses between SSE and streamable HTTP from the URL suffix.\n\n### Per-session override (API)\n\n> **Security — disabled by default.** `mcpServers` defines subprocess `command`/`args`/`env` and is therefore restricted to operator-level trust. API callers **cannot** inject MCP server definitions through `POST /sessions` unless the server operator explicitly opts in.\n\nTo enable session-level MCP injection, set the environment variable on the server before starting the agent:\n\n```bash\nexport ALLOW_SESSION_MCP_SERVERS=1\n```\n\nWith the opt-in active, pass `mcpServers` inside `session.config` to extend or replace the global config for that session only:\n\n```json\n{\n  \"config\": {\n    \"mcpServers\": {\n      \"research\": {\n        \"command\": \"uvx\",\n        \"args\": [\"research-mcp\"],\n        \"enabledTools\": [\"search\"]\n      }\n    }\n  }\n}\n```\n\nWithout `ALLOW_SESSION_MCP_SERVERS=1`, any `mcpServers` key in `session.config` is silently stripped before config loading. The global operator config on disk (`~/.vibe-trading/agent.json`) is always respected regardless of this flag.\n\n### v1 limits\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 are not exposed.\n- **Swarm:** MCP tools are excluded from Swarm worker registries in v1.\n- **Hot reload:** not supported. Restart the process to pick up config changes.\n\n### Failure handling\n\n| Case | Behavior |\n|------|----------|\n| Missing config file | falls back to empty config — no MCP servers loaded |\n| Invalid config file | logs a warning and falls back to empty config |\n| Server fails to start | that server is skipped; local tools and other servers still load |\n| Tool call times out | returns a normalized error payload instead of raising |\n| Two server names collide after sanitization | deterministic hash suffix appended; operator warning emitted |\n\n\n\n## Examples\n\n**Backtest a MACD strategy on Apple:**\n> Backtest AAPL with MACD crossover strategy (fast=12, slow=26, signal=9) for 2024\n\n**Analyze my trade journal and build a Shadow Account:**\n> Call analyze_trade_journal on ~/Downloads/tonghuashun.csv, then extract_shadow_strategy with min_support=3, then run_shadow_backtest for the last year, then render_shadow_report.\n\n**Run an investment committee review:**\n> Use run_swarm with investment_committee preset to evaluate NVDA. Variables: target=NVDA.US, market=US\n\n**Factor analysis on CSI 300:**\n> Run factor_analysis on CSI 300 stocks using pe_ttm factor from 2023 to 2024\n\n**Options analysis:**\n> Use analyze_options: spot=100, strike=105, 90 days, vol=25%, rate=3%\n\n**Multi-leg options payoff:**\n> Use analyze_options_payoff for a 95/105 bull call spread at spot 100 with 30 days remaining: long one 95 call at premium 8, short one 105 call at premium 3, multiplier 100, commission rate 0.001.\n\nFile v0.1.13:_meta.json\n\n{\n  \"ownerId\": \"kn770cyb3pxyn6295zdsexszb983yf2p\",\n  \"slug\": \"vibe-trading\",\n  \"version\": \"0.1.13\",\n  \"publishedAt\": 1786362965564\n}\n\nFile v0.1.13:skill-card.md\n\n## Description:\n\nProfessional finance research toolkit — backtesting (9 engines + benchmark comparison panel), factor analysis, Alpha Zoo (462 pre-built alphas across qlib158/alpha101/gtja191/academic/fundamental), options pricing, 89 finance skills, 30 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract → backtest → render) across 24 market-data sources (tushare, yfinance, okx, binance, akshare, baostock, tencent, mootdx, ccxt, futu, mt5, local, eastmoney, sina, stooq, yahoo, pykrx, india_broker, qveris, longbridge, plus optional-key finnhub/alphavantage/tiingo/fmp).\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[warren618](https://clawhub.ai/user/warren618)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers, analysts, and finance researchers use this skill to run market-data workflows, backtests, factor analysis, options analysis, trade-journal review, and multi-agent investment research from an agent.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill can access market data, local strategy files, trade journals, and optional broker/account integrations.\n\nMitigation: Install only where those data sources and account integrations are appropriate for the user or environment.\n\nRisk: External MCP servers and wildcard tool exposure can expand the actions available to the agent.\n\nMitigation: Keep external MCP servers allowlisted and avoid wildcard tools for unreviewed servers.\n\nRisk: Live broker write access or eToro execute-write can place real trades.\n\nMitigation: Do not enable live broker writes or eToro execute-write unless the user deliberately wants the agent to place real trades.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/warren618/skills/vibe-trading)\n- [Interactive Brokers MCP endpoint](https://api.ibkr.com/v1/api/mcp)\n- [eToro Public API MCP](https://mcp.public-api.etoro.com)\n- [eToro Public API MCP skill](https://mcp.public-api.etoro.com/skill)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown with inline code blocks, JSON configuration snippets, command examples, and generated reports.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May access market data, local strategy files, trade journals, optional broker/account integrations, and optional external MCP servers depending on user configuration.]\n\n## Skill Version(s):\n\n0.1.13 (source: frontmatter and server-resolved release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v0.1.12: 3 files, 9902 bytes\n\nFiles: skill-card.md (2145b), SKILL.md (19541b), _meta.json (132b)\n\nFile v0.1.12:SKILL.md\n\n---\nname: vibe-trading\nversion: 0.1.12\ndescription: Professional finance research toolkit — backtesting (8 engines + benchmark comparison panel), factor analysis, Alpha Zoo (462 pre-built alphas across qlib158/alpha101/gtja191/academic/fundamental), options pricing, 88 finance skills, 30 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract → backtest → render) across 23 market-data sources (tushare, yfinance, okx, binance, akshare, baostock, tencent, mootdx, ccxt, futu, mt5, local, eastmoney, sina, stooq, yahoo, india_broker, qveris, longbridge, plus optional-key finnhub/alphavantage/tiingo/fmp).\ndependencies:\n  python: \">=3.11\"\n  pip:\n    - vibe-trading-ai\nenv:\n  - name: TUSHARE_TOKEN\n    description: \"Tushare API token for China A-share data (optional — HK/US/crypto work without any key)\"\n    required: false\n  - name: OPENAI_API_KEY\n    description: \"OpenAI-compatible API key — only needed for run_swarm (multi-agent teams). All other tools work without it.\"\n    required: false\n  - name: LANGCHAIN_MODEL_NAME\n    description: \"LLM model name for run_swarm (e.g. deepseek/deepseek-v4-pro). Only needed if using run_swarm.\"\n    required: false\nmcp:\n  command: vibe-trading-mcp\n  args: []\n---\n\n# Vibe-Trading\n\nProfessional finance research toolkit with AI-powered backtesting (8 engines), multi-agent teams, 88 specialized skills, the **Alpha Zoo** (462 pre-built quantitative alphas across qlib158 / alpha101 / gtja191 / academic / fundamental with one-line CLI benchmarking), and the Shadow Account loop — extract your implicit trading rules from a journal, backtest them across A股/港股/美股/crypto, then see where they would have served you better.\n\n## Setup\n\n```bash\npip install vibe-trading-ai\n```\n\n> **Package name vs commands:** The PyPI package is `vibe-trading-ai`. Once installed, you get:\n>\n> | Command | Purpose |\n> |---------|---------|\n> | `vibe-trading` | Interactive CLI / TUI |\n> | `vibe-trading serve` | Launch FastAPI web server |\n> | `vibe-trading-mcp` | Start MCP server (for Claude Desktop, OpenClaw, Cursor, etc.) |\n\nAdd to your agent's MCP config:\n\n```json\n{\n  \"mcpServers\": {\n    \"vibe-trading\": {\n      \"command\": \"vibe-trading-mcp\"\n    }\n  }\n}\n```\n\n### API Key Requirements\n\nCore research MCP tools work with zero API keys for HK/US/crypto. After `pip install`, backtesting, market data, factor analysis, options pricing, chart patterns, web search, document reading, trade journal analysis, shadow-account extraction/backtest/report, the Alpha Zoo (462 pre-built alphas), and all 88 skills are ready to use. IBKR tools require a local TWS / IB Gateway session; `run_swarm` requires an LLM key.\n\n| Feature | Key needed | When |\n|---------|-----------|------|\n| HK/US equities & crypto | None | Always free (yfinance / stooq / yahoo + OKX) |\n| China A-share data | None | Free via akshare / baostock / tencent / sina / eastmoney / mootdx fallback (`TUSHARE_TOKEN` optional for premium quality) |\n| Premium US fundamentals/quotes | `FINNHUB_API_KEY` / `ALPHAVANTAGE_API_KEY` / `TIINGO_API_KEY` / `FMP_API_KEY` | Only for optional-key providers (graceful fallback to free sources) |\n| Multi-agent swarm (`run_swarm`) | `OPENAI_API_KEY` + `LANGCHAIN_MODEL_NAME` | Swarm spawns internal LLM workers |\n\n## What You Can Do\n\n### Shadow Account — flagship loop\n\nFeed a CSV broker export (同花顺 / 东财 / 富途 / generic), and the agent will:\n1. `analyze_trade_journal` — profile your behavior (holding period, win rate, disposition effect, chasing, overtrading, anchoring).\n2. `extract_shadow_strategy` — distill 3-5 if-then rules that describe your profitable roundtrips.\n3. `run_shadow_backtest` — backtest those rules across A/HK/US/crypto and compute delta-PnL vs your realized trades.\n4. `render_shadow_report` — produce an HTML/PDF report (8 sections + charts) with today's matching signals.\n5. `scan_shadow_signals` — list today's symbols that match your shadow's entry cadence (research only).\n\n### Backtesting\nCreate and run quantitative strategies across 8 engines (ChinaA, GlobalEquity, IndiaEquity, Crypto, ChinaFutures, GlobalFutures, Forex + options) with 23 market-data sources (auto-detect + ordered fallback):\n- **HK/US equities** via yfinance / stooq / yahoo (free, no API key); optionally via **Longbridge** historical OHLCV (`longbridge`, requires the optional SDK and `LONGBRIDGE_APP_KEY` / `LONGBRIDGE_APP_SECRET` / `LONGBRIDGE_ACCESS_TOKEN`). To force it for a run, set `\"source\": \"longbridge\"` in `config.json`.\n- **India equities (NSE/BSE)** via yahoo / yfinance using `<SYMBOL>.NS` (NSE, e.g. `RELIANCE.NS`) or `<SCRIP>.BO` (BSE, e.g. `500325.BO`) — free, no API key. The `IndiaEquityEngine` models T+1 delivery, no overnight shorts (set `allow_short` for intraday), configurable circuit bands, 1-share lots, and the STT/stamp-duty/exchange/GST cost stack. Optionally back-fill from your live broker via the `india_broker` source (Shoonya/Dhan; requires broker login).\n- **Cryptocurrency** via OKX or CCXT/100+ exchanges (free, no API key)\n- **China A-shares** via AKShare / baostock / tencent / sina / eastmoney / mootdx (free, no API key) — `TUSHARE_TOKEN` optional for premium quality\n- **Futures, forex, macro** via AKShare (free, no API key)\n- **HK & A-share equities** via Futu (broker login required, optional)\n- **Local CSV/parquet bars** via the `local` loader (offline, no network)\n- **Premium cross-market data** via QVeris (optional API key)\n- **Premium US data** via optional-key finnhub / alphavantage / tiingo / fmp (graceful fallback to free sources)\n\nFactors: the Alpha101 and QLib158 zoos are tagged for the `equity_in` universe, so they compute on NSE/BSE bars (the GTJA191 zoo stays China-only). Live/paper India trading uses the Shoonya / Dhan connectors (paper + read-only live; live order placement is structurally disabled because those brokers expose no paper/live switch).\n\nExample workflow:\n1. Use `list_skills()` to discover strategy patterns\n2. Use `load_skill(\"strategy-generate\")` for the strategy creation guide\n3. Use `write_file()` to create `config.json` and `code/signal_engine.py`\n4. Use `backtest()` to run and get metrics (Sharpe, return, drawdown, etc.)\n\n### Multi-Agent Swarm Teams\n30 pre-built agent teams for complex research:\n- **Investment Committee**: bull/bear debate → risk review → PM decision\n- **Global Equities Desk**: A-share + HK/US + crypto → global strategist\n- **Crypto Trading Desk**: funding/basis + liquidation + flow → risk manager\n- **Earnings Research Desk**: fundamentals + revisions + options → earnings strategist\n- **Macro/Rates/FX Desk**: rates + FX + commodities → macro PM\n- **Quant Strategy Desk**: screening → factor research → backtest → risk audit\n- **Risk Committee**: drawdown, tail risk, regime analysis\n- And 23 more specialized teams\n\nUse `list_swarm_presets()` to see all teams, then `run_swarm()` to execute.\n\n### Alpha Zoo (462 pre-built alphas)\nOne-line cross-sectional IC / IR / alive-reversed-dead categorisation across five bundled zoos:\n- **qlib158** (154 alphas) — Microsoft Qlib's `Alpha158` feature handler, Apache-2.0 with pinned commit SHA.\n- **alpha101** (101 alphas) — Kakushadze (2015) \"101 Formulaic Alphas\" (arXiv:1601.00991), written from the paper appendix.\n- **gtja191** (191 alphas) — Guotai Junan 2014 \"191 Short-period Trading Alpha Factors\" research report.\n- **academic** (12 factors) — Fama-French 5 + Carhart momentum + Jegadeesh reversal + George-Hwang 52-week-high + Amihud illiquidity + Harvey-Siddique skew + Frazzini-Pedersen betting-against-beta (price-based proxies) + a correlation-rewiring stability score (from the in-repo correlation-regime skill).\n- **fundamental** (4 factors) — PIT-safe earnings yield, ROE, gross profitability, and asset growth from daily fundamental panels.\n\nEach alpha ships with `__alpha_meta__` (formula LaTeX + theme + universe + warmup + columns required), guarded by an AST purity gate + 300-row lookahead sentinel test. Use the `vibe-trading alpha {list,show,bench,compare,export-manifest}` CLI, the `/alpha/*` REST routes (browser at `/alpha-zoo`), or compose multi-factor signals via `ZooSignalEngine.from_zoo(...)`.\n\n### Finance Skills (88)\nComprehensive knowledge base covering:\n- Technical analysis (candlestick, Elliott wave, Ichimoku, SMC, harmonic, chanlun)\n- Quantitative methods (factor research, ML strategy, pair trading, multi-factor)\n- Risk management (VaR/CVaR, stress testing, hedging)\n- Options (Black-Scholes, Greeks, multi-leg strategies, payoff diagrams)\n- HK/US equities (SEC filings, earnings revisions, ETF flows, ADR/H-share arbitrage)\n- Crypto trading desk (funding rates, liquidation heatmaps, stablecoin flows, token unlocks, DeFi yields)\n- Behavioral finance, trade journal diagnostics, shadow account\n- Macro analysis, credit research, sector rotation, and more\n\nUse `load_skill(name)` to access full methodology docs with code templates.\n\n## Available MCP Tools (54)\n\n| Tool | Description | API Key |\n|------|-------------|---------|\n| `list_skills` | List all 88 finance skills | None |\n| `load_skill` | Load full skill documentation | None |\n| `start_research_goal` | Create an auditable research goal | None |\n| `get_research_goal` | Read the current research goal | None |\n| `add_goal_evidence` | Attach evidence to a research goal | None |\n| `update_research_goal_status` | Update goal lifecycle status | None |\n| `backtest` | Run vectorized backtest engine | None* |\n| `factor_analysis` | IC/IR analysis + layered backtest | None* |\n| `analyze_options` | Black-Scholes price + Greeks | None |\n| `pattern_recognition` | Detect chart patterns (H&S, double top, etc.) | None |\n| `get_market_data` | Fetch OHLCV data (auto-detect + ordered fallback across 23 sources) | None* |\n| `get_fund_flow` | Capital fund-flow (main/retail net inflow) | None* |\n| `get_dragon_tiger` | Dragon-tiger list (龙虎榜) top buyer/seller seats | None* |\n| `get_northbound_flow` | Northbound (Stock Connect) net flow | None* |\n| `get_margin_trading` | Margin trading & short-selling balances | None* |\n| `get_block_trades` | Block-trade (大宗交易) records | None* |\n| `get_shareholder_count` | Shareholder-count history per symbol | None* |\n| `get_lockup_expiry` | Restricted-share lockup release schedule | None* |\n| `get_sector_info` | Sector / industry constituents & performance | None* |\n| `get_research_reports` | Sell-side analyst research reports | None* |\n| `get_stock_news` | Market & company news headlines | None* |\n| `get_sec_filings` | SEC EDGAR filings (10-K/10-Q/8-K, etc.) | None |\n| `get_financial_statements` | Income / balance / cash-flow statements | None* |\n| `get_options_chain` | Options chain (strikes, IV, OI, Greeks) | None* |\n| `get_stock_profile` | Valuation, analyst estimates & institutional holdings (US/HK) | None |\n| `screen_market` | Market screener with fundamental/technical filters | None* |\n| `search_symbol` | Symbol / ticker search across markets | None |\n| `get_macro_series` | FRED macroeconomic series | FRED_API_KEY |\n| `iwencai_search` | A-share natural-language research search | IWENCAI_KEY |\n| `web_search` | Search the web via DuckDuckGo | None |\n| `read_url` | Fetch web page as Markdown | None |\n| `read_document` | Extract text from PDF/DOCX/XLSX/PPTX/images | None |\n| `write_file` | Write files (config, strategy code) | None |\n| `read_file` | Read file contents | None |\n| `analyze_trade_journal` | Parse broker CSV → profile + behavior diagnostics | None |\n| `extract_shadow_strategy` | Distill 3-5 if-then rules from profitable roundtrips | None |\n| `run_shadow_backtest` | Multi-market backtest + delta-PnL attribution | None* |\n| `render_shadow_report` | HTML/PDF shadow report (8 sections + charts) | None |\n| `scan_shadow_signals` | Today's symbols matching the shadow's cadence | None |\n| `list_swarm_presets` | List multi-agent team presets | None |\n| `run_swarm` | Execute a multi-agent research team | LLM key |\n| `get_swarm_status` | Poll swarm run status without blocking | None |\n| `get_run_result` | Get final report and task summaries | None |\n| `list_runs` | List recent swarm runs with metadata | None |\n| `reap_stale_runs` | Finalize stale swarm runs | None |\n| `retry_run` | Re-run a failed/stale swarm run | LLM key |\n| `trading_connections` | List selectable connector profiles | None |\n| `trading_select_connection` | Select the default connector profile | None |\n| `trading_check` | Check connector readiness | Connector app/OAuth |\n| `trading_account` | Read account summary from selected connector | Connector app/OAuth |\n| `trading_positions` | Read positions from selected connector | Connector app/OAuth |\n| `trading_orders` | Read open orders from selected connector | Connector app/OAuth |\n| `trading_quote` | Read a quote snapshot from selected connector | Connector app/OAuth |\n| `trading_history` | Read historical bars from selected connector | Connector app/OAuth |\n\n<sub>*A-share symbols require `TUSHARE_TOKEN`. HK/US/crypto are free. Trading connector rows use the selected connector profile, e.g. IBKR local TWS/Gateway or Robinhood MCP OAuth.</sub>\n\n## Quick Start\n\n```bash\npip install vibe-trading-ai\n```\n\nThat's it — no API keys needed for HK/US/crypto markets. Start using `backtest`, `get_market_data`, `analyze_options`, `analyze_trade_journal`, `extract_shadow_strategy`, `web_search`, the **Alpha Zoo** (`vibe-trading alpha bench --zoo gtja191 --universe csi300 --period 2018-2025`), and all 88 skills immediately.\n\n## Loading Tools from External MCP Servers\n\nThe built-in agent can load tools from your own external MCP servers in addition to its local toolset.\n\n> **Note:** This is the *MCP client* path — the opposite of the MCP plugin listed above. The plugin above makes Vibe-Trading's tools available to your agents. This section lets Vibe-Trading's own agent call tools from *your* servers.\n\n### Setup\n\nCreate `~/.vibe-trading/agent.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"my-server\": {\n      \"command\": \"uvx\",\n      \"args\": [\"my-mcp-server\"],\n      \"toolTimeout\": 30,\n      \"enabledTools\": [\"*\"]\n    }\n  }\n}\n```\n\nOrdinary external MCP tools appear automatically in every `vibe-trading run` / `vibe-trading chat` call. They are injected after local tools under stable names: `mcp_<server>_<tool>`. Live-broker MCP servers are consumed through the connector-scoped `trading_*` tools instead of exposing raw `mcp_<broker>_*` tools to the agent.\n\n### Official IBKR MCP read-only probe\n\nAdd Interactive Brokers' official MCP endpoint as a read-only external server:\n\n```json\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\nAuthorize it with `vibe-trading connector authorize ibkr-live-official-mcp-readonly`. The wildcard is accepted\nonly for this `mcp.read` probe. Generic `trading_account` and `trading_positions`\ncalls stay disabled until IBKR publishes stable read tool names that Vibe-Trading\ncan map safely; `mcp.write` requires an explicit tool allowlist and live\norder-guard handling. If IBKR issues a pre-registered OAuth client, add\n`clientId` and `clientSecret` inside `auth`.\n\n### Trading connector profiles\n\nThe public trading surface is connector-first. Choose a connector profile, then\npaper/live is just an attribute under that connector.\n\n```bash\npip install \"vibe-trading-ai[ibkr]\"\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 ports are TWS paper `7497`, IB Gateway paper `4002`, TWS live-readonly\n`7496`, and IB Gateway live-readonly `4001`.\n\n### Config fields\n\n| Field | Required | Default | Description |\n|-------|----------|---------|-------------|\n| `type` | stdio: no, HTTP: yes | inferred only for stdio | Transport type. Use `sse` or `streamableHttp` for URL-based servers. |\n| `command` | stdio: yes | — | Executable to launch |\n| `args` | no | `[]` | Command arguments |\n| `env` | no | `{}` | Extra env vars for the subprocess |\n| `url` | HTTP: yes | — | Remote SSE / streamable HTTP endpoint URL |\n| `headers` | no | `{}` | Extra HTTP headers for SSE / streamable HTTP servers |\n| `toolTimeout` | no | `30` | Seconds before a tool call is cancelled |\n| `enabledTools` | no | `[\"*\"]` | Allowlist of remote tool names. `[\"*\"]` enables all |\n\nFor URL-based transports, `type` is required. The agent no longer guesses between SSE and streamable HTTP from the URL suffix.\n\n### Per-session override (API)\n\n> **Security — disabled by default.** `mcpServers` defines subprocess `command`/`args`/`env` and is therefore restricted to operator-level trust. API callers **cannot** inject MCP server definitions through `POST /sessions` unless the server operator explicitly opts in.\n\nTo enable session-level MCP injection, set the environment variable on the server before starting the agent:\n\n```bash\nexport ALLOW_SESSION_MCP_SERVERS=1\n```\n\nWith the opt-in active, pass `mcpServers` inside `session.config` to extend or replace the global config for that session only:\n\n```json\n{\n  \"config\": {\n    \"mcpServers\": {\n      \"research\": {\n        \"command\": \"uvx\",\n        \"args\": [\"research-mcp\"],\n        \"enabledTools\": [\"search\"]\n      }\n    }\n  }\n}\n```\n\nWithout `ALLOW_SESSION_MCP_SERVERS=1`, any `mcpServers` key in `session.config` is silently stripped before config loading. The global operator config on disk (`~/.vibe-trading/agent.json`) is always respected regardless of this flag.\n\n### v1 limits\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 are not exposed.\n- **Swarm:** MCP tools are excluded from Swarm worker registries in v1.\n- **Hot reload:** not supported. Restart the process to pick up config changes.\n\n### Failure handling\n\n| Case | Behavior |\n|------|----------|\n| Missing config file | falls back to empty config — no MCP servers loaded |\n| Invalid config file | logs a warning and falls back to empty config |\n| Server fails to start | that server is skipped; local tools and other servers still load |\n| Tool call times out | returns a normalized error payload instead of raising |\n| Two server names collide after sanitization | deterministic hash suffix appended; operator warning emitted |\n\n\n\n## Examples\n\n**Backtest a MACD strategy on Apple:**\n> Backtest AAPL with MACD crossover strategy (fast=12, slow=26, signal=9) for 2024\n\n**Analyze my trade journal and build a Shadow Account:**\n> Call analyze_trade_journal on ~/Downloads/tonghuashun.csv, then extract_shadow_strategy with min_support=3, then run_shadow_backtest for the last year, then render_shadow_report.\n\n**Run an investment committee review:**\n> Use run_swarm with investment_committee preset to evaluate NVDA. Variables: target=NVDA.US, market=US\n\n**Factor analysis on CSI 300:**\n> Run factor_analysis on CSI 300 stocks using pe_ttm factor from 2023 to 2024\n\n**Options analysis:**\n> Use analyze_options: spot=100, strike=105, 90 days, vol=25%, rate=3%\n\nFile v0.1.12:_meta.json\n\n{\n  \"ownerId\": \"kn770cyb3pxyn6295zdsexszb983yf2p\",\n  \"slug\": \"vibe-trading\",\n  \"version\": \"0.1.12\",\n  \"publishedAt\": 1784727591000\n}\n\nFile v0.1.12:skill-card.md\n\n## Description: <br>\nVibe Trading is a finance research toolkit for agent-assisted backtesting, factor analysis, options pricing, trade-journal analysis, shadow-account reports, and market-data workflows across multiple asset classes. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[warren618](https://clawhub.ai/user/warren618) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers, analysts, and traders use this skill to connect an agent to Vibe Trading finance tools for market data, backtesting, factor analysis, options analysis, trade-journal review, and multi-agent research workflows. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Optional external MCP server loading can broaden what the agent is able to run or access. <br>\nMitigation: Use only trusted external MCP servers and prefer explicit enabledTools allowlists instead of wildcards. <br>\nRisk: Finance connectors and research workflows may involve market-data, broker, or LLM credentials. <br>\nMitigation: Use trusted credentials only, keep generated configuration and strategy files inside a controlled workspace, and review connector settings before use. <br>\n\n\n## Reference(s): <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, Markdown, Code, Shell commands, Configuration, Guidance, Files] <br>\n**Output Format:** [Markdown or structured text with optional JSON, code/configuration snippets, shell commands, and generated report files.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May produce research reports, backtest metrics, strategy files, and connector/account readouts depending on selected tools and configured credentials.] <br>\n\n## Skill Version(s): <br>\n0.1.12 (source: SKILL.md frontmatter and server release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v0.1.11: 3 files, 9865 bytes\n\nFiles: skill-card.md (2583b), SKILL.md (19149b), _meta.json (132b)\n\nFile v0.1.11:SKILL.md\n\n---\nname: vibe-trading\nversion: 0.1.11\ndescription: Professional finance research toolkit — backtesting (8 engines + benchmark comparison panel), factor analysis, Alpha Zoo (460 pre-built alphas across qlib158/alpha101/gtja191/academic/fundamental), options pricing, 86 finance skills, 30 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract → backtest → render) across 20 market-data sources (tushare, yfinance, okx, akshare, baostock, tencent, mootdx, ccxt, futu, local, eastmoney, sina, stooq, yahoo, india_broker, qveris, plus optional-key finnhub/alphavantage/tiingo/fmp).\ndependencies:\n  python: \">=3.11\"\n  pip:\n    - vibe-trading-ai\nenv:\n  - name: TUSHARE_TOKEN\n    description: \"Tushare API token for China A-share data (optional — HK/US/crypto work without any key)\"\n    required: false\n  - name: OPENAI_API_KEY\n    description: \"OpenAI-compatible API key — only needed for run_swarm (multi-agent teams). All other tools work without it.\"\n    required: false\n  - name: LANGCHAIN_MODEL_NAME\n    description: \"LLM model name for run_swarm (e.g. deepseek/deepseek-v4-pro). Only needed if using run_swarm.\"\n    required: false\nmcp:\n  command: vibe-trading-mcp\n  args: []\n---\n\n# Vibe-Trading\n\nProfessional finance research toolkit with AI-powered backtesting (8 engines), multi-agent teams, 86 specialized skills, the **Alpha Zoo** (460 pre-built quantitative alphas across qlib158 / alpha101 / gtja191 / academic / fundamental with one-line CLI benchmarking), and the Shadow Account loop — extract your implicit trading rules from a journal, backtest them across A股/港股/美股/crypto, then see where they would have served you better.\n\n## Setup\n\n```bash\npip install vibe-trading-ai\n```\n\n> **Package name vs commands:** The PyPI package is `vibe-trading-ai`. Once installed, you get:\n>\n> | Command | Purpose |\n> |---------|---------|\n> | `vibe-trading` | Interactive CLI / TUI |\n> | `vibe-trading serve` | Launch FastAPI web server |\n> | `vibe-trading-mcp` | Start MCP server (for Claude Desktop, OpenClaw, Cursor, etc.) |\n\nAdd to your agent's MCP config:\n\n```json\n{\n  \"mcpServers\": {\n    \"vibe-trading\": {\n      \"command\": \"vibe-trading-mcp\"\n    }\n  }\n}\n```\n\n### API Key Requirements\n\nCore research MCP tools work with zero API keys for HK/US/crypto. After `pip install`, backtesting, market data, factor analysis, options pricing, chart patterns, web search, document reading, trade journal analysis, shadow-account extraction/backtest/report, the Alpha Zoo (460 pre-built alphas), and all 86 skills are ready to use. IBKR tools require a local TWS / IB Gateway session; `run_swarm` requires an LLM key.\n\n| Feature | Key needed | When |\n|---------|-----------|------|\n| HK/US equities & crypto | None | Always free (yfinance / stooq / yahoo + OKX) |\n| China A-share data | None | Free via akshare / baostock / tencent / sina / eastmoney / mootdx fallback (`TUSHARE_TOKEN` optional for premium quality) |\n| Premium US fundamentals/quotes | `FINNHUB_API_KEY` / `ALPHAVANTAGE_API_KEY` / `TIINGO_API_KEY` / `FMP_API_KEY` | Only for optional-key providers (graceful fallback to free sources) |\n| Multi-agent swarm (`run_swarm`) | `OPENAI_API_KEY` + `LANGCHAIN_MODEL_NAME` | Swarm spawns internal LLM workers |\n\n## What You Can Do\n\n### Shadow Account — flagship loop\n\nFeed a CSV broker export (同花顺 / 东财 / 富途 / generic), and the agent will:\n1. `analyze_trade_journal` — profile your behavior (holding period, win rate, disposition effect, chasing, overtrading, anchoring).\n2. `extract_shadow_strategy` — distill 3-5 if-then rules that describe your profitable roundtrips.\n3. `run_shadow_backtest` — backtest those rules across A/HK/US/crypto and compute delta-PnL vs your realized trades.\n4. `render_shadow_report` — produce an HTML/PDF report (8 sections + charts) with today's matching signals.\n5. `scan_shadow_signals` — list today's symbols that match your shadow's entry cadence (research only).\n\n### Backtesting\nCreate and run quantitative strategies across 8 engines (ChinaA, GlobalEquity, IndiaEquity, Crypto, ChinaFutures, GlobalFutures, Forex + options) with 20 market-data sources (auto-detect + ordered fallback):\n- **HK/US equities** via yfinance / stooq / yahoo (free, no API key)\n- **India equities (NSE/BSE)** via yahoo / yfinance using `<SYMBOL>.NS` (NSE, e.g. `RELIANCE.NS`) or `<SCRIP>.BO` (BSE, e.g. `500325.BO`) — free, no API key. The `IndiaEquityEngine` models T+1 delivery, no overnight shorts (set `allow_short` for intraday), configurable circuit bands, 1-share lots, and the STT/stamp-duty/exchange/GST cost stack. Optionally back-fill from your live broker via the `india_broker` source (Shoonya/Dhan; requires broker login).\n- **Cryptocurrency** via OKX or CCXT/100+ exchanges (free, no API key)\n- **China A-shares** via AKShare / baostock / tencent / sina / eastmoney / mootdx (free, no API key) — `TUSHARE_TOKEN` optional for premium quality\n- **Futures, forex, macro** via AKShare (free, no API key)\n- **HK & A-share equities** via Futu (broker login required, optional)\n- **Local CSV/parquet bars** via the `local` loader (offline, no network)\n- **Premium cross-market data** via QVeris (optional API key)\n- **Premium US data** via optional-key finnhub / alphavantage / tiingo / fmp (graceful fallback to free sources)\n\nFactors: the Alpha101 and QLib158 zoos are tagged for the `equity_in` universe, so they compute on NSE/BSE bars (the GTJA191 zoo stays China-only). Live/paper India trading uses the Shoonya / Dhan connectors (paper + read-only live; live order placement is structurally disabled because those brokers expose no paper/live switch).\n\nExample workflow:\n1. Use `list_skills()` to discover strategy patterns\n2. Use `load_skill(\"strategy-generate\")` for the strategy creation guide\n3. Use `write_file()` to create `config.json` and `code/signal_engine.py`\n4. Use `backtest()` to run and get metrics (Sharpe, return, drawdown, etc.)\n\n### Multi-Agent Swarm Teams\n30 pre-built agent teams for complex research:\n- **Investment Committee**: bull/bear debate → risk review → PM decision\n- **Global Equities Desk**: A-share + HK/US + crypto → global strategist\n- **Crypto Trading Desk**: funding/basis + liquidation + flow → risk manager\n- **Earnings Research Desk**: fundamentals + revisions + options → earnings strategist\n- **Macro/Rates/FX Desk**: rates + FX + commodities → macro PM\n- **Quant Strategy Desk**: screening → factor research → backtest → risk audit\n- **Risk Committee**: drawdown, tail risk, regime analysis\n- And 23 more specialized teams\n\nUse `list_swarm_presets()` to see all teams, then `run_swarm()` to execute.\n\n### Alpha Zoo (460 pre-built alphas)\nOne-line cross-sectional IC / IR / alive-reversed-dead categorisation across five bundled zoos:\n- **qlib158** (154 alphas) — Microsoft Qlib's `Alpha158` feature handler, Apache-2.0 with pinned commit SHA.\n- **alpha101** (101 alphas) — Kakushadze (2015) \"101 Formulaic Alphas\" (arXiv:1601.00991), written from the paper appendix.\n- **gtja191** (191 alphas) — Guotai Junan 2014 \"191 Short-period Trading Alpha Factors\" research report.\n- **academic** (10 factors) — Fama-French 5 + Carhart momentum + Jegadeesh reversal + George-Hwang 52-week-high + Amihud illiquidity + Harvey-Siddique skew (price-based proxies).\n- **fundamental** (4 factors) — PIT-safe earnings yield, ROE, gross profitability, and asset growth from daily fundamental panels.\n\nEach alpha ships with `__alpha_meta__` (formula LaTeX + theme + universe + warmup + columns required), guarded by an AST purity gate + 300-row lookahead sentinel test. Use the `vibe-trading alpha {list,show,bench,compare,export-manifest}` CLI, the `/alpha/*` REST routes (browser at `/alpha-zoo`), or compose multi-factor signals via `ZooSignalEngine.from_zoo(...)`.\n\n### Finance Skills (86)\nC\n\nArchive v0.1.10: 3 files, 9420 bytes\n\nFiles: skill-card.md (2928b), SKILL.md (18013b), _meta.json (132b)\n\nArchive v0.1.9: 3 files, 8407 bytes\n\nFiles: skill-card.md (2529b), SKILL.md (15874b), _meta.json (131b)\n\nArchive v0.1.8: 3 files, 7290 bytes\n\nFiles: skill-card.md (2636b), SKILL.md (12499b), _meta.json (131b)\n\nArchive v0.1.7: 2 files, 3971 bytes\n\nFiles: SKILL.md (8121b), _meta.json (131b)","readmeExcerpt":"Skill: vibe-trading Owner: warren618 Summary: Professional finance research toolkit — backtesting (10 engines + benchmark comparison panel), factor analysis, Alpha Zoo (462 pre-built alphas across qlib158/alpha101/gtja191/academic/fundamental), options pricing, 90 finance skills, 30 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract → backtest → render) across 28 market-data sources (tushare","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"pip install vibe-trading-ai"},{"language":"json","snippet":"{\n  \"mcpServers\": {\n    \"vibe-trading\": {\n      \"command\": \"vibe-trading-mcp\"\n    }\n  }\n}"},{"language":"bash","snippet":"pip install vibe-trading-ai"},{"language":"json","snippet":"{\n  \"mcpServers\": {\n    \"my-server\": {\n      \"command\": \"uvx\",\n      \"args\": [\"my-mcp-server\"],\n      \"toolTimeout\": 30,\n      \"enabledTools\": [\"*\"]\n    }\n  }\n}"},{"language":"json","snippet":"{\n  \"mcpServers\": {\n    \"ibkr\": {\n      \"type\": \"streamableHttp\",\n      \"url\": \"https://api.ibkr.com/v1/api/mcp-public\",\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}"},{"language":"json","snippet":"{\n  \"mcpServers\": {\n    \"etoro-public-api\": {\n      \"type\": \"streamableHttp\",\n      \"url\": \"https://mcp.public-api.etoro.com\",\n      \"headers\": {\n        \"x-api-key\": \"YOUR_PUBLIC_API_KEY\",\n        \"x-user-key\": \"YOUR_USER_KEY\"\n      },\n      \"enabledTools\": [\"get-all-routes\", \"get-route-spec\", \"execute-read\"]\n    }\n  }\n}"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: vibe-trading\nversion: 0.1.16\ndescription: Professional finance research toolkit — backtesting (10 engines + benchmark comparison panel), factor analysis, Alpha Zoo (462 pre-built alphas across qlib158/alpha101/gtja191/academic/fundamental), options pricing, 90 finance skills, 30 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract → backtest → render) across 28 market-data sources (tushare, yfinance, okx, binance, akshare, baostock, tencent, mootdx, ccxt, futu, mt5, tickerall, local, eastmoney, sina, stooq, yahoo, pykrx, india_broker, qveris, longbridge, nobitex, wallex, plus optional-key finnhub/alphavantage/tiingo/fmp/gildata).\ndependencies:\n  python: \">=3.11\"\n  pip:\n    - vibe-trading-ai\nenv:\n  - name: TUSHARE_TOKEN\n    description: \"Tushare API token for China A-share data (optional — HK/US/Canada/crypto work without any key)\"\n    required: false\n  - name: OPENAI_API_KEY\n    description: \"OpenAI-compatible API key — only needed for run_swarm (multi-agent teams). All other tools work without it.\"\n    required: false\n  - name: LANGCHAIN_MODEL_NAME\n    description: \"LLM model name for run_swarm (e.g. deepseek/deepseek-v4-pro). Only needed if using run_swarm.\"\n    required: false\nmcp:\n  command: vibe-trading-mcp\n  args: []\n---\n\n# Vibe-Trading\n\nProfessional finance research toolkit with AI-powered backtesting (10 engines), multi-agent teams, 90 specialized skills, the **Alpha Zoo** (462 pre-built quantitative alphas across qlib158 / alpha101 / gtja191 / academic / fundamental with one-line CLI benchmarking), and the Shadow Account loop — extract your implicit trading rules from a journal, backtest them across A股/港股/美股/crypto, then see where they would have served you better.\n\n## Setup\n\n```bash\npip install vibe-trading-ai\n```\n\n> **Package name vs commands:** The PyPI package is `vibe-trading-ai`. Once installed, you get:\n>\n> | Command | Purpose |\n> |---------|---------|\n> | `vibe-trading` | Interactive CLI / TUI |\n> | `vibe-trading serve` | Launch FastAPI web server |\n> | `vibe-trading-mcp` | Start MCP server (for Claude Desktop, OpenClaw, Cursor, etc.) |\n\nAdd to your agent's MCP config:\n\n```json\n{\n  \"mcpServers\": {\n    \"vibe-trading\": {\n      \"command\": \"vibe-trading-mcp\"\n    }\n  }\n}\n```\n\n### API Key Requirements\n\nCore research MCP tools work with zero API keys for HK/US/Canada/crypto. After `pip install`, backtesting, market data, factor analysis, options pricing, chart patterns, web search, document reading, trade journal analysis, shadow-account extraction/backtest/report, the Alpha Zoo (462 pre-built alphas), and all 90 skills are ready to use. IBKR tools require a local TWS / IB Gateway session; `run_swarm` requires an LLM key.\n\n| Feature | Key needed | When |\n|---------|-----------|------|\n| HK/US/Canada equities & crypto | None | Always free (yfinance / stooq / yahoo + OKX) |\n| China A-share data | None | Free via akshare / baostock / tencent / sina / eastmoney / mootdx fallback (`TUSHARE_TOKEN` optional fo"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn770cyb3pxyn6295zdsexszb983yf2p\",\n  \"slug\": \"vibe-trading\",\n  \"version\": \"0.1.16\",\n  \"publishedAt\": 1790671028271\n}"},{"path":"skill-card.md","content":"## Description:\n\nA finance research toolkit for market analysis, strategy backtesting, factor and options analysis, trade-journal review, and multi-agent research.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[warren618](https://clawhub.ai/user/warren618)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nTraders, researchers, and developers use this skill to analyze market data, test investment strategies, review trading behavior, and produce research reports across equity and crypto markets.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: External MCP servers can expose arbitrary tools when wildcard access is enabled.\n\nMitigation: Enable only trusted MCP servers and explicitly allowlist the tools the agent needs.\n\nRisk: Broker and OAuth connections can grant higher-risk trading access.\n\nMitigation: Keep credentials limited to read-only or paper profiles unless live trading is intentionally authorized.\n\n## Reference(s):\n\n- [Vibe-Trading on ClawHub](https://clawhub.ai/warren618/skills/vibe-trading)\n\n## Skill Output:\n\n**Output Type(s):** [Analysis, Markdown, Code, Shell commands, Configuration instructions]\n\n**Output Format:** [Text and structured tool results, with optional HTML or PDF research reports]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Some data providers, multi-agent research, and broker connectors require separate credentials.]\n\n## Skill Version(s):\n\n0.1.16 (source: skill frontmatter and server release)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"Professional finance research toolkit — backtesting (10 engines + benchmark comparison panel), factor analysis, Alpha Zoo (462 pre-built alphas across qlib158/alpha101/gtja191/academic/fundamental), options pricing, 90 finance skills, 30 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract → backtest → render) across 28 market-data sources (tushare, yfinance, okx, binance, akshare, baostock, tencent, mootdx, ccxt, futu, mt5, tickerall, local, eastmoney, sina, stooq, yahoo, pykrx, india_broker, qveris, longbridge, nobitex, wallex, plus optional-key finnhub/alphavantage/tiingo/fmp/gildata). Skill: vibe-trading Owner: warren618 Summary: Professional finance research toolkit — backtesting (10 engines + benchmark comparison panel), factor analysis, Alpha Zoo (462 pre-built alphas across qlib158/alpha101/gtja191/academic/fundamental), options pricing, 90 finance skills, 30 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract → backtest → render) across 28 market-data sources (tushare","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1479,"uniquenessScore":55,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T04:00:57.966Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-09T04:00:57.966Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-09T21:18:59.222Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}