本文へ移動
cccskills
無料GitHub で公開

vibe-trading

Professional finance research toolkit — backtesting (11 engines + benchmark comparison panel), factor analysis, Alpha Zoo (478 pre-built alphas across qlib158/alpha101/gtja191/academic/fundamental), options pricing, 90 finance skills, 30 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract → backtest → render) across 29 market-data sources (tushare, yfinance, okx, binance, akshare, baostock, tencent, mootdx, ccxt, futu, mt5, tickerall, local, eastmoney, sina, stooq, yahoo, pykrx, india_broker, qveris, longbridge, nobitex, wallex, plus optional-key finnhub/alphavantage/tiingo/fmp/gildata).

インストール方法を見る

含まれるファイル(200)

  • SKILL.md26.1 KB
  • .editorconfig110 B
  • .env.example20.0 KB
  • .gitignore61 B
  • api_server.py12.1 KB
  • backtest/__init__.py0 B
  • backtest/benchmark.py8.5 KB
  • backtest/binance_account_reconciliation.py17.9 KB
  • backtest/binance_shadow_evidence.py15.9 KB
  • backtest/binance_tolerance_calibration.py5.2 KB
  • backtest/constraints.py7.5 KB
  • backtest/correlation.py16.2 KB
  • backtest/engines/__init__.py1.1 KB
  • backtest/engines/_market_hooks.py23.8 KB
  • backtest/engines/base.py99.5 KB
  • backtest/engines/brazil_equity.py3.9 KB
  • backtest/engines/china_a.py7.6 KB
  • backtest/engines/china_futures.py12.5 KB
  • backtest/engines/composite.py12.8 KB
  • backtest/engines/crypto.py25.0 KB
  • backtest/engines/forex.py6.8 KB
  • backtest/engines/futures_base.py2.1 KB
  • backtest/engines/global_equity.py7.1 KB
  • backtest/engines/global_futures.py9.3 KB
  • backtest/engines/india_equity.py7.0 KB
  • backtest/engines/korea_equity.py13.5 KB
  • backtest/engines/options_portfolio.py36.6 KB
  • backtest/engines/vietnam_equity.py20.9 KB
  • backtest/factor_costs.py15.8 KB
  • backtest/loader_health.py13.5 KB
  • backtest/loaders/__init__.py0 B
  • backtest/loaders/_fundamental_schema.py9.8 KB
  • backtest/loaders/_http.py8.5 KB
  • backtest/loaders/_symbol_utils.py643 B
  • backtest/loaders/additive_conversion.py7.8 KB
  • backtest/loaders/akshare_loader.py16.9 KB
  • backtest/loaders/alphavantage_loader.py9.1 KB
  • backtest/loaders/b3_cotahist_loader.py3.4 KB
  • backtest/loaders/baostock_loader.py11.1 KB
  • backtest/loaders/base.py34.6 KB
  • backtest/loaders/binance_loader.py1.3 KB
  • backtest/loaders/ccxt_loader.py19.0 KB
  • backtest/loaders/cn_adjust.py3.4 KB
  • backtest/loaders/eastmoney_client.py11.6 KB
  • backtest/loaders/eastmoney_loader.py8.3 KB
  • backtest/loaders/finnhub_loader.py10.0 KB
  • backtest/loaders/fmp_loader.py11.5 KB
  • backtest/loaders/fundamentals_loader.py18.3 KB
  • backtest/loaders/futu.py7.7 KB
  • backtest/loaders/gildata_loader.py13.7 KB
  • backtest/loaders/india_broker_loader.py7.6 KB
  • backtest/loaders/industry_loader.py11.5 KB
  • backtest/loaders/local_loader.py12.2 KB
  • backtest/loaders/longbridge.py14.6 KB
  • backtest/loaders/mootdx_loader.py9.9 KB
  • backtest/loaders/mt5_loader.py10.5 KB
  • backtest/loaders/nobitex.py9.0 KB
  • backtest/loaders/okx.py12.4 KB
  • backtest/loaders/pykrx_loader.py7.3 KB
  • backtest/loaders/qveris_loader.py29.0 KB
  • backtest/loaders/registry.py29.0 KB
  • backtest/loaders/rsshub_events.py20.6 KB
  • backtest/loaders/sec_edgar_client.py9.5 KB
  • backtest/loaders/sec_filer_lineage.json171 B
  • backtest/loaders/sec_frames.py4.4 KB
  • backtest/loaders/sina_loader.py6.7 KB
  • backtest/loaders/stooq_loader.py10.9 KB
  • backtest/loaders/tencent_loader.py12.8 KB
  • backtest/loaders/tickerall_loader.py19.8 KB
  • backtest/loaders/tiingo_loader.py13.2 KB
  • backtest/loaders/tushare_fundamentals.py18.4 KB
  • backtest/loaders/tushare.py14.5 KB
  • backtest/loaders/valuation_loader.py11.9 KB
  • backtest/loaders/wallex.py9.4 KB
  • backtest/loaders/yahoo_client.py17.9 KB
  • backtest/loaders/yahoo_loader.py10.6 KB
  • backtest/loaders/yfinance_loader.py12.8 KB
  • backtest/metrics.py29.3 KB
  • backtest/models.py3.8 KB
  • backtest/optimizers/__init__.py473 B
  • backtest/optimizers/base.py6.2 KB
  • backtest/optimizers/equal_volatility.py1.3 KB
  • backtest/optimizers/max_diversification.py1.7 KB
  • backtest/optimizers/mean_variance.py2.5 KB
  • backtest/optimizers/risk_parity.py1.8 KB
  • backtest/optimizers/turnover_aware.py13.4 KB
  • backtest/options_payoff.py17.6 KB
  • backtest/perpetual_evidence.py3.4 KB
  • backtest/perpetual_risk.py16.1 KB
  • backtest/rebalance_mask.py4.2 KB
  • backtest/rebalance_notes.py8.2 KB
  • backtest/regime.py8.9 KB
  • backtest/risk_xray.py15.2 KB
  • backtest/run_card.py23.1 KB
  • backtest/runner.py85.5 KB
  • backtest/validation.py19.3 KB
  • cli/__init__.py3.8 KB
  • cli/__main__.py106 B
  • cli/_legacy.py261.2 KB
  • cli/_version.py1.7 KB
  • cli/commands/__init__.py510 B
  • cli/commands/chat.py8.9 KB
  • cli/commands/goal.py14.2 KB
  • cli/commands/help.py1.8 KB
  • cli/commands/institutional/__init__.py1.2 KB
  • cli/commands/institutional/attrib.py811 B
  • cli/commands/institutional/comps.py815 B
  • cli/commands/institutional/dcf.py831 B
  • cli/commands/institutional/earnings.py814 B
  • cli/commands/institutional/memo.py795 B
  • cli/commands/institutional/playbooks.py34.4 KB
  • cli/commands/institutional/runner.py8.1 KB
  • cli/commands/institutional/screen.py793 B
  • cli/commands/memory.py1.8 KB
  • cli/commands/research_playbook.py24.5 KB
  • cli/commands/session.py2.9 KB
  • cli/commands/show.py2.5 KB
  • cli/commands/slash_router.py9.3 KB
  • cli/commands/strategy_evidence.py5.9 KB
  • cli/commands/update.py9.1 KB
  • cli/completer.py4.2 KB
  • cli/components/__init__.py487 B
  • cli/components/chat_log.py2.4 KB
  • cli/components/hint_bar.py2.2 KB
  • cli/components/tool_event.py7.3 KB
  • cli/components/working_indicator.py4.5 KB
  • cli/input.py13.7 KB
  • cli/intro.py132 B
  • cli/main.py63.3 KB
  • cli/onboard.py21.0 KB
  • cli/stream.py12.5 KB
  • cli/theme.py8.0 KB
  • cli/ui/__init__.py395 B
  • cli/ui/banner.py2.5 KB
  • cli/ui/rail.py20.8 KB
  • cli/ui/transcript.py5.5 KB
  • cli/utils/__init__.py507 B
  • cli/utils/format.py4.9 KB
  • cli/utils/thinking_verbs.py1.1 KB
  • evals/__init__.py53 B
  • evals/harness/__init__.py239 B
  • evals/harness/artifacts.py5.8 KB
  • evals/harness/assertions.py26.8 KB
  • evals/harness/cases/identity/explicit_a_share.json1.2 KB
  • evals/harness/cases/identity/fixtures/identity/a_h_hengrui.v1.json333 B
  • evals/harness/methodology.py1.6 KB
  • evals/harness/observations.py4.0 KB
  • evals/harness/README.md1.7 KB
  • evals/harness/report.py3.1 KB
  • evals/harness/runner.py3.0 KB
  • evals/harness/schema.py8.5 KB
  • mcp_server.py123.2 KB
  • requirements-channels.txt721 B
  • requirements.txt1.9 KB
  • scripts/bench_performance.py3.6 KB
  • scripts/options_candidates_backtest.py7.6 KB
  • scripts/w4a_patch_blog.py9.4 KB
  • scripts/w4a_run_benches.py5.6 KB
  • skills/ashare-mootdx/references/a_mootdx_fetcher.py2.9 KB
  • src/__init__.py33 B
  • src/agent/__init__.py356 B
  • src/agent/context_budget.py7.7 KB
  • src/agent/context_compact.py22.9 KB
  • src/agent/context.py29.7 KB
  • src/agent/frontmatter.py1.5 KB
  • src/agent/grounding/__init__.py2.4 KB
  • src/agent/grounding/evidence.py47.5 KB
  • src/agent/grounding/figures_checks.py3.6 KB
  • src/agent/grounding/figures.py43.8 KB
  • src/agent/grounding/identity_checks.py3.2 KB
  • src/agent/grounding/identity.py42.6 KB
  • src/agent/grounding/ledger.py19.4 KB
  • src/agent/grounding/policies.py94.8 KB
  • src/agent/grounding/registry.py3.7 KB
  • src/agent/grounding/release.py37.2 KB
  • src/agent/llm_usage.py4.4 KB
  • src/agent/loop.py124.1 KB
  • src/agent/memory.py1.6 KB
  • src/agent/progress.py5.9 KB
  • src/agent/resolution_context.py8.9 KB
  • src/agent/run_outcome.py9.1 KB
  • src/agent/skills.py14.2 KB
  • src/agent/tool_progress.py7.1 KB
  • src/agent/tool_results.py10.6 KB
  • src/agent/tools.py6.3 KB
  • src/agent/trace.py13.6 KB
  • src/agent/tuning.py4.6 KB
  • src/agent/write_targets.py5.5 KB
  • src/api/__init__.py82 B
  • src/api/_compat.py850 B
  • src/api/alpha_routes.py35.4 KB
  • src/api/attribution_core.py32.9 KB
  • src/api/attribution_routes.py3.5 KB
  • src/api/auth_routes.py2.1 KB
  • src/api/channels_config_routes.py27.4 KB
  • src/api/channels_routes.py3.8 KB
  • src/api/connection_routes.py8.4 KB
  • src/api/helpers.py9.4 KB
  • src/api/live_routes.py56.3 KB
  • src/api/models.py4.8 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Vibe-Trading

Professional finance research toolkit with AI-powered backtesting (11 engines), multi-agent teams, 90 specialized skills, the Alpha Zoo (478 pre-built quantitative alphas across qlib158 / alpha101 / gtja191 / academic / fundamental with one-line CLI benchmarking), and the Shadow Account loop — extract your implicit trading rules from a journal, backtest them across A股/港股/美股/crypto, then see where they would have served you better.

Setup

pip install vibe-trading-ai

Package name vs commands: The PyPI package is vibe-trading-ai. Once installed, you get:

CommandPurpose
vibe-tradingInteractive CLI / TUI
vibe-trading serveLaunch FastAPI web server
vibe-trading-mcpStart MCP server (for Claude Desktop, OpenClaw, Cursor, etc.)

Add to your agent's MCP config:

{
  "mcpServers": {
    "vibe-trading": {
      "command": "vibe-trading-mcp"
    }
  }
}

API Key Requirements

Core research MCP tools work with zero API keys for HK/US/Canada/crypto. After pip install, backtesting, market data, factor analysis, options pricing, chart patterns, web search, document reading, trade journal analysis, shadow-account extraction/backtest/report, the Alpha Zoo (478 pre-built alphas), and all 90 skills are ready to use. IBKR tools require a local TWS / IB Gateway session; run_swarm requires an LLM key.

FeatureKey neededWhen
HK/US/Canada equities & cryptoNoneAlways free (yfinance / stooq / yahoo + OKX)
China A-share dataNoneFree via akshare / baostock / tencent / sina / eastmoney fallback (TUSHARE_TOKEN optional for premium quality)
Premium US fundamentals/quotesFINNHUB_API_KEY / ALPHAVANTAGE_API_KEY / TIINGO_API_KEY / FMP_API_KEYOnly for optional-key providers (graceful fallback to free sources)
Multi-agent swarm (run_swarm)OPENAI_API_KEY + LANGCHAIN_MODEL_NAMESwarm spawns internal LLM workers

What You Can Do

Shadow Account — flagship loop

Feed a CSV broker export (同花顺 / 东财 / 富途 / generic), and the agent will:

  1. analyze_trade_journal — profile your behavior (holding period, win rate, disposition effect, chasing, overtrading, anchoring).
  2. extract_shadow_strategy — distill 3-5 if-then rules that describe your profitable roundtrips.
  3. run_shadow_backtest — backtest those rules across A/HK/US/crypto and compute delta-PnL vs your realized trades.
  4. render_shadow_report — produce an HTML/PDF report (8 sections + charts) with today's matching signals.
  5. scan_shadow_signals — list today's symbols that match your shadow's entry cadence (research only).

Backtesting

Create and run quantitative strategies across 11 engines (ChinaA, GlobalEquity, IndiaEquity, KoreaEquity, VietnamEquity, BrazilEquity, Crypto, ChinaFutures, GlobalFutures, Forex + options) with 29 market-data sources (auto-detect + ordered fallback; the hosted forex tickerall source is explicit-only):

  • HK/US equities via yfinance / stooq / yahoo (free, no API key); optionally via Longbridge historical OHLCV (longbridge, requires the optional SDK and LONGBRIDGE_APP_KEY / LONGBRIDGE_APP_SECRET / LONGBRIDGE_ACCESS_TOKEN). To force it for a run, set "source": "longbridge" in config.json.
  • Canada equities (TSX/TSXV) via yahoo / yfinance using Yahoo's canonical <TICKER>.TO (TSX, e.g. TD.TO) or <TICKER>.V (TSXV, e.g. PNG.V) suffixes — free, no API key. The GlobalEquity engine uses CAD identity, whole-share orders, configurable Canadian commission/slippage, and the TSX/TSXV price-increment grid.
  • India equities (NSE/BSE) via yahoo / yfinance using <SYMBOL>.NS (NSE, e.g. RELIANCE.NS) or <SCRIP>.BO (BSE, e.g. 500325.BO) — free, no API key. 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).
  • 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.
  • 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.
  • Cryptocurrency via OKX or CCXT/100+ exchanges (free, no API key)
  • China A-shares via AKShare / baostock / tencent / sina / eastmoney (free, no API key) — TUSHARE_TOKEN optional for premium quality
  • Futures, forex, macro via AKShare (free, no API key)
  • 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).
  • HK & A-share equities via Futu (broker login required, optional)
  • Local CSV/parquet bars via the local loader (offline, no network)
  • Premium cross-market data via QVeris (optional API key)
  • Premium US data via optional-key finnhub / alphavantage / tiingo / fmp (graceful fallback to free sources)

Factors: 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.

Example workflow:

  1. Use list_skills() to discover strategy patterns
  2. Use load_skill("strategy-generate") for the strategy creation guide
  3. Use write_file() to create config.json and code/signal_engine.py
  4. Use backtest() to run and get metrics (Sharpe, return, drawdown, etc.)

Multi-Agent Swarm Teams

30 pre-built agent teams for complex research:

  • Investment Committee: bull/bear debate → risk review → PM decision
  • Global Equities Desk: A-share + HK/US + crypto → global strategist
  • Crypto Trading Desk: funding/basis + liquidation + flow → risk manager
  • Earnings Research Desk: fundamentals + revisions + options → earnings strategist
  • Macro/Rates/FX Desk: rates + FX + commodities → macro PM
  • Quant Strategy Desk: screening → factor research → backtest → risk audit
  • Risk Committee: drawdown, tail risk, regime analysis
  • And 23 more specialized teams

Use list_swarm_presets() to see all teams, then run_swarm() to execute.

Alpha Zoo (478 pre-built alphas)

One-line cross-sectional IC / IR / alive-reversed-dead categorisation across five bundled zoos:

  • qlib158 (154 alphas) — Microsoft Qlib's Alpha158 feature handler, Apache-2.0 with pinned commit SHA.
  • alpha101 (101 alphas) — Kakushadze (2015) "101 Formulaic Alphas" (arXiv:1601.00991), written from the paper appendix.
  • gtja191 (191 alphas) — Guotai Junan 2014 "191 Short-period Trading Alpha Factors" research report.
  • 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).
  • fundamental (20 factors) — PIT-safe earnings yield, ROE, gross profitability and asset growth, plus ten SEC XBRL additions: book-to-market, FCF yield, accruals, ROA, CFO yield, operating margin, cash-to-assets, leverage, revenue growth and earnings growth, from daily fundamental panels; three CN A-share daily-valuation factors (PB, PS_TTM, dividend yield) fed by the val:* panel namespace from tushare daily_basic; and three industry-neutralized variants of those CN value factors, z-scored within Shenwan L1 peers against a PIT SW2021 industry tag from tushare index_member_all (membership is point-in-time; the SW2021 taxonomy itself is retroactive).

Each 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(...).

Finance Skills (90)

Comprehensive knowledge base covering:

  • Technical analysis (candlestick, Elliott wave, Ichimoku, SMC, harmonic, chanlun)
  • Quantitative methods (factor research, ML strategy, pair trading, multi-factor)
  • Risk management (VaR/CVaR, stress testing, hedging)
  • Options (Black-Scholes, Greeks, multi-leg strategies, payoff diagrams)
  • HK/US equities (SEC filings, earnings revisions, ETF flows, ADR/H-share arbitrage)
  • Crypto trading desk (funding rates, liquidation heatmaps, stablecoin flows, token unlocks, DeFi yields)
  • Behavioral finance, trade journal diagnostics, shadow account
  • Macro analysis, credit research, sector rotation, and more

Use load_skill(name) to access full methodology docs with code templates.

Available MCP Tools (76)

ToolDescriptionAPI Key
list_skillsList all 90 finance skillsNone
load_skillLoad full skill documentationNone
start_research_goalCreate an auditable research goalNone
get_research_goalRead the current research goalNone
add_goal_evidenceAttach evidence to a research goalNone
update_research_goal_statusUpdate goal lifecycle statusNone
backtestRun vectorized backtest engineNone*
factor_analysisIC/IR analysis + layered backtestNone*
alpha_zooBrowse bundled alpha metadata and registry healthNone
alpha_benchBenchmark one alpha or a complete zooNone*
analyze_optionsBlack-Scholes price + GreeksNone
analyze_options_payoffMulti-leg expiry payoff + spot/IV scenariosNone
pattern_recognitionDetect chart patterns (H&S, double top, etc.)None
get_market_dataFetch OHLCV data (auto-detect + ordered fallback across 29 sources)None*
get_fund_flowCapital fund-flow (main/retail net inflow)None*
get_dragon_tigerDragon-tiger list (龙虎榜) top buyer/seller seatsNone*
get_northbound_flowNorthbound (Stock Connect) net flowNone*
get_southbound_flowSouthbound (Stock Connect) net buy into HK (Eastmoney/HKEX)None
get_margin_tradingMargin trading & short-selling balancesNone*
get_block_tradesBlock-trade (大宗交易) recordsNone*
get_shareholder_countShareholder-count history per symbolNone*
get_lockup_expiryRestricted-share lockup release scheduleNone*
get_sector_infoSector / industry constituents & performanceNone*
get_research_reportsSell-side analyst research reportsNone*
get_stock_newsMarket & company news headlinesNone*
get_sec_filingsSEC EDGAR filings (10-K/10-Q/8-K, etc.)None
get_financial_statementsIncome / balance / cash-flow statementsNone*
get_options_chainOptions chain (strikes, IV, OI, Greeks)None*
get_stock_profileValuation, analyst estimates & institutional holdings (US/HK)None
screen_marketMarket screener with fundamental/technical filtersNone*
search_symbolSymbol / ticker search across marketsNone
get_macro_seriesFRED macroeconomic seriesFRED_API_KEY
iwencai_searchA-share natural-language research searchIWENCAI_KEY
qveris_searchSearch QVeris premium data/tool marketplace (free discovery)QVERIS_API_KEY + paid mode
qveris_inspectInspect QVeris tool schemas before executing (free)QVERIS_API_KEY + paid mode
qveris_executeExecute a QVeris capability; budget-bounded, may be billableQVERIS_API_KEY + paid mode
web_searchSearch the web via DuckDuckGoNone
read_urlFetch web page as MarkdownNone
read_documentExtract text from PDF/DOCX/XLSX/PPTX/imagesNone
write_fileWrite files (config, strategy code)None
read_fileRead file contentsNone
read_run_artifactStructured run-artifact reads (rows / downsample / meta)None
list_strategiesBrowse discoverable strategies (Alpha Zoo + SDM store)None
query_strategiesEvidence-gated query: regime / Sharpe / quality / cost filtersNone
get_strategy_evidencePer-regime evidence rows for one strategyNone
refresh_strategy_evidenceRebuild the disposable strategy-evidence cache from run artifactsNone
analyze_trade_journalParse broker CSV → profile + behavior diagnosticsNone
extract_shadow_strategyDistill 3-5 if-then rules from profitable roundtripsNone
run_shadow_backtestMulti-market backtest + delta-PnL attributionNone*
render_shadow_reportHTML/PDF shadow report (8 sections + charts)None
scan_shadow_signalsToday's symbols matching the shadow's cadenceNone
list_swarm_presetsList multi-agent team presetsNone
run_swarmExecute a multi-agent research teamLLM key
get_swarm_statusPoll swarm run status without blockingNone
get_run_resultGet final report and task summariesNone
list_runsList recent swarm runs with metadataNone
reap_stale_runsFinalize stale swarm runsNone
retry_runRe-run a failed/stale swarm runLLM key
trading_connectionsList selectable connector profilesNone
trading_select_connectionSelect the default connector profileNone
trading_checkCheck connector readinessConnector app/OAuth
trading_accountRead account summary from selected connectorConnector app/OAuth
trading_positionsRead positions from selected connectorConnector app/OAuth
trading_ordersRead open orders from selected connectorConnector app/OAuth
trading_quoteRead a quote snapshot from selected connectorConnector app/OAuth
trading_historyRead historical bars from selected connectorConnector app/OAuth
get_institutional_holdingsSEC 13F-HR holdings by manager/ticker + quarter-over-quarter position diffsNone
etf_holdingsETF look-through — SEC N-PORT (US) and full-book A-share fund reportsNone
prediction_marketEvent-contract search/market/history as labelled implied probabilityNone
research_papersarXiv + OpenAlex search/read with source-anchored claim extractionNone
quantlib_callPure-compute finance math — 265 functions across 19 quantlib modulesNone
cashflow_performanceXIRR / MOIC / DPI / TVPI / TWR / Modified Dietz over dated cash flowsNone
orderbook_depthCrypto L2 ladder — spread bps, depth imbalance, impact costNone
sentimentLocal lexicon text scoring + crypto Fear & Greed IndexNone
technical_indicatorsRSI / MACD / Bollinger / SMA / EMA through the existing loadersNone*
get_fundamentalsPIT-safe SEC fundamentals panels (filed-date anchored)None

<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>

Quick Start

pip install vibe-trading-ai

That'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.

Loading Tools from External MCP Servers

The built-in agent can load tools from your own external MCP servers in addition to its local toolset.

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.

Setup

Create ~/.vibe-trading/agent.json:

{
  "mcpServers": {
    "my-server": {
      "command": "uvx",
      "args": ["my-mcp-server"],
      "toolTimeout": 30,
      "enabledTools": ["*"]
    }
  }
}

Ordinary 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.

Official IBKR MCP read-only probe

Add Interactive Brokers' official MCP endpoint as a read-only external server:

{
  "mcpServers": {
    "ibkr": {
      "type": "streamableHttp",
      "url": "https://api.ibkr.com/v1/api/mcp-public",
      "auth": {
        "type": "oauth",
        "scopes": ["mcp.read"],
        "clientName": "Vibe-Trading",
        "cacheDir": "~/.vibe-trading/live/ibkr/oauth"
      },
      "enabledTools": ["*"]
    }
  }
}

Authorize it with vibe-trading connector authorize ibkr-live-official-mcp-readonly. The wildcard is accepted only for this mcp.read probe. Generic trading_account and trading_positions calls stay disabled until IBKR publishes stable read tool names that Vibe-Trading can map safely; mcp.write requires an explicit tool allowlist and live order-guard handling. If IBKR issues a pre-registered OAuth client, add clientId and clientSecret inside auth.

Official eToro Public API MCP (discovery + dev)

eToro ships a hosted MCP at https://mcp.public-api.etoro.com with live OpenAPI route discovery (get-all-routes, get-route-spec) and optional execution (execute-read, execute-write). Use it for API exploration and codegen — production agent trading in Vibe-Trading goes through the built-in etoro-* connector profiles and trading_* / etoro_* tools (mandate gate on live writes).

Add to ~/.vibe-trading/agent.json (credentials on the connection, not in chat):

{
  "mcpServers": {
    "etoro-public-api": {
      "type": "streamableHttp",
      "url": "https://mcp.public-api.etoro.com",
      "headers": {
        "x-api-key": "YOUR_PUBLIC_API_KEY",
        "x-user-key": "YOUR_USER_KEY"
      },
      "enabledTools": ["get-all-routes", "get-route-spec", "execute-read"]
    }
  }
}

Omit execute-write unless you want the MCP to place trades directly (bypasses Vibe-Trading's live mandate gate). Install skill: https://mcp.public-api.etoro.com/skill

Trading connector profiles

The public trading surface is connector-first. Choose a connector profile, then paper/live is just an attribute under that connector.

pip install "vibe-trading-ai[ibkr]"
vibe-trading connector list
vibe-trading connector use ibkr-paper-local
vibe-trading connector configure ibkr-paper-local --yes
vibe-trading connector check
vibe-trading connector account
vibe-trading connector positions
vibe-trading connector orders
vibe-trading connector quote AAPL
vibe-trading connector history AAPL --duration "30 D" --bar-size "1 day"

Default ports are TWS paper 7497, IB Gateway paper 4002, TWS live-readonly 7496, and IB Gateway live-readonly 4001.

Config fields

FieldRequiredDefaultDescription
typestdio: no, HTTP: yesinferred only for stdioTransport type. Use sse or streamableHttp for URL-based servers.
commandstdio: yes—Executable to launch
argsno[]Command arguments
envno{}Extra env vars for the subprocess
urlHTTP: yes—Remote SSE / streamable HTTP endpoint URL
headersno{}Extra HTTP headers for SSE / streamable HTTP servers
toolTimeoutno30Seconds before a tool call is cancelled
enabledToolsno["*"]Allowlist of remote tool names. ["*"] enables all

For URL-based transports, type is required. The agent no longer guesses between SSE and streamable HTTP from the URL suffix.

Per-session override (API)

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.

To enable session-level MCP injection, set the environment variable on the server before starting the agent:

export ALLOW_SESSION_MCP_SERVERS=1

With the opt-in active, pass mcpServers inside session.config to extend or replace the global config for that session only:

{
  "config": {
    "mcpServers": {
      "research": {
        "command": "uvx",
        "args": ["research-mcp"],
        "enabledTools": ["search"]
      }
    }
  }
}

Without 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.

v1 limits

  • Transport: stdio, SSE, and streamable HTTP.
  • Execution: serial only. MCP tools never enter the parallel readonly path.
  • Surfaces: tools only. Resources and prompts are not exposed.
  • Swarm: MCP tools are excluded from Swarm worker registries in v1.
  • Hot reload: not supported. Restart the process to pick up config changes.

Failure handling

CaseBehavior
Missing config filefalls back to empty config — no MCP servers loaded
Invalid config filelogs a warning and falls back to empty config
Server fails to startthat server is skipped; local tools and other servers still load
Tool call times outreturns a normalized error payload instead of raising
Two server names collide after sanitizationdeterministic hash suffix appended; operator warning emitted

Examples

Backtest a MACD strategy on Apple:

Backtest AAPL with MACD crossover strategy (fast=12, slow=26, signal=9) for 2024

Analyze my trade journal and build a Shadow Account:

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.

Run an investment committee review:

Use run_swarm with investment_committee preset to evaluate NVDA. Variables: target=NVDA.US, market=US

Factor analysis on CSI 300:

Run factor_analysis on CSI 300 stocks using pe_ttm factor from 2023 to 2024

Options analysis:

Use analyze_options: spot=100, strike=105, 90 days, vol=25%, rate=3%

Multi-leg options payoff:

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.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

ADR/H-share/A-share cross-listing premium analysis — track pricing gaps between US-listed ADRs, HK-listed H-shares, and A-shares for arbitrage signals, dual-listing valuation, and delisting risk assessment.

日本語の概要は準備中です。原文の説明を表示しています。

HKUDS/Vibe-Trading3.5万2026年10月12日 更新

akshare

無料

AKShare financial data aggregator (18k+ stars). Free, no API key. Covers A-shares, US, HK, futures, macro, forex. Primary fallback for tushare and yfinance.

日本語の概要は準備中です。原文の説明を表示しています。

HKUDS/Vibe-Trading3.5万2026年10月12日 更新

alpha-zoo

無料

Browse and bench the bundled alpha zoos — prebuilt cross-sectional factor libraries (Kakushadze 101, GTJA 191, Qlib 158, Fama-French / Carhart). Use when the user asks "which alphas exist", wants metadata on a named alpha, or wants to run IC/IR on a whole zoo over a universe.

日本語の概要は準備中です。原文の説明を表示しています。

HKUDS/Vibe-Trading3.5万2026年10月12日 更新

A 股 ST/*ST 风险预测框架 — 基于最新中报/三季报或业绩预告/快报,预测下一财年是否会因营收、利润、净资产、分红不达标而被风险警示,并将新浪监管处罚记录作为独立证据面纳入风险等级。仅适用于 A 股,不预测财务造假。

日本語の概要は準備中です。原文の説明を表示しています。

HKUDS/Vibe-Trading3.5万2026年10月12日 更新

Asset allocation theory and optimizer usage — MPT / Black-Litterman / risk budgeting / all-weather strategy, including guides for 5 optimizers and rebalancing rules.

日本語の概要は準備中です。原文の説明を表示しています。

HKUDS/Vibe-Trading3.5万2026年10月12日 更新

Diagnose failed or underperforming backtests, locate the root cause, and fix the issue

日本語の概要は準備中です。原文の説明を表示しています。

HKUDS/Vibe-Trading3.5万2026年10月12日 更新

HKUDS のスキルをすべて見る

このスキルの問題を報告する