Skip to content

"Vibe-Trading: Your Personal Trading Agent"

docs(readme): compact Portfolio section in all six READMEs, measured tool count, news line

Haozhe Wubbfb776bd1bd
diff --git a/README.md b/README.md
index bc66de476..f190d6e86 100644
--- a/README.md
+++ b/README.md
@@ -52,7 +52,7 @@
> ⚠️ **Security warning:** The X account `VibeTrading_HKU`, Virtuals project `101845`, and token contract `0x640BDBF77b6447E8b7DB7894cED84BD1c40571f4` are not official Vibe-Trading assets. We have never launched or endorsed any token or memecoin. Do not buy, connect a wallet, or sign anything. [Details](SECURITY.md#official-channels--impersonation).
-- **2026-08-22** 🧮 **Factor returns stopped inventing prices across gaps**: Thirteen Alpha Zoo factors computed their return series with a bare `pct_change()`, which forward-fills a missing close before differencing — a delisting, an unshared holiday or a vendor outage became a finite "0% return" that ranking treated as information. The gap now stays `NaN`, the policy the rest of the zoo already followed ([#1172](https://github.com/HKUDS/Vibe-Trading/pull/1172)). **Fixed:** independent MCP clients on one http/sse server shared a single fallback research-goal session, so one client's `start_research_goal` could replace another's — goals now key off FastMCP's per-connection session id ([#1173](https://github.com/HKUDS/Vibe-Trading/pull/1173)); memory garbage collection and compression left stale FTS rows and orphaned relation sidecars behind ([#1174](https://github.com/HKUDS/Vibe-Trading/pull/1174)); `cancel_run()` never reached a swarm worker already streaming, which kept dispatching tool calls after the run was reported cancelled — the stop now interrupts the stream, skips that turn's tool calls, and lands as a *cancelled* task rather than a failed one ([#1175](https://github.com/HKUDS/Vibe-Trading/pull/1175)); MCP `get_research_reports` dropped `beginTime`/`endTime` on the way in ([#1176](https://github.com/HKUDS/Vibe-Trading/pull/1176)); and `get_options_chain` answered a wrong-cycle expiration with `ok: true` and another date's contracts — an explicit expiration is now validated against the returned chain ([#1177](https://github.com/HKUDS/Vibe-Trading/pull/1177)). Thanks [@Shizoqua](https://github.com/Shizoqua) and [@cgycorey](https://github.com/cgycorey)!
+- **2026-08-22** 🧮 **Factor returns stopped inventing prices across gaps**: Thirteen Alpha Zoo factors computed their return series with a bare `pct_change()`, which forward-fills a missing close before differencing — a delisting, an unshared holiday or a vendor outage became a finite "0% return" that ranking treated as information. The gap now stays `NaN`, the policy the rest of the zoo already followed ([#1172](https://github.com/HKUDS/Vibe-Trading/pull/1172)). **Fixed:** independent MCP clients on one http/sse server shared a single fallback research-goal session, so one client's `start_research_goal` could replace another's — goals now key off FastMCP's per-connection session id ([#1173](https://github.com/HKUDS/Vibe-Trading/pull/1173)); memory garbage collection and compression left stale FTS rows and orphaned relation sidecars behind ([#1174](https://github.com/HKUDS/Vibe-Trading/pull/1174)); `cancel_run()` never reached a swarm worker already streaming, which kept dispatching tool calls after the run was reported cancelled — the stop now interrupts the stream, skips that turn's tool calls, and lands as a *cancelled* task rather than a failed one ([#1175](https://github.com/HKUDS/Vibe-Trading/pull/1175)); MCP `get_research_reports` dropped `beginTime`/`endTime` on the way in ([#1176](https://github.com/HKUDS/Vibe-Trading/pull/1176)); and `get_options_chain` answered a wrong-cycle expiration with `ok: true` and another date's contracts — an explicit expiration is now validated against the returned chain ([#1177](https://github.com/HKUDS/Vibe-Trading/pull/1177)). **New:** a read-only **Portfolio** page aggregates holdings across your read-only broker connections — per-source provenance, immutable snapshots, failed sources excluded rather than carried forward, CSV export, and a `portfolio_summary` tool that feeds `portfolio_risk_xray` ([#1072](https://github.com/HKUDS/Vibe-Trading/pull/1072)). Thanks [@Shizoqua](https://github.com/Shizoqua), [@cgycorey](https://github.com/cgycorey) and [@goatyyc](https://github.com/goatyyc)!
- **2026-08-21** ⏱️ **Runs that hung forever**: A `bash` timeout killed the shell but not the grandchildren holding its pipe handles, so a run sat "running" for 20+ minutes. Commands now spawn in their own process group, a timeout kills the whole tree, a stall watchdog ends a run making no forward progress, and compaction stopped discarding the model's own verification records ([#1169](https://github.com/HKUDS/Vibe-Trading/pull/1169)). **Fixed:** multi-year Tencent history silently truncated at 500 bars ([#1154](https://github.com/HKUDS/Vibe-Trading/pull/1154)). **New:** swarm runs replay only their failed subgraph ([#1158](https://github.com/HKUDS/Vibe-Trading/pull/1158), closes [#1157](https://github.com/HKUDS/Vibe-Trading/issues/1157)); Market Watch shows each monitor's latest verdict inline ([#1156](https://github.com/HKUDS/Vibe-Trading/pull/1156), closes [#943](https://github.com/HKUDS/Vibe-Trading/issues/943)); `quantlib` reaches 286 tested functions ([#1159](https://github.com/HKUDS/Vibe-Trading/pull/1159)–[#1168](https://github.com/HKUDS/Vibe-Trading/pull/1168)). Thanks [@wiliao](https://github.com/wiliao), [@cgycorey](https://github.com/cgycorey), [@he-yufeng](https://github.com/he-yufeng), [@BigFishEmily](https://github.com/BigFishEmily), [@santhreal](https://github.com/santhreal), [@SiMinus](https://github.com/SiMinus), and [@alinv0](https://github.com/alinv0)!
- **2026-08-20** 🚀 **v0.1.14 released** ([Release notes](https://github.com/HKUDS/Vibe-Trading/releases/tag/v0.1.14), `pip install -U vibe-trading-ai`): 272 commits and 74 merged pull requests since 0.1.13. **The headline is that a finished backtest is now something you can read rather than a folder of CSVs.** Run Detail grows four tabs — **Factor Research** (IC series with its mean line, IC statistics, quantile-group equity, and a pairwise IC correlation matrix that existed nowhere before), **Positions** (weight pie/treemap on a date slider, sector net-exposure bars, weight-evolution area — the pie is gross composition and the bars are net, so a long/short pair in one sector nets to zero on the bars while both legs stay visible on the pie), **Tearsheet** (monthly-returns heatmap, annual bars, top-5 drawdowns annotated onto the equity curve), and an interactive **research dashboard** with KPIs, benchmark-relative equity, rolling Sharpe and the full trade ledger. All four read artifacts a run already writes — no new pipeline. A new **Options Lab** page adds an expiry payoff diagram, a spot×IV scenario matrix, portfolio Greeks and a live options chain, computed through the same test-pinned engine the MCP tools use. **Install:** Intel Macs can `pip install vibe-trading-ai` again — `smartmoneyconcepts` pulled in `llvmlite`, which ships no macOS x86_64 wheel from 0.46 on, so every Intel install became a CMake source build; it is now the opt-in `[smc]` extra and the stale `<3.14` cap is gone ([#1035](https://github.com/HKUDS/Vibe-Trading/discussions/1035)). **New:** evidence-gated **Strategy Discovery** across the Alpha Zoo and the SDM store, with a population path, read-time freshness (`fresh`/`aging`/`stale`) and stale rows failing closed out of recommendations; scheduled research that **delivers itself** through a leased outbox and persists each monitor's verdict for the Market Watch list; seven read-only **Futu** endpoints; **Vietnam (HOSE)** as a backtest market; offline **USD-M account reconciliation**; **Novita AI** and **GitHub Copilot** providers; a hosted **MetaTrader 5** data source; **Spanish** and **German** locales; and MCP grows to 74 tools. **Correctness:** the test suite stopped escaping into your real config root, where a full run had been appending synthetic `order_rejected` records to the live hash-chained audit ledger; `build_registry()` no longer returns a short tool list in silence; `xirr` survives long-horizon discount underflow and DCF refuses non-finite inputs instead of returning a negative share price; `.VN` symbols stopped executing under China A-share rules; the backtest archive stopped mixing two runs' artifacts; and a broad grounding pass ended a class of false refusals on dates, ordered lists, identity constants in rate formulas, and order lines read as quotes. Thanks @Shizoqua, @shadowinlife, @pengpengyi92, @cgycorey, @ofeksh-tr, @lorenzozanee, @AndyLongest, @zzz607, @wiliao, @jay79-boop, @Robin1987China, @Echoandelementwebsites, @zhiwuyazhe-fjr, @x-lambda, @sykuang, @straun-repo, @nstavros, @ngoanpv, @miguelangelo78, @lukiod, @jax-novita, @honginp, @he-yufeng, @fixXxerTech, @er-s-an, @daviddaco1, @birdxs, @QCYTSN, @549236606-oss and @1psconstructor.
<details>
@@ -333,130 +333,28 @@ vibe-trading --upload trades_export.csv
vibe-trading run -p "Analyze my trading behavior, extract my shadow strategy, and compare it with my actual trades"
```
-## 💼 Local Multi-Broker Portfolio
+---
-The Web UI includes an editable, read-only **Portfolio** page. Choose any
-built-in connector profile that declares `account.read`, `positions.read`, and
-`readonly=True`; OAuth read-discovery profiles are supported too. A new
-installation starts with no selected account. **Manage accounts** lets you add,
-disable, rename, and reorder sources, include or exclude cash, and choose USD or
-CNY as the primary display currency.
-
-A manual refresh:
-
-- reads each enabled source through the connector registry;
-- values holdings in USD and displays a CNY conversion;
-- stores immutable snapshots in `~/.vibe-trading/portfolio/portfolio.sqlite3`;
-- stores credential-free source preferences in owner-only
- `~/.vibe-trading/portfolio.json`;
-- isolates source failures, carries forward the last successful source data,
- and excludes partial snapshots from the history chart;
-- detects the same instrument held across multiple sources;
-- exports the latest holdings as CSV; and
-- exposes a sanitized `portfolio_summary` tool to the built-in Agent.
-
-The Agent context excludes account numbers, credential material, order IDs,
-personal names, and local paths. Portfolio arithmetic is deterministic; the LLM
-only interprets the sanitized result. No portfolio endpoint or tool can place,
-cancel, transfer, or withdraw. The settings API rejects profiles that expose
-write capabilities; credentials stay in their connector-specific stores and
-never enter `portfolio.json`.
-
-### Local connector instances and Codex workflow
-
-Portfolio sources are **connection instances**, not hard-coded broker names:
-
-- a `TradingProfile` in the repository is a reusable, credential-free template;
-- a connection in `~/.vibe-trading/connections.json` is an account instance on
- one computer; and
-- `portfolio.json` references only the local `connection_id`.
-
-User-installed connectors live outside the Git checkout under
-`~/.vibe-trading/connectors/<connector>/`. Their `connector.json` manifest must
-declare `readonly: true` plus `account.read` and `positions.read`; manifests
-with order, transfer, cancellation, withdrawal, or other write capabilities
-are rejected. Each adapter implements only:
+## 💼 Local Multi-Broker Portfolio
-```python
-check_status(credentials=..., config=...)
-get_account_snapshot(credentials=..., config=...)
-get_positions(credentials=..., config=...)
-```
+The Web UI adds a read-only **Portfolio** page that aggregates holdings across the broker connections you pick. Sources are connection instances of read-only profiles declaring `account.read` and `positions.read` — set them up under **Broker Connectors** in [Detailed Capabilities](#-detailed-capabilities). The IBKR official-MCP profile is not eligible as a source yet.
-The manifest declares credential field names, but never values. Values entered
-in the local Connection Center are stored through the operating-system secret
-vault (macOS Keychain, Windows Credential Manager, or Linux Secret Service) and
-are never returned by the Web API.
+| Behavior | What you get |
+|----------|--------------|
+| **Per-source provenance** | Every holding names the connection it came from, valued in USD with a CNY conversion. |
+| **Failed sources excluded** | A source that errors is reported as an error and left out of the totals — never carried forward — and the snapshot is marked incomplete. |
+| **Immutable snapshots** | Each refresh is stored in `~/.vibe-trading/portfolio/portfolio.sqlite3`; credential-free settings live in `~/.vibe-trading/portfolio.json` and `connections.json`. |
+| **Export & analysis** | CSV export, plus a sanitized `portfolio_summary` agent tool whose `risk_xray_args` pass straight into `portfolio_risk_xray`. The same snapshot prints in the terminal with `vibe-trading portfolio show` (`refresh` / `sources` alongside). |
-Codex can start a connector from the bundled local-only template:
+Read-only connectors you install yourself stay outside the checkout, in `~/.vibe-trading/connectors/<name>/`: a `connector.json` manifest plus an `adapter.py` implementing `check_status` / `get_account_snapshot` / `get_positions`. A manifest declaring any write capability is rejected.
```bash
vibe-trading connector init my-broker --destination /tmp
-# Ask Codex to implement /tmp/my-broker/adapter.py from the official read API docs.
vibe-trading connector validate /tmp/my-broker
vibe-trading connector install /tmp/my-broker
```
-Restart the local server, open **Portfolio → Manage accounts → Connection
-center**, create an account connection from the installed profile, save its
-credentials, test it, and then add that connection to the portfolio. Private
-plugins and credentials remain local; a public, credential-free connector can
-still be contributed separately when useful to the community.
-
-Install the two optional broker SDKs (CCXT for Binance is in the base package):
-
-```bash
-pip install "vibe-trading-ai[ibkr,longbridge]"
-```
-
-Configure IBKR against a running TWS or IB Gateway session with read-only API
-access enabled:
-
-```bash
-vibe-trading connector configure ibkr-live-local-readonly --yes
-vibe-trading connector check ibkr-live-local-readonly
-```
-
-Set the Longbridge credentials in `agent/.env` (or an owner-only
-`~/.vibe-trading/longbridge.json`) and use an API application intended for
-read access:
-
-```dotenv
-LONGBRIDGE_APP_KEY=...
-LONGBRIDGE_APP_SECRET=...
-LONGBRIDGE_ACCESS_TOKEN=...
-```
-
-Store a Binance key with **read-only permission only** in
-`~/.vibe-trading/binance.json` and make the file owner-readable only:
-
-```json
-{
- "api_key": "...",
- "api_secret": "...",
- "profile": "live-readonly",
- "readonly": true
-}
-```
-
-```bash
-chmod 600 ~/.vibe-trading/binance.json
-vibe-trading connector check binance-live-sdk-readonly
-vibe-trading connector check longbridge-live-sdk-readonly
-```
-
-Build the frontend and start the local server, then open `/portfolio` and press
-**Refresh all**:
-
-```bash
-cd frontend && npm ci && npm run build && cd ..
-vibe-trading serve --port 8899
-```
-
-Historical changes begin with the first successful refresh. Until deposits and
-withdrawals are imported, the history is an asset-value series and must not be
-treated as investment return. Crypto values use USDT as a USD valuation proxy;
-the snapshot records this limitation rather than treating it as an exact FX rate.
+Their credentials go to the OS keyring (macOS Keychain, Windows Credential Manager, Linux Secret Service) with `pip install "vibe-trading-ai[keyring]"`, never into the config files. Nothing on this path can place or cancel an order.
---
@@ -1597,7 +1495,7 @@ endpoint in read-only mode. Add this to `~/.vibe-trading/agent.json`:
"mcpServers": {
"ibkr": {
"type": "streamableHttp",
- "url": "https://api.ibkr.com/v1/api/mcp-public",
+ "url": "https://api.ibkr.com/v1/api/mcp",
"auth": {
"type": "oauth",
"scopes": ["mcp.read"],
@@ -1814,7 +1712,7 @@ Vibe-Trading/
│ │ ├── memory/ # Cross-session persistent memory
│ │ │ └── persistent.py # file-based memory (~/.vibe-trading/memory/)
│ │ │
-│ │ ├── tools/ # 97 auto-discovered agent tools
+│ │ ├── tools/ # 106 auto-discovered agent tools
│ │ │ ├── backtest_tool.py # run backtests
│ │ │ ├── remember_tool.py # cross-session memory (save/recall/forget)
│ │ │ ├── skill_writer_tool.py # skill CRUD (save/patch/delete/file)
diff --git a/README_ar.md b/README_ar.md
index a78a68939..9439849d5 100644
--- a/README_ar.md
+++ b/README_ar.md
@@ -52,7 +52,7 @@
> ⚠️ **تحذير أمني:** حساب X باسم `VibeTrading_HKU`، ومشروع Virtuals رقم `101845`، وعقد التوكن `0x640BDBF77b6447E8b7DB7894cED84BD1c40571f4` كلّها غير رسمية ولا تتبع Vibe-Trading. لم نُطلق أو نؤيد مطلقًا أي توكن أو عملة ميم. لا تشترِ هذا التوكن، ولا تربط محفظتك، ولا توقّع أي شيء. [التفاصيل](SECURITY.md#official-channels--impersonation).
-- **2026-08-22** 🧮 **توقّفت عوائد العوامل عن اختلاق أسعار عبر الفجوات**: كانت 13 من عوامل Alpha Zoo تحسب سلسلة عوائدها بـ `pct_change()` مجرّدة، وهي تملأ الإغلاق المفقود للأمام قبل الفرق — فيتحوّل الشطب أو عطلة غير مشتركة أو انقطاع المزوّد إلى «عائد 0%» محدود يعامله الترتيب كمعلومة. تبقى الفجوة الآن `NaN`، وهي السياسة التي يتبعها بقية الـ zoo أصلًا ([#1172](https://github.com/HKUDS/Vibe-Trading/pull/1172)). **أُصلح:** كان عملاء MCP المستقلّون على خادم http/sse واحد يتشاركون جلسة هدف بحثي احتياطية واحدة، فيستبدل `start_research_goal` لأحدهم هدف الآخر — تُميَّز الأهداف الآن بمعرّف جلسة FastMCP لكل اتصال ([#1173](https://github.com/HKUDS/Vibe-Trading/pull/1173))؛ وكان جمع قمامة الذاكرة والضغط يتركان صفوف FTS قديمة وملفات علاقات يتيمة ([#1174](https://github.com/HKUDS/Vibe-Trading/pull/1174))؛ ولم يكن `cancel_run()` يصل إلى عامل swarm يبثّ بالفعل، فيواصل إرسال استدعاءات الأدوات بعد الإبلاغ عن إلغاء التشغيل — يقطع الإيقاف الآن البثّ ويتخطّى استدعاءات تلك الجولة ويُسجَّل كمهمة *ملغاة* لا فاشلة ([#1175](https://github.com/HKUDS/Vibe-Trading/pull/1175))؛ وكان `get_research_reports` عبر MCP يُسقط `beginTime`/`endTime` عند المدخل ([#1176](https://github.com/HKUDS/Vibe-Trading/pull/1176))؛ وكان `get_options_chain` يجيب عن تاريخ انتهاء من دورة أخرى بـ `ok: true` وعقود تاريخ آخر — يُتحقَّق الآن من تاريخ الانتهاء الصريح مقابل السلسلة المُعادة ([#1177](https://github.com/HKUDS/Vibe-Trading/pull/1177)). شكرًا [@Shizoqua](https://github.com/Shizoqua)، [@cgycorey](https://github.com/cgycorey)!
+- **2026-08-22** 🧮 **توقّفت عوائد العوامل عن اختلاق أسعار عبر الفجوات**: كانت 13 من عوامل Alpha Zoo تحسب سلسلة عوائدها بـ `pct_change()` مجرّدة، وهي تملأ الإغلاق المفقود للأمام قبل الفرق — فيتحوّل الشطب أو عطلة غير مشتركة أو انقطاع المزوّد إلى «عائد 0%» محدود يعامله الترتيب كمعلومة. تبقى الفجوة الآن `NaN`، وهي السياسة التي يتبعها بقية الـ zoo أصلًا ([#1172](https://github.com/HKUDS/Vibe-Trading/pull/1172)). **أُصلح:** كان عملاء MCP المستقلّون على خادم http/sse واحد يتشاركون جلسة هدف بحثي احتياطية واحدة، فيستبدل `start_research_goal` لأحدهم هدف الآخر — تُميَّز الأهداف الآن بمعرّف جلسة FastMCP لكل اتصال ([#1173](https://github.com/HKUDS/Vibe-Trading/pull/1173))؛ وكان جمع قمامة الذاكرة والضغط يتركان صفوف FTS قديمة وملفات علاقات يتيمة ([#1174](https://github.com/HKUDS/Vibe-Trading/pull/1174))؛ ولم يكن `cancel_run()` يصل إلى عامل swarm يبثّ بالفعل، فيواصل إرسال استدعاءات الأدوات بعد الإبلاغ عن إلغاء التشغيل — يقطع الإيقاف الآن البثّ ويتخطّى استدعاءات تلك الجولة ويُسجَّل كمهمة *ملغاة* لا فاشلة ([#1175](https://github.com/HKUDS/Vibe-Trading/pull/1175))؛ وكان `get_research_reports` عبر MCP يُسقط `beginTime`/`endTime` عند المدخل ([#1176](https://github.com/HKUDS/Vibe-Trading/pull/1176))؛ وكان `get_options_chain` يجيب عن تاريخ انتهاء من دورة أخرى بـ `ok: true` وعقود تاريخ آخر — يُتحقَّق الآن من تاريخ الانتهاء الصريح مقابل السلسلة المُعادة ([#1177](https://github.com/HKUDS/Vibe-Trading/pull/1177)). **جديد:** صفحة **المحفظة** للقراءة فقط تجمّع مراكزك عبر اتصالات الوسطاء للقراءة فقط — مصدر كل مركز، ولقطات غير قابلة للتعديل، واستبعاد المصادر الفاشلة بدل ترحيلها، وتصدير CSV، وأداة `portfolio_summary` التي تغذّي `portfolio_risk_xray` ([#1072](https://github.com/HKUDS/Vibe-Trading/pull/1072)). شكرًا [@Shizoqua](https://github.com/Shizoqua)، [@cgycorey](https://github.com/cgycorey)، [@goatyyc](https://github.com/goatyyc)!
- **2026-08-21** ⏱️ **عمليات تشغيل تتجمّد إلى الأبد**: كانت مهلة `bash` تقتل الـ shell دون الأحفاد الممسكين بمقابض الأنابيب، فيبقى التشغيل «قيد التشغيل» أكثر من 20 دقيقة. الآن تُطلق الأوامر في مجموعة عمليات خاصة وتقتل المهلة الشجرة بأكملها، ويُنهي مراقب توقّف أي تشغيل لا يُحرز تقدّمًا، ولم يعد الضغط يُسقط سجلات تحقق النموذج نفسه ([#1169](https://github.com/HKUDS/Vibe-Trading/pull/1169)). **أُصلح:** كان تاريخ Tencent الممتد لسنوات يُقتطع بصمت عند 500 شمعة ([#1154](https://github.com/HKUDS/Vibe-Trading/pull/1154)). **جديد:** يعيد swarm تنفيذ الرسم الفرعي الفاشل وحده ([#1158](https://github.com/HKUDS/Vibe-Trading/pull/1158)، يغلق [#1157](https://github.com/HKUDS/Vibe-Trading/issues/1157))؛ ويعرض Market Watch أحدث حكم لكل مراقب داخل القائمة ([#1156](https://github.com/HKUDS/Vibe-Trading/pull/1156)، يغلق [#943](https://github.com/HKUDS/Vibe-Trading/issues/943))؛ وبلغت `quantlib` 286 دالة مختبَرة ([#1159](https://github.com/HKUDS/Vibe-Trading/pull/1159)–[#1168](https://github.com/HKUDS/Vibe-Trading/pull/1168)). شكرًا [@wiliao](https://github.com/wiliao)، [@cgycorey](https://github.com/cgycorey)، [@he-yufeng](https://github.com/he-yufeng)، [@BigFishEmily](https://github.com/BigFishEmily)، [@santhreal](https://github.com/santhreal)، [@SiMinus](https://github.com/SiMinus)، [@alinv0](https://github.com/alinv0)!
- **2026-08-20** 🚀 **صدر الإصدار v0.1.14** ([ملاحظات الإصدار](https://github.com/HKUDS/Vibe-Trading/releases/tag/v0.1.14)، `pip install -U vibe-trading-ai`): 272 التزامًا و74 طلب دمج منذ 0.1.13. **العنوان هو أن الاختبار الرجعي المكتمل صار شيئًا يمكن قراءته، لا مجلد ملفات CSV.** اكتسبت صفحة Run Detail أربع علامات تبويب — **بحث العوامل** (سلسلة IC اليومية مع خط متوسطها، وإحصاءات IC، ومنحنيات ملكية المجموعات الكمّية، ومصفوفة ارتباط IC لم تكن موجودة في أي مكان من قبل)، و**بنية المراكز** (رسم دائري/شجري للأوزان مع منزلق زمني، وأعمدة الانكشاف الصافي حسب القطاع، ومساحة تطوّر الأوزان — الدائري تركيب **إجمالي** والأعمدة **صافية**، فيتلاشى زوج شراء/بيع في القطاع نفسه إلى صفر على الأعمدة بينما تبقى الساقان مرئيتين على الدائري)، و**Tearsheet** (خريطة حرارية للعوائد الشهرية، وأعمدة سنوية، وأكبر خمسة تراجعات معلَّمة على منحنى الملكية)، و**لوحة بحث** تفاعلية بمؤشرات أداء ومنحنى ملكية مقابل المؤشر ونسبة شارب متدحرجة وسجل الصفقات كاملاً. الأربع تقرأ مخرجات تكتبها عملية التشغيل أصلاً — بلا أي خط بيانات جديد. وتضيف صفحة **Options Lab** الجديدة مخطط العوائد عند الاستحقاق، ومصفوفة سيناريوهات السعر الفوري×التذبذب الضمني، وحروف الإغريق للمحفظة، وسلسلة خيارات حيّة، محسوبة بالمحرك نفسه المثبَّت بالاختبارات الذي تستخدمه أدوات MCP. **التثبيت:** عادت أجهزة Mac بمعالج Intel قادرة على تنفيذ `pip install vibe-trading-ai` — إذ كانت `smartmoneyconcepts` تجرّ معها `llvmlite` التي لم تعد تنشر wheel لـ macOS x86_64 منذ 0.46، فتحوّل كل تثبيت على Intel إلى بناء من المصدر يتطلب CMake؛ صارت الآن إضافة اختيارية باسم `[smc]`، ورُفع معها سقف `<3.14` القديم ([#1035](https://github.com/HKUDS/Vibe-Trading/discussions/1035)). **الجديد:** **اكتشاف الاستراتيجيات ببوابة أدلة** عبر Alpha Zoo ومخزن SDM، مع مسار لتعبئة الأدلة، وحداثة تُحسب عند القراءة (`fresh`/`aging`/`stale`)، وصفوف قديمة تخرج من التوصيات الافتراضية بشكل fail-closed؛ وبحث مجدول **يسلّم نفسه** عبر صندوق صادر بعقد إيجار، ويحفظ حكم كل مراقب لقائمة Market Watch؛ وسبع نقاط نهاية للقراءة فقط من **Futu**؛ و**فيتنام (HOSE)** كسوق للاختبار الرجعي؛ و**مطابقة حساب USD-M** دون اتصال؛ ومزوّدا **Novita AI** و**GitHub Copilot**؛ ومصدر بيانات **MetaTrader 5** مُستضاف؛ ولغتا الواجهة **الإسبانية** و**الألمانية**؛ وارتفاع أدوات MCP إلى 74. **الصحّة:** لم تعد حزمة الاختبارات تفلت من صندوقها الرملي لتكتب في جذر إعداداتك الحقيقي، حيث كان كل تشغيل كامل يُلحق سجلات `order_rejected` مصطنعة بدفتر تدقيق التداول الحي المسلسل بالتجزئة؛ ولم تعد `build_registry()` تعيد قائمة أدوات ناقصة بصمت؛ وصار `xirr` يصمد أمام تدفّق الخصم السفلي على آفاق طويلة، ويرفض DCF المدخلات غير المنتهية بدل إعادة قيمة سهم سالبة؛ وتوقّفت رموز `.VN` عن التنفيذ بقواعد الأسهم الصينية من الفئة A؛ وتوقّف أرشيف الاختبار الرجعي عن خلط مخرجات تشغيلين؛ وأنهت جولة واسعة من إصلاحات grounding صنفًا كاملاً من الرفض الخاطئ المتعلق بالتواريخ والقوائم المرقّمة والثوابت المتطابقة في صيغ المعدلات وأسطر الأوامر التي كانت تُقرأ كأسعار مرصودة. شكراً لـ @Shizoqua و@shadowinlife و@pengpengyi92 و@cgycorey و@ofeksh-tr و@lorenzozanee و@AndyLongest و@zzz607 و@wiliao و@jay79-boop و@Robin1987China و@Echoandelementwebsites و@zhiwuyazhe-fjr و@x-lambda و@sykuang و@straun-repo و@nstavros و@ngoanpv و@miguelangelo78 و@lukiod و@jax-novita و@honginp و@he-yufeng و@fixXxerTech و@er-s-an و@daviddaco1 و@birdxs و@QCYTSN و@549236606-oss و@1psconstructor.
<details>
@@ -336,6 +336,29 @@ vibe-trading run -p "Analyze my trading behavior, extract my shadow strategy, an
---
+## 💼 محفظة محلية متعددة الوسطاء
+
+تضيف واجهة الويب صفحة **المحفظة** للقراءة فقط، وهي تجمّع مراكزك عبر اتصالات الوسطاء التي تختارها. المصادر هي نسخ اتصال من ملفات تعريف للقراءة فقط تعلن `account.read` و`positions.read` — تُضبط من **موصّلات الوسطاء** في [القدرات التفصيلية](#-القدرات-التفصيلية). أما ملف تعريف IBKR الرسمي عبر MCP فلا يصلح مصدراً بعد.
+
+| السلوك | ما تحصل عليه |
+|--------|--------------|
+| **مصدر كل مركز** | كل مركز يذكر الاتصال الذي جاء منه، مُقوَّماً بالدولار مع تحويل إلى اليوان. |
+| **استبعاد المصادر الفاشلة** | المصدر الذي يفشل يُبلَّغ عنه كخطأ ويُستبعد من الإجماليات — ولا تُرحَّل بياناته السابقة أبداً — وتُوسم اللقطة بأنها غير مكتملة. |
+| **لقطات غير قابلة للتعديل** | كل تحديث يُحفظ في `~/.vibe-trading/portfolio/portfolio.sqlite3`، بينما تبقى الإعدادات الخالية من بيانات الاعتماد في `~/.vibe-trading/portfolio.json` و`connections.json`. |
+| **التصدير والتحليل** | تصدير CSV، إضافة إلى أداة وكيل `portfolio_summary` منقّاة تُمرَّر قيمة `risk_xray_args` فيها مباشرةً إلى `portfolio_risk_xray`. تُطبع اللقطة نفسها في الطرفية عبر `vibe-trading portfolio show` (مع `refresh` / `sources` أيضًا). |
+
+الموصّلات للقراءة فقط التي تثبّتها بنفسك تبقى خارج مجلد المشروع، في `~/.vibe-trading/connectors/<name>/`: ملف بيان `connector.json` مع `adapter.py` ينفّذ `check_status` و`get_account_snapshot` و`get_positions`. وأي بيان يعلن قدرة كتابة يُرفض.
+
+```bash
+vibe-trading connector init my-broker --destination /tmp
+vibe-trading connector validate /tmp/my-broker
+vibe-trading connector install /tmp/my-broker
+```
+
+تُحفظ بيانات اعتمادها في مخزن أسرار نظام التشغيل (macOS Keychain أو Windows Credential Manager أو Linux Secret Service) عبر `pip install "vibe-trading-ai[keyring]"`، ولا تدخل ملفات الإعداد أبداً. ولا شيء في هذا المسار يمكنه إرسال أمر أو إلغاؤه.
+
+---
+
## 🧪 سير البحث
تتبع أغلب التشغيلات مسار أدلة واحداً: توجيه الطلب، تحميل سياق السوق المناسب، تنفيذ الأدوات، التحقق من المخرجات، وإبقاء المخرجات قابلة للفحص.
@@ -1580,7 +1603,7 @@ Vibe-Trading/
│ │ ├── memory/ # Cross-session persistent memory
│ │ │ └── persistent.py # file-based memory (~/.vibe-trading/memory/)
│ │ │
-│ │ ├── tools/ # 97 auto-discovered agent tools
+│ │ ├── tools/ # 106 auto-discovered agent tools
│ │ │ ├── backtest_tool.py # run backtests
│ │ │ ├── remember_tool.py # cross-session memory (save/recall/forget)
│ │ │ ├── skill_writer_tool.py # skill CRUD (save/patch/delete/file)
diff --git a/README_es.md b/README_es.md
index d1996350a..61b1d6739 100644
--- a/README_es.md
+++ b/README_es.md
@@ -52,7 +52,7 @@
> ⚠️ **Advertencia de seguridad:** la cuenta de X `VibeTrading_HKU`, el proyecto de Virtuals `101845` y el contrato de token `0x640BDBF77b6447E8b7DB7894cED84BD1c40571f4` no son activos oficiales de Vibe-Trading. Nunca hemos lanzado ni respaldado ningún token o memecoin. No compres, conectes una wallet ni firmes nada. [Detalles](SECURITY.md#official-channels--impersonation).
-- **2026-08-22** 🧮 **Los retornos de factores dejaron de inventar precios a través de huecos**: Trece factores del Alpha Zoo calculaban su serie de retornos con un `pct_change()` desnudo, que rellena hacia delante el cierre faltante antes de diferenciar — una exclusión de cotización, un festivo no compartido o una caída del proveedor se convertían en un «retorno del 0 %» finito que el ranking trataba como información. El hueco ahora se mantiene `NaN`, la política que el resto del zoo ya seguía ([#1172](https://github.com/HKUDS/Vibe-Trading/pull/1172)). **Corregido:** clientes MCP independientes en un mismo servidor http/sse compartían una única sesión de objetivo de investigación de reserva, de modo que el `start_research_goal` de uno podía reemplazar el de otro — los objetivos ahora se distinguen por el id de sesión por conexión de FastMCP ([#1173](https://github.com/HKUDS/Vibe-Trading/pull/1173)); la recolección de basura y la compresión de memoria dejaban filas FTS obsoletas y sidecars de relaciones huérfanos ([#1174](https://github.com/HKUDS/Vibe-Trading/pull/1174)); `cancel_run()` nunca llegaba a un worker swarm que ya estaba transmitiendo, que seguía despachando llamadas a herramientas después de reportarse la ejecución como cancelada — la parada ahora interrumpe el flujo, omite las llamadas de ese turno y queda como tarea *cancelada* en lugar de fallida ([#1175](https://github.com/HKUDS/Vibe-Trading/pull/1175)); `get_research_reports` por MCP descartaba `beginTime`/`endTime` a la entrada ([#1176](https://github.com/HKUDS/Vibe-Trading/pull/1176)); y `get_options_chain` respondía a un vencimiento de otro ciclo con `ok: true` y los contratos de otra fecha — un vencimiento explícito ahora se valida contra la cadena devuelta ([#1177](https://github.com/HKUDS/Vibe-Trading/pull/1177)). ¡Gracias [@Shizoqua](https://github.com/Shizoqua) y [@cgycorey](https://github.com/cgycorey)!
+- **2026-08-22** 🧮 **Los retornos de factores dejaron de inventar precios a través de huecos**: Trece factores del Alpha Zoo calculaban su serie de retornos con un `pct_change()` desnudo, que rellena hacia delante el cierre faltante antes de diferenciar — una exclusión de cotización, un festivo no compartido o una caída del proveedor se convertían en un «retorno del 0 %» finito que el ranking trataba como información. El hueco ahora se mantiene `NaN`, la política que el resto del zoo ya seguía ([#1172](https://github.com/HKUDS/Vibe-Trading/pull/1172)). **Corregido:** clientes MCP independientes en un mismo servidor http/sse compartían una única sesión de objetivo de investigación de reserva, de modo que el `start_research_goal` de uno podía reemplazar el de otro — los objetivos ahora se distinguen por el id de sesión por conexión de FastMCP ([#1173](https://github.com/HKUDS/Vibe-Trading/pull/1173)); la recolección de basura y la compresión de memoria dejaban filas FTS obsoletas y sidecars de relaciones huérfanos ([#1174](https://github.com/HKUDS/Vibe-Trading/pull/1174)); `cancel_run()` nunca llegaba a un worker swarm que ya estaba transmitiendo, que seguía despachando llamadas a herramientas después de reportarse la ejecución como cancelada — la parada ahora interrumpe el flujo, omite las llamadas de ese turno y queda como tarea *cancelada* en lugar de fallida ([#1175](https://github.com/HKUDS/Vibe-Trading/pull/1175)); `get_research_reports` por MCP descartaba `beginTime`/`endTime` a la entrada ([#1176](https://github.com/HKUDS/Vibe-Trading/pull/1176)); y `get_options_chain` respondía a un vencimiento de otro ciclo con `ok: true` y los contratos de otra fecha — un vencimiento explícito ahora se valida contra la cadena devuelta ([#1177](https://github.com/HKUDS/Vibe-Trading/pull/1177)). **Nuevo:** una página **Cartera** de solo lectura agrega las posiciones de tus conexiones de broker de solo lectura — procedencia por fuente, instantáneas inmutables, fuentes fallidas excluidas en lugar de arrastradas, exportación CSV y una herramienta `portfolio_summary` que alimenta a `portfolio_risk_xray` ([#1072](https://github.com/HKUDS/Vibe-Trading/pull/1072)). ¡Gracias [@Shizoqua](https://github.com/Shizoqua), [@cgycorey](https://github.com/cgycorey) y [@goatyyc](https://github.com/goatyyc)!
- **2026-08-21** ⏱️ **Ejecuciones colgadas para siempre**: El tiempo límite de `bash` mataba el shell pero no a los nietos que retenían sus descriptores de tubería, así que una ejecución quedaba «en ejecución» más de 20 minutos. Ahora los comandos se lanzan en su propio grupo de procesos y el tiempo límite mata el árbol completo, un vigilante de estancamiento termina una ejecución que no avanza, y la compactación dejó de descartar los registros de verificación del propio modelo ([#1169](https://github.com/HKUDS/Vibe-Trading/pull/1169)). **Corregido:** el histórico de Tencent de varios años se truncaba en silencio a 500 barras ([#1154](https://github.com/HKUDS/Vibe-Trading/pull/1154)). **Nuevo:** las ejecuciones swarm reproducen solo su subgrafo fallido ([#1158](https://github.com/HKUDS/Vibe-Trading/pull/1158), cierra [#1157](https://github.com/HKUDS/Vibe-Trading/issues/1157)); Market Watch muestra el último veredicto de cada monitor en la lista ([#1156](https://github.com/HKUDS/Vibe-Trading/pull/1156), cierra [#943](https://github.com/HKUDS/Vibe-Trading/issues/943)); `quantlib` alcanza 286 funciones probadas ([#1159](https://github.com/HKUDS/Vibe-Trading/pull/1159)–[#1168](https://github.com/HKUDS/Vibe-Trading/pull/1168)). ¡Gracias [@wiliao](https://github.com/wiliao), [@cgycorey](https://github.com/cgycorey), [@he-yufeng](https://github.com/he-yufeng), [@BigFishEmily](https://github.com/BigFishEmily), [@santhreal](https://github.com/santhreal), [@SiMinus](https://github.com/SiMinus) y [@alinv0](https://github.com/alinv0)!
- **2026-08-20** 🚀 **Se lanza v0.1.14** ([Notas de la versión](https://github.com/HKUDS/Vibe-Trading/releases/tag/v0.1.14), `pip install -U vibe-trading-ai`): 272 commits y 74 pull requests fusionados desde 0.1.13. **El titular es que un backtest terminado ya es algo que se puede leer, y no una carpeta de CSV.** Run Detail gana cuatro pestañas — **Investigación de factores** (serie diaria de IC con su línea media, estadísticas de IC, curvas de equity por quintiles y una matriz de correlación de IC que no existía en ninguna parte), **Posiciones** (tarta/treemap de pesos con deslizador de fechas, barras de exposición neta por sector y área de evolución de pesos — la tarta es composición **bruta** y las barras son **netas**, así que un par largo/corto en un mismo sector se anula en las barras mientras ambas patas siguen visibles en la tarta), **Tearsheet** (mapa de calor de rentabilidades mensuales, barras anuales y las 5 mayores caídas anotadas sobre la curva de equity) y un **panel de investigación** interactivo con KPIs, equity relativa al índice, Sharpe móvil y el libro de operaciones completo. Las cuatro leen artefactos que la ejecución ya escribe: ninguna canalización de datos nueva. La nueva página **Options Lab** añade un diagrama de pagos al vencimiento, una matriz de escenarios spot×IV, las griegas de la cartera y una cadena de opciones en vivo, calculadas con el mismo motor fijado por tests que usan las herramientas MCP. **Instalación:** los Mac Intel vuelven a poder hacer `pip install vibe-trading-ai` — `smartmoneyconcepts` arrastraba `llvmlite`, que desde 0.46 no publica wheel para macOS x86_64, de modo que toda instalación en Intel se convertía en una compilación desde fuente con CMake; ahora es el extra opcional `[smc]` y el tope obsoleto `<3.14` desaparece ([#1035](https://github.com/HKUDS/Vibe-Trading/discussions/1035)). **Novedades:** **descubrimiento de estrategias con puerta de evidencia** sobre el Alpha Zoo y el almacén SDM, con ruta de población, frescura calculada en lectura (`fresh`/`aging`/`stale`) y filas obsoletas que salen fail-closed de las recomendaciones por defecto; investigación programada que **se entrega sola** a través de una bandeja de salida con lease y que persiste el veredicto de cada monitor para la lista de Market Watch; siete endpoints de solo lectura de **Futu**; **Vietnam (HOSE)** como mercado de backtest; **conciliación de cuenta USD-M** offline; los proveedores **Novita AI** y **GitHub Copilot**; una fuente de datos **MetaTrader 5** alojada; los idiomas **español** y **alemán**; y MCP crece a 74 herramientas. **Corrección de errores:** la suite de tests dejó de escaparse hacia tu raíz de configuración real, donde cada ejecución completa venía añadiendo registros `order_rejected` sintéticos al libro de auditoría encadenado por hash; `build_registry()` ya no devuelve en silencio una lista de herramientas incompleta; `xirr` sobrevive al subdesbordamiento del descuento a largo plazo y el DCF rechaza entradas no finitas en lugar de devolver un valor por acción negativo; los símbolos `.VN` dejaron de ejecutarse bajo reglas de acciones A chinas; el archivo de backtest dejó de mezclar los artefactos de dos ejecuciones; y una amplia pasada de grounding terminó con una clase de rechazos falsos sobre fechas, listas ordenadas, constantes de identidad en fórmulas de tasas y líneas de orden leídas como cotizaciones. Gracias @Shizoqua, @shadowinlife, @pengpengyi92, @cgycorey, @ofeksh-tr, @lorenzozanee, @AndyLongest, @zzz607, @wiliao, @jay79-boop, @Robin1987China, @Echoandelementwebsites, @zhiwuyazhe-fjr, @x-lambda, @sykuang, @straun-repo, @nstavros, @ngoanpv, @miguelangelo78, @lukiod, @jax-novita, @honginp, @he-yufeng, @fixXxerTech, @er-s-an, @daviddaco1, @birdxs, @QCYTSN, @549236606-oss y @1psconstructor.
<details>
@@ -335,6 +335,29 @@ vibe-trading run -p "Analyze my trading behavior, extract my shadow strategy, an
---
+## 💼 Cartera Local Multi-Broker
+
+La Web UI añade una página **Cartera** de solo lectura que agrega las posiciones de las conexiones de broker que elijas. Las fuentes son instancias de conexión de perfiles de solo lectura que declaran `account.read` y `positions.read` — configúralas en **Conectores de Broker** dentro de [Detailed Capabilities](#-detailed-capabilities). El perfil MCP oficial de IBKR aún no puede usarse como fuente.
+
+| Comportamiento | Qué obtienes |
+|----------------|--------------|
+| **Procedencia por fuente** | Cada posición indica de qué conexión proviene, valorada en USD con conversión a CNY. |
+| **Fuentes fallidas excluidas** | Una fuente que falla se reporta como error y queda fuera de los totales — nunca se arrastra el valor anterior — y la instantánea se marca como incompleta. |
+| **Instantáneas inmutables** | Cada actualización se guarda en `~/.vibe-trading/portfolio/portfolio.sqlite3`; los ajustes sin credenciales viven en `~/.vibe-trading/portfolio.json` y `connections.json`. |
+| **Exportación y análisis** | Exportación CSV, más una herramienta de agente `portfolio_summary` saneada cuyos `risk_xray_args` se pasan directamente a `portfolio_risk_xray`. La misma instantánea se imprime en la terminal con `vibe-trading portfolio show` (también `refresh` / `sources`). |
+
+Los conectores de solo lectura que instales tú permanecen fuera del checkout, en `~/.vibe-trading/connectors/<name>/`: un manifiesto `connector.json` más un `adapter.py` que implemente `check_status` / `get_account_snapshot` / `get_positions`. Un manifiesto que declare cualquier capacidad de escritura es rechazado.
+
+```bash
+vibe-trading connector init my-broker --destination /tmp
+vibe-trading connector validate /tmp/my-broker
+vibe-trading connector install /tmp/my-broker
+```
+
+Sus credenciales van al llavero del sistema operativo (macOS Keychain, Windows Credential Manager, Linux Secret Service) con `pip install "vibe-trading-ai[keyring]"`, nunca a los archivos de configuración. Nada en esta ruta puede enviar ni cancelar una orden.
+
+---
+
## 🧪 Research Workflow
La mayoría de las ejecuciones siguen la misma ruta de evidencia: enrutar la solicitud, cargar el contexto de mercado correcto, ejecutar herramientas, validar resultados y mantener los artefactos inspeccionables.
@@ -1668,7 +1691,7 @@ Vibe-Trading/
│ │ ├── memory/ # Memoria persistente entre sesiones
│ │ │ └── persistent.py # memoria basada en archivos (~/.vibe-trading/memory/)
│ │ │
-│ │ ├── tools/ # 97 herramientas de agente autodescubiertas
+│ │ ├── tools/ # 106 herramientas de agente autodescubiertas
│ │ │ ├── backtest_tool.py # ejecuta backtests
│ │ │ ├── remember_tool.py # memoria entre sesiones (save/recall/forget)
│ │ │ ├── skill_writer_tool.py # CRUD de skills (save/patch/delete/file)
diff --git a/README_ja.md b/README_ja.md
index a3ba4ee09..2de705251 100644
--- a/README_ja.md
+++ b/README_ja.md
@@ -52,7 +52,7 @@
> ⚠️ **セキュリティ警告:** Xアカウント `VibeTrading_HKU`、Virtualsプロジェクト `101845`、およびトークンコントラクト `0x640BDBF77b6447E8b7DB7894cED84BD1c40571f4` は、いずれもVibe-Trading公式のものではありません。Vibe-Tradingはこれまで、いかなるトークンやミームコインも発行・公認していません。購入、ウォレットの接続、署名は行わないでください。[詳細](SECURITY.md#official-channels--impersonation)
-- **2026-08-22** 🧮 **ファクターのリターンがギャップをまたいで価格を捏造しなくなりました**:Alpha Zoo の 13 ファクターが素の `pct_change()` でリターン系列を計算していたため、欠損終値を前方補完してから差分を取り、上場廃止・共有されない休場日・ベンダー障害が有限の「0% リターン」となってランキングに情報として扱われていました。ギャップは `NaN` のまま保たれ、zoo の他の部分が既に従っていた方針に揃いました([#1172](https://github.com/HKUDS/Vibe-Trading/pull/1172))。**修正:** 同一の http/sse サーバー上の無関係な MCP クライアントが単一のフォールバック研究ゴールセッションを共有し、あるクライアントの `start_research_goal` が別のクライアントのものを置き換え得ました——FastMCP の接続ごとの session id で区別します([#1173](https://github.com/HKUDS/Vibe-Trading/pull/1173))。メモリの GC と圧縮が古い FTS 行と孤立した relation サイドカーを残していました([#1174](https://github.com/HKUDS/Vibe-Trading/pull/1174))。`cancel_run()` がストリーミング中の swarm worker に届かず、キャンセル報告後もツール呼び出しを続けていました——ストリームを中断し、そのターンのツール呼び出しをスキップし、失敗ではなく*キャンセル済み*タスクとして記録します([#1175](https://github.com/HKUDS/Vibe-Trading/pull/1175))。MCP `get_research_reports` が `beginTime`/`endTime` を入口で落としていました([#1176](https://github.com/HKUDS/Vibe-Trading/pull/1176))。`get_options_chain` が別サイクルの満期に `ok: true` と他の日付の契約を返していました——明示した満期は返却されたチェーンと照合されます([#1177](https://github.com/HKUDS/Vibe-Trading/pull/1177))。貢献に感謝します:[@Shizoqua](https://github.com/Shizoqua)、[@cgycorey](https://github.com/cgycorey)。
+- **2026-08-22** 🧮 **ファクターのリターンがギャップをまたいで価格を捏造しなくなりました**:Alpha Zoo の 13 ファクターが素の `pct_change()` でリターン系列を計算していたため、欠損終値を前方補完してから差分を取り、上場廃止・共有されない休場日・ベンダー障害が有限の「0% リターン」となってランキングに情報として扱われていました。ギャップは `NaN` のまま保たれ、zoo の他の部分が既に従っていた方針に揃いました([#1172](https://github.com/HKUDS/Vibe-Trading/pull/1172))。**修正:** 同一の http/sse サーバー上の無関係な MCP クライアントが単一のフォールバック研究ゴールセッションを共有し、あるクライアントの `start_research_goal` が別のクライアントのものを置き換え得ました——FastMCP の接続ごとの session id で区別します([#1173](https://github.com/HKUDS/Vibe-Trading/pull/1173))。メモリの GC と圧縮が古い FTS 行と孤立した relation サイドカーを残していました([#1174](https://github.com/HKUDS/Vibe-Trading/pull/1174))。`cancel_run()` がストリーミング中の swarm worker に届かず、キャンセル報告後もツール呼び出しを続けていました——ストリームを中断し、そのターンのツール呼び出しをスキップし、失敗ではなく*キャンセル済み*タスクとして記録します([#1175](https://github.com/HKUDS/Vibe-Trading/pull/1175))。MCP `get_research_reports` が `beginTime`/`endTime` を入口で落としていました([#1176](https://github.com/HKUDS/Vibe-Trading/pull/1176))。`get_options_chain` が別サイクルの満期に `ok: true` と他の日付の契約を返していました——明示した満期は返却されたチェーンと照合されます([#1177](https://github.com/HKUDS/Vibe-Trading/pull/1177))。**新機能:** 読み取り専用の **Portfolio** ページが、読み取り専用のブローカー接続を横断して保有をまとめます——ソースごとの出所、不変スナップショット、失敗したソースは引き継がずに除外、CSV エクスポート、そして `portfolio_risk_xray` にそのまま渡せる `portfolio_summary` ツール([#1072](https://github.com/HKUDS/Vibe-Trading/pull/1072))。貢献に感謝します:[@Shizoqua](https://github.com/Shizoqua)、[@cgycorey](https://github.com/cgycorey)、[@goatyyc](https://github.com/goatyyc)。
- **2026-08-21** ⏱️ **永久に固まる実行**:`bash` のタイムアウトは shell だけを kill し、パイプハンドルを持つ孫プロセスが生き残るため、実行は 20 分以上「実行中」のままでした。現在は専用プロセスグループで起動してツリー全体を kill し、新しいストール監視が前進のない実行を終了させ、圧縮もモデル自身の検証記録を捨てなくなりました([#1169](https://github.com/HKUDS/Vibe-Trading/pull/1169))。**修正:** 複数年の Tencent 履歴が 500 本で暗黙に切り詰められていました([#1154](https://github.com/HKUDS/Vibe-Trading/pull/1154))。**新機能:** swarm 実行は失敗サブグラフのみを再生([#1158](https://github.com/HKUDS/Vibe-Trading/pull/1158)、[#1157](https://github.com/HKUDS/Vibe-Trading/issues/1157) をクローズ)。Market Watch は各モニターの最新判定を一覧内に表示([#1156](https://github.com/HKUDS/Vibe-Trading/pull/1156)、[#943](https://github.com/HKUDS/Vibe-Trading/issues/943) をクローズ)。`quantlib` はテスト済み 286 関数に到達([#1159](https://github.com/HKUDS/Vibe-Trading/pull/1159)–[#1168](https://github.com/HKUDS/Vibe-Trading/pull/1168))。貢献に感謝します:[@wiliao](https://github.com/wiliao)、[@cgycorey](https://github.com/cgycorey)、[@he-yufeng](https://github.com/he-yufeng)、[@BigFishEmily](https://github.com/BigFishEmily)、[@santhreal](https://github.com/santhreal)、[@SiMinus](https://github.com/SiMinus)、[@alinv0](https://github.com/alinv0)。
- **2026-08-20** 🚀 **v0.1.14 リリース**([リリースノート](https://github.com/HKUDS/Vibe-Trading/releases/tag/v0.1.14)、`pip install -U vibe-trading-ai`):0.1.13 以降 272 コミット・74 件のマージ済み PR。**主役は、終わったバックテストが CSV の山ではなく「読めるもの」になったことです。** Run Detail に 4 つのタブが増えました——**ファクター研究**(平均線付きの日次 IC 系列、IC 統計、分位ポートフォリオの資産曲線、そしてこれまでどこにも無かった IC 相関行列)、**ポジション構成**(日付スライダー付きのウェイト円/ツリーマップ、業種別ネットエクスポージャー、ウェイト推移の面グラフ。円は**グロス**構成、バーは**ネット**なので、同一業種のロング/ショートはバーでは相殺されて 0 になり、円では両脚とも見えたままです)、**ティアシート**(月次リターンのヒートマップ、年次バー、上位 5 ドローダウンを資産曲線に重ねて表示)、そして KPI・ベンチマーク対比の資産推移・ローリングシャープ・全約定台帳を備えた対話型**リサーチダッシュボード**。4 つとも実行が既に書き出している artifact を読むだけで、新しいデータパイプラインはありません。新しい **Options Lab** ページでは満期損益図、原資産×IV のシナリオ行列、ポートフォリオのグリークス、ライブのオプションチェーンを、MCP ツールと同じテストで固定されたエンジンで計算します。**インストール:** Intel Mac で再び `pip install vibe-trading-ai` が通ります——`smartmoneyconcepts` が `llvmlite` を引き込み、後者は 0.46 以降 macOS x86_64 wheel を出していないため、Intel でのインストールは毎回 CMake を要するソースビルドになっていました。これをオプトインの `[smc]` extra に移し、古い `<3.14` 上限も外しました([#1035](https://github.com/HKUDS/Vibe-Trading/discussions/1035))。**新機能:** Alpha Zoo と SDM ストアをまたぐ**エビデンス・ゲート付きストラテジー探索**(投入経路、読み取り時に算出する鮮度 `fresh`/`aging`/`stale`、陳腐化した行は既定の推奨から fail-closed で除外)、リース付き outbox で**自分から配信する**スケジュール調査と Market Watch 一覧向けに永続化される判定、7 つの読み取り専用 **Futu** エンドポイント、バックテスト市場としての**ベトナム(HOSE)**、オフラインの **USD-M 口座照合**、**Novita AI** と **GitHub Copilot** のプロバイダ、ホスト型 **MetaTrader 5** データソース、**スペイン語**と**ドイツ語**のロケール、そして MCP ツールは 74 個に。**正確性:** テストスイートがサンドボックスを抜け出して実際の設定ルートに書き込むことがなくなりました——以前はフル実行のたびにハッシュ連鎖の実口座監査台帳へ偽の `order_rejected` が追記されていました。`build_registry()` は欠けたツール表を黙って返しません。`xirr` は長期ホライズンの割引アンダーフローに耐え、DCF は非有限入力を負の株価で返さず拒否します。`.VN` 銘柄が A 株ルールで約定されることもなくなり、バックテストのアーカイブが 2 つの実行の成果物を混ぜることもなくなりました。さらに grounding の一連の修正で、日付・順序付きリスト・レート式中の恒等定数・見積りと誤読された注文行という誤拒否の一群が解消しました。@Shizoqua、@shadowinlife、@pengpengyi92、@cgycorey、@ofeksh-tr、@lorenzozanee、@AndyLongest、@zzz607、@wiliao、@jay79-boop、@Robin1987China、@Echoandelementwebsites、@zhiwuyazhe-fjr、@x-lambda、@sykuang、@straun-repo、@nstavros、@ngoanpv、@miguelangelo78、@lukiod、@jax-novita、@honginp、@he-yufeng、@fixXxerTech、@er-s-an、@daviddaco1、@birdxs、@QCYTSN、@549236606-oss、@1psconstructor の皆さんに感謝します。
<details>
@@ -336,6 +336,29 @@ vibe-trading run -p "Analyze my trading behavior, extract my shadow strategy, an
---
+## 💼 ローカル・マルチブローカー Portfolio
+
+Web UI に、選んだブローカー接続の保有を横断してまとめる読み取り専用の **Portfolio** ページが加わりました。データソースは `account.read` と `positions.read` を宣言する読み取り専用 profile の接続インスタンスで、[詳細な機能](#-詳細な機能) の **ブローカー connectors** で設定します。IBKR の公式 MCP profile はまだデータソースとして使えません。
+
+| 挙動 | 得られるもの |
+|------|--------------|
+| **ソースごとの出所** | すべての保有がどの接続由来かを示し、USD で評価して CNY 換算も表示します。 |
+| **失敗したソースは除外** | エラーになったソースはエラーとして報告され、合計から除外されます(前回値の引き継ぎはしません)。スナップショットは incomplete として記録されます。 |
+| **不変スナップショット** | 各 refresh は `~/.vibe-trading/portfolio/portfolio.sqlite3` に保存され、認証情報を含まない設定は `~/.vibe-trading/portfolio.json` と `connections.json` に置かれます。 |
+| **エクスポートと分析** | CSV エクスポートに加え、サニタイズ済みの `portfolio_summary` エージェントツールを提供します。その `risk_xray_args` はそのまま `portfolio_risk_xray` に渡せます。同じスナップショットは `vibe-trading portfolio show` でターミナルにも表示できます(`refresh` / `sources` も同様)。 |
+
+自分でインストールする読み取り専用 connector は checkout の外、`~/.vibe-trading/connectors/<name>/` に置かれます。`connector.json` manifest と、`check_status` / `get_account_snapshot` / `get_positions` を実装する `adapter.py` だけです。書き込み系の capability を宣言した manifest は拒否されます。
+
+```bash
+vibe-trading connector init my-broker --destination /tmp
+vibe-trading connector validate /tmp/my-broker
+vibe-trading connector install /tmp/my-broker
+```
+
+認証情報は `pip install "vibe-trading-ai[keyring]"` により OS の keyring(macOS Keychain、Windows Credential Manager、Linux Secret Service)へ保存され、設定ファイルには入りません。この経路からは注文の発注も取消もできません。
+
+---
+
## 🧪 リサーチワークフロー
多くの実行は、同じ evidence path をたどります。リクエストを routing し、適切な市場文脈を読み込み、ツールを実行し、出力を検証し、artifacts を確認可能な形で残します。
@@ -1588,7 +1611,7 @@ Vibe-Trading/
│ │ ├── memory/ # クロスセッション永続メモリ
│ │ │ └── persistent.py # ファイルベースメモリ (~/.vibe-trading/memory/)
│ │ │
-│ │ ├── tools/ # 97 個の自動検出エージェントツール
+│ │ ├── tools/ # 106 個の自動検出エージェントツール
│ │ │ ├── backtest_tool.py # バックテスト実行
│ │ │ ├── remember_tool.py # クロスセッションメモリ (save/recall/forget)
│ │ │ ├── skill_writer_tool.py # skill CRUD (save/patch/delete/file)
diff --git a/README_ko.md b/README_ko.md
index b03906e3d..12a03d23f 100644
--- a/README_ko.md
+++ b/README_ko.md
@@ -52,7 +52,7 @@
> ⚠️ **보안 경고:** X 계정 `VibeTrading_HKU`, Virtuals 프로젝트 `101845`, 토큰 컨트랙트 `0x640BDBF77b6447E8b7DB7894cED84BD1c40571f4`는 모두 Vibe-Trading 공식과 무관합니다. Vibe-Trading은 어떠한 토큰이나 밈코인도 발행하거나 공식적으로 지지한 적이 없습니다. 해당 토큰을 구매하거나 지갑을 연결하거나 어떠한 서명도 하지 마세요. [자세히 보기](SECURITY.md#official-channels--impersonation).
-- **2026-08-22** 🧮 **팩터 수익률이 더 이상 결측 구간에서 가격을 지어내지 않습니다**: Alpha Zoo 팩터 13개가 맨 `pct_change()`로 수익률 시계열을 계산해 결측 종가를 먼저 앞으로 채운 뒤 차분했기 때문에, 상장폐지·공유되지 않는 휴장일·벤더 장애가 유한한 "0% 수익률"이 되어 랭킹에서 정보로 취급됐습니다. 이제 결측은 `NaN`으로 남아 zoo의 나머지가 이미 따르던 정책과 같아졌습니다([#1172](https://github.com/HKUDS/Vibe-Trading/pull/1172)). **수정:** 같은 http/sse 서버의 서로 무관한 MCP 클라이언트가 하나의 폴백 연구 목표 세션을 공유해 한 클라이언트의 `start_research_goal`이 다른 클라이언트의 것을 덮어쓸 수 있었습니다—이제 FastMCP의 연결별 session id로 구분합니다([#1173](https://github.com/HKUDS/Vibe-Trading/pull/1173)). 메모리 GC와 압축이 오래된 FTS 행과 고아 relation 사이드카를 남겼습니다([#1174](https://github.com/HKUDS/Vibe-Trading/pull/1174)). `cancel_run()`이 스트리밍 중인 swarm worker에 닿지 않아 취소로 보고된 뒤에도 도구 호출을 계속했습니다—이제 스트림을 중단하고 그 턴의 도구 호출을 건너뛰며 실패가 아닌 *취소됨* 태스크로 기록됩니다([#1175](https://github.com/HKUDS/Vibe-Trading/pull/1175)). MCP `get_research_reports`가 입구에서 `beginTime`/`endTime`을 버렸습니다([#1176](https://github.com/HKUDS/Vibe-Trading/pull/1176)). `get_options_chain`이 다른 주기의 만기에 `ok: true`와 다른 날짜의 계약을 돌려줬습니다—명시한 만기는 반환된 체인과 대조해 검증합니다([#1177](https://github.com/HKUDS/Vibe-Trading/pull/1177)). 기여해 주신 [@Shizoqua](https://github.com/Shizoqua), [@cgycorey](https://github.com/cgycorey)에게 감사드립니다.
+- **2026-08-22** 🧮 **팩터 수익률이 더 이상 결측 구간에서 가격을 지어내지 않습니다**: Alpha Zoo 팩터 13개가 맨 `pct_change()`로 수익률 시계열을 계산해 결측 종가를 먼저 앞으로 채운 뒤 차분했기 때문에, 상장폐지·공유되지 않는 휴장일·벤더 장애가 유한한 "0% 수익률"이 되어 랭킹에서 정보로 취급됐습니다. 이제 결측은 `NaN`으로 남아 zoo의 나머지가 이미 따르던 정책과 같아졌습니다([#1172](https://github.com/HKUDS/Vibe-Trading/pull/1172)). **수정:** 같은 http/sse 서버의 서로 무관한 MCP 클라이언트가 하나의 폴백 연구 목표 세션을 공유해 한 클라이언트의 `start_research_goal`이 다른 클라이언트의 것을 덮어쓸 수 있었습니다—이제 FastMCP의 연결별 session id로 구분합니다([#1173](https://github.com/HKUDS/Vibe-Trading/pull/1173)). 메모리 GC와 압축이 오래된 FTS 행과 고아 relation 사이드카를 남겼습니다([#1174](https://github.com/HKUDS/Vibe-Trading/pull/1174)). `cancel_run()`이 스트리밍 중인 swarm worker에 닿지 않아 취소로 보고된 뒤에도 도구 호출을 계속했습니다—이제 스트림을 중단하고 그 턴의 도구 호출을 건너뛰며 실패가 아닌 *취소됨* 태스크로 기록됩니다([#1175](https://github.com/HKUDS/Vibe-Trading/pull/1175)). MCP `get_research_reports`가 입구에서 `beginTime`/`endTime`을 버렸습니다([#1176](https://github.com/HKUDS/Vibe-Trading/pull/1176)). `get_options_chain`이 다른 주기의 만기에 `ok: true`와 다른 날짜의 계약을 돌려줬습니다—명시한 만기는 반환된 체인과 대조해 검증합니다([#1177](https://github.com/HKUDS/Vibe-Trading/pull/1177)). **신규:** 읽기 전용 **포트폴리오** 페이지가 읽기 전용 브로커 연결의 보유 종목을 한데 모읍니다 — 소스별 출처, 불변 스냅샷, 실패한 소스는 이어 쓰지 않고 제외, CSV 내보내기, 그리고 `portfolio_risk_xray`로 바로 넘길 수 있는 `portfolio_summary` 도구([#1072](https://github.com/HKUDS/Vibe-Trading/pull/1072)). 기여해 주신 [@Shizoqua](https://github.com/Shizoqua), [@cgycorey](https://github.com/cgycorey), [@goatyyc](https://github.com/goatyyc)에게 감사드립니다.
- **2026-08-21** ⏱️ **영원히 멈춰 있던 실행**: `bash` 타임아웃이 shell만 종료하고 파이프 핸들을 쥔 손자 프로세스는 살아남아, 실행은 20분 넘게 "실행 중"이었습니다. 이제 전용 프로세스 그룹에서 시작해 트리 전체를 종료하고, 정체 감시자가 진전 없는 실행을 끝내며, 압축도 모델 자신의 검증 기록을 버리지 않습니다([#1169](https://github.com/HKUDS/Vibe-Trading/pull/1169)). **수정:** Tencent의 다년 히스토리가 500봉에서 조용히 잘렸습니다([#1154](https://github.com/HKUDS/Vibe-Trading/pull/1154)). **신규:** swarm 실행은 실패한 하위 그래프만 재생합니다([#1158](https://github.com/HKUDS/Vibe-Trading/pull/1158), [#1157](https://github.com/HKUDS/Vibe-Trading/issues/1157) 종료). Market Watch는 각 모니터의 최신 판정을 목록에 표시합니다([#1156](https://github.com/HKUDS/Vibe-Trading/pull/1156), [#943](https://github.com/HKUDS/Vibe-Trading/issues/943) 종료). `quantlib`는 테스트된 286개 함수에 도달했습니다([#1159](https://github.com/HKUDS/Vibe-Trading/pull/1159)–[#1168](https://github.com/HKUDS/Vibe-Trading/pull/1168)). 기여해 주신 [@wiliao](https://github.com/wiliao), [@cgycorey](https://github.com/cgycorey), [@he-yufeng](https://github.com/he-yufeng), [@BigFishEmily](https://github.com/BigFishEmily), [@santhreal](https://github.com/santhreal), [@SiMinus](https://github.com/SiMinus), [@alinv0](https://github.com/alinv0)에게 감사드립니다.
- **2026-08-20** 🚀 **v0.1.14 릴리스**([릴리스 노트](https://github.com/HKUDS/Vibe-Trading/releases/tag/v0.1.14), `pip install -U vibe-trading-ai`): 0.1.13 이후 272개 커밋, 74개 병합 PR. **주인공은 끝난 백테스트가 CSV 더미가 아니라 읽을 수 있는 결과물이 되었다는 점입니다.** Run Detail에 탭 네 개가 추가됐습니다 — **팩터 리서치**(평균선이 있는 일별 IC 시계열, IC 통계, 분위 그룹 자산곡선, 그리고 지금까지 어디에도 없던 IC 상관행렬), **포지션 구조**(날짜 슬라이더가 달린 비중 파이/트리맵, 업종별 순익스포저 막대, 비중 변화 영역 차트 — 파이는 **총액** 구성이고 막대는 **순액**이라, 같은 업종의 롱/숏 쌍은 막대에서 0으로 상쇄되지만 파이에서는 두 다리가 모두 보입니다), **티어시트**(월별 수익률 히트맵, 연간 막대, 자산곡선 위에 표시한 상위 5개 낙폭), 그리고 KPI·벤치마크 대비 자산추이·롤링 샤프·전체 체결 원장을 담은 대화형 **리서치 대시보드**. 네 가지 모두 실행이 이미 기록하는 artifact를 읽을 뿐, 새 데이터 파이프라인은 없습니다. 새 **Options Lab** 페이지는 만기 손익도, 현물×IV 시나리오 행렬, 포트폴리오 그릭스, 실시간 옵션 체인을 MCP 도구와 동일한, 테스트로 고정된 엔진으로 계산합니다. **설치:** Intel Mac에서 다시 `pip install vibe-trading-ai`가 됩니다 — `smartmoneyconcepts`가 `llvmlite`를 끌어오는데, 후자는 0.46부터 macOS x86_64 wheel을 내지 않아 Intel 설치가 매번 CMake가 필요한 소스 빌드로 바뀌었습니다. 이제 선택형 `[smc]` extra로 옮겼고 낡은 `<3.14` 상한도 없앴습니다([#1035](https://github.com/HKUDS/Vibe-Trading/discussions/1035)). **신규:** Alpha Zoo와 SDM 저장소를 아우르는 **근거 게이트 전략 탐색**(적재 경로, 읽는 시점에 계산되는 신선도 `fresh`/`aging`/`stale`, 오래된 행은 기본 추천에서 fail-closed로 제외), 리스가 걸린 outbox로 **스스로 전달하는** 예약 리서치와 Market Watch 목록용으로 저장되는 판정, 읽기 전용 **Futu** 엔드포인트 7종, 백테스트 시장으로서의 **베트남(HOSE)**, 오프라인 **USD-M 계좌 대사**, **Novita AI**·**GitHub Copilot** 프로바이더, 호스팅형 **MetaTrader 5** 데이터 소스, **스페인어**·**독일어** 로케일, 그리고 74개로 늘어난 MCP 도구. **정확성:** 테스트 스위트가 샌드박스를 벗어나 실제 설정 루트에 쓰는 일이 없어졌습니다 — 이전에는 전체 실행 때마다 해시 체인 실계좌 감사 원장에 가짜 `order_rejected`가 덧붙었습니다. `build_registry()`는 빠진 도구 목록을 조용히 반환하지 않습니다. `xirr`는 장기 할인 언더플로를 견디고, DCF는 비유한 입력에 음수 주가 대신 거부로 응답합니다. `.VN` 종목이 A주 규칙으로 체결되지 않으며, 백테스트 아카이브가 두 실행의 산출물을 섞지 않습니다. 또한 일련의 grounding 수정으로 날짜, 순서 목록, 요율 수식 속 항등 상수, 호가로 오독된 주문 라인에서 비롯된 오거부가 정리됐습니다. @Shizoqua, @shadowinlife, @pengpengyi92, @cgycorey, @ofeksh-tr, @lorenzozanee, @AndyLongest, @zzz607, @wiliao, @jay79-boop, @Robin1987China, @Echoandelementwebsites, @zhiwuyazhe-fjr, @x-lambda, @sykuang, @straun-repo, @nstavros, @ngoanpv, @miguelangelo78, @lukiod, @jax-novita, @honginp, @he-yufeng, @fixXxerTech, @er-s-an, @daviddaco1, @birdxs, @QCYTSN, @549236606-oss, @1psconstructor 님께 감사드립니다.
<details>
@@ -336,6 +336,29 @@ vibe-trading run -p "Analyze my trading behavior, extract my shadow strategy, an
---
+## 💼 로컬 멀티 브로커 포트폴리오
+
+Web UI에 선택한 브로커 연결의 보유 종목을 한데 모아 보여주는 읽기 전용 **포트폴리오** 페이지가 추가됐습니다. 소스는 `account.read`와 `positions.read`를 선언한 읽기 전용 profile의 연결 인스턴스이며, [상세 기능](#-상세-기능)의 **브로커 커넥터**에서 설정합니다. IBKR 공식 MCP profile은 아직 소스로 사용할 수 없습니다.
+
+| 동작 | 제공되는 것 |
+|------|-------------|
+| **소스별 출처** | 모든 보유 종목이 어느 연결에서 왔는지 표시하고, USD로 평가한 뒤 CNY 환산도 함께 보여줍니다. |
+| **실패한 소스 제외** | 오류가 난 소스는 오류로 보고되고 합계에서 제외됩니다 — 직전 값을 이어 쓰지 않으며, 스냅샷은 incomplete로 표시됩니다. |
+| **불변 스냅샷** | 각 새로고침은 `~/.vibe-trading/portfolio/portfolio.sqlite3`에 저장되고, 자격증명이 없는 설정은 `~/.vibe-trading/portfolio.json`과 `connections.json`에 남습니다. |
+| **내보내기 & 분석** | CSV 내보내기와 함께, 민감정보를 제거한 `portfolio_summary` 에이전트 도구를 제공합니다. 그 `risk_xray_args`는 `portfolio_risk_xray`에 그대로 넘길 수 있습니다. 같은 스냅샷을 터미널에서는 `vibe-trading portfolio show`로 볼 수 있습니다(`refresh` / `sources`도 제공). |
+
+직접 설치하는 읽기 전용 커넥터는 체크아웃 밖 `~/.vibe-trading/connectors/<name>/`에 있습니다. `connector.json` manifest와 `check_status` / `get_account_snapshot` / `get_positions`를 구현한 `adapter.py`만 있으면 됩니다. 쓰기 capability를 선언한 manifest는 거부됩니다.
+
+```bash
+vibe-trading connector init my-broker --destination /tmp
+vibe-trading connector validate /tmp/my-broker
+vibe-trading connector install /tmp/my-broker
+```
+
+자격증명은 `pip install "vibe-trading-ai[keyring]"`를 통해 OS 키링(macOS Keychain, Windows Credential Manager, Linux Secret Service)에 저장되며 설정 파일에는 들어가지 않습니다. 이 경로의 어떤 것도 주문을 내거나 취소할 수 없습니다.
+
+---
+
## 🧪 리서치 워크플로
대부분의 실행은 같은 evidence path를 따릅니다. 요청을 라우팅하고, 적절한 시장 컨텍스트를 로드하고, 도구를 실행하고, 출력을 검증하며, artifacts를 점검 가능한 상태로 유지합니다.
@@ -1585,7 +1608,7 @@ Vibe-Trading/
│ │ ├── memory/ # Cross-session persistent memory
│ │ │ └── persistent.py # file-based memory (~/.vibe-trading/memory/)
│ │ │
-│ │ ├── tools/ # 97 auto-discovered agent tools
+│ │ ├── tools/ # 106 auto-discovered agent tools
│ │ │ ├── backtest_tool.py # run backtests
│ │ │ ├── remember_tool.py # cross-session memory (save/recall/forget)
│ │ │ ├── skill_writer_tool.py # skill CRUD (save/patch/delete/file)
diff --git a/README_zh.md b/README_zh.md
index 4388d539d..4bffba6c5 100644
--- a/README_zh.md
+++ b/README_zh.md
@@ -52,7 +52,7 @@
> ⚠️ **安全警告:** X 账号 `VibeTrading_HKU`、Virtuals 项目 `101845` 及代币合约 `0x640BDBF77b6447E8b7DB7894cED84BD1c40571f4` 均非 Vibe-Trading 官方。我们从未发行或背书任何代币或 meme 币。请勿购买、连接钱包或签名。[详细说明](SECURITY.md#official-channels--impersonation)。
-- **2026-08-22** 🧮 **因子收益不再跨缺口编造价格**:13 个 Alpha Zoo 因子用裸 `pct_change()` 计算收益序列,它会先前向填充缺失的收盘价再作差——退市、未共享的假日、数据商中断都变成一个有限的「0% 收益」,排序把它当成了信息。现在缺口保持 `NaN`,与 zoo 其余部分早已遵循的策略一致([#1172](https://github.com/HKUDS/Vibe-Trading/pull/1172))。**修复:** 同一 http/sse 服务器上互不相关的 MCP 客户端共用一个兜底研究目标会话,一个客户端的 `start_research_goal` 会顶掉另一个的——现在按 FastMCP 的每连接 session id 区分([#1173](https://github.com/HKUDS/Vibe-Trading/pull/1173));记忆垃圾回收与压缩遗留过期的 FTS 行和孤儿关系 sidecar([#1174](https://github.com/HKUDS/Vibe-Trading/pull/1174));`cancel_run()` 到不了正在流式输出的 swarm worker,运行已报告取消后它仍在派发工具调用——现在会打断流、跳过该轮的工具调用,并记为*已取消*而非失败的任务([#1175](https://github.com/HKUDS/Vibe-Trading/pull/1175));MCP `get_research_reports` 在入口丢掉了 `beginTime`/`endTime`([#1176](https://github.com/HKUDS/Vibe-Trading/pull/1176));`get_options_chain` 对错周期的到期日返回 `ok: true` 外加另一日期的合约——显式到期日现在会对照返回的链校验([#1177](https://github.com/HKUDS/Vibe-Trading/pull/1177))。感谢 [@Shizoqua](https://github.com/Shizoqua)、[@cgycorey](https://github.com/cgycorey)!
+- **2026-08-22** 🧮 **因子收益不再跨缺口编造价格**:13 个 Alpha Zoo 因子用裸 `pct_change()` 计算收益序列,它会先前向填充缺失的收盘价再作差——退市、未共享的假日、数据商中断都变成一个有限的「0% 收益」,排序把它当成了信息。现在缺口保持 `NaN`,与 zoo 其余部分早已遵循的策略一致([#1172](https://github.com/HKUDS/Vibe-Trading/pull/1172))。**修复:** 同一 http/sse 服务器上互不相关的 MCP 客户端共用一个兜底研究目标会话,一个客户端的 `start_research_goal` 会顶掉另一个的——现在按 FastMCP 的每连接 session id 区分([#1173](https://github.com/HKUDS/Vibe-Trading/pull/1173));记忆垃圾回收与压缩遗留过期的 FTS 行和孤儿关系 sidecar([#1174](https://github.com/HKUDS/Vibe-Trading/pull/1174));`cancel_run()` 到不了正在流式输出的 swarm worker,运行已报告取消后它仍在派发工具调用——现在会打断流、跳过该轮的工具调用,并记为*已取消*而非失败的任务([#1175](https://github.com/HKUDS/Vibe-Trading/pull/1175));MCP `get_research_reports` 在入口丢掉了 `beginTime`/`endTime`([#1176](https://github.com/HKUDS/Vibe-Trading/pull/1176));`get_options_chain` 对错周期的到期日返回 `ok: true` 外加另一日期的合约——显式到期日现在会对照返回的链校验([#1177](https://github.com/HKUDS/Vibe-Trading/pull/1177))。**新增:** 只读的 **持仓** 页面把你的只读券商连接汇总到一起——逐源出处、不可变快照、失败的源被排除而不是沿用旧值、CSV 导出,以及一个可以直接喂给 `portfolio_risk_xray` 的 `portfolio_summary` 工具([#1072](https://github.com/HKUDS/Vibe-Trading/pull/1072))。感谢 [@Shizoqua](https://github.com/Shizoqua)、[@cgycorey](https://github.com/cgycorey)、[@goatyyc](https://github.com/goatyyc)!
- **2026-08-21** ⏱️ **永远卡住的运行**:`bash` 超时只杀掉 shell,握着管道句柄的孙进程还活着,运行便「运行中」挂了 20 分钟以上。现在命令在独立进程组启动、超时杀掉整棵进程树,新增的停滞看门狗会终结毫无前进的运行,压缩也不再丢弃模型自己的验证记录([#1169](https://github.com/HKUDS/Vibe-Trading/pull/1169))。**修复:** 跨年的腾讯历史在 500 根 K 线处被静默截断([#1154](https://github.com/HKUDS/Vibe-Trading/pull/1154))。**新增:** swarm 运行只重放失败子图([#1158](https://github.com/HKUDS/Vibe-Trading/pull/1158),关闭 [#1157](https://github.com/HKUDS/Vibe-Trading/issues/1157));Market Watch 在列表内显示每个监控的最新结论([#1156](https://github.com/HKUDS/Vibe-Trading/pull/1156),关闭 [#943](https://github.com/HKUDS/Vibe-Trading/issues/943));`quantlib` 达到 286 个经测试函数([#1159](https://github.com/HKUDS/Vibe-Trading/pull/1159)–[#1168](https://github.com/HKUDS/Vibe-Trading/pull/1168))。感谢 [@wiliao](https://github.com/wiliao)、[@cgycorey](https://github.com/cgycorey)、[@he-yufeng](https://github.com/he-yufeng)、[@BigFishEmily](https://github.com/BigFishEmily)、[@santhreal](https://github.com/santhreal)、[@SiMinus](https://github.com/SiMinus)、[@alinv0](https://github.com/alinv0)!
- **2026-08-20** 🚀 **v0.1.14 发布**([Release notes](https://github.com/HKUDS/Vibe-Trading/releases/tag/v0.1.14),`pip install -U vibe-trading-ai`):自 0.1.13 以来 272 个 commit、74 个已合并 PR。**主角是:跑完的回测终于是可以读的东西,而不是一堆 CSV。** Run Detail 新增四个页签——**因子研究**(IC 序列与其均值线、IC 统计、分组净值,以及一个此前根本不存在的 IC 两两相关矩阵)、**持仓结构**(带日期滑块的权重饼图/树图、行业净敞口柱、权重演化面积图;饼图是**总额**构成而柱图是**净额**,所以同一行业里的多空对冲在柱图上抵为零、在饼图上两条腿都还看得见)、**Tearsheet**(月度收益热力图、年度柱状图、前 5 大回撤并标注在净值曲线上),以及一个带 KPI、基准相对净值、滚动 Sharpe 和完整成交流水的交互式**研究看板**。四者读的都是运行本就写出的 artifact——没有新增数据管线。新的 **Options Lab** 页面提供到期损益图、现价×IV 情景矩阵、组合希腊字母和实时期权链,算的是 MCP 工具同一套被测试钉死的引擎。**安装:** Intel Mac 又能 `pip install vibe-trading-ai` 了——`smartmoneyconcepts` 会拖进 `llvmlite`,而后者从 0.46 起不再提供 macOS x86_64 wheel,于是每一次 Intel 安装都变成需要 CMake 的源码构建;现在它改为可选的 `[smc]` extra,过期的 `<3.14` 上限也一并去掉([#1035](https://github.com/HKUDS/Vibe-Trading/discussions/1035))。**新增:** 跨 Alpha Zoo 与 SDM 库的**证据闸门策略发现**,带证据填充路径、读取时计算的新鲜度(`fresh`/`aging`/`stale`)以及陈旧行 fail-closed 退出默认推荐;排期研究现在会**自己投递**——经带租约的 outbox 送出,并把每个监控的判定持久化供 Market Watch 列表使用;七个只读 **Futu** 端点;**越南(HOSE)**成为回测市场;离线 **USD-M 账户对账**;**Novita AI** 与 **GitHub Copilot** 两个模型提供方;托管的 **MetaTrader 5** 数据源;**西班牙语**与**德语**界面;MCP 工具增至 74 个。**正确性:** 测试套件不再逃出沙箱写进你真实的配置根目录——此前跑一次全量会往那本哈希链式的实盘审计账本里追加伪造的 `order_rejected` 记录;`build_registry()` 不再静默返回一份残缺的工具表;`xirr` 扛得住长周期折现下溢,DCF 遇到非有限输入直接拒绝而不是返回一个负的每股价值;`.VN` 代码不再按 A 股规则撮合;回测归档不再把两次运行的产物混进同一个包;另有一轮 grounding 修复,终结了日期、有序列表、费率公式里的恒等常数以及被误读成报价的下单指令这几类误拒。感谢 @Shizoqua、@shadowinlife、@pengpengyi92、@cgycorey、@ofeksh-tr、@lorenzozanee、@AndyLongest、@zzz607、@wiliao、@jay79-boop、@Robin1987China、@Echoandelementwebsites、@zhiwuyazhe-fjr、@x-lambda、@sykuang、@straun-repo、@nstavros、@ngoanpv、@miguelangelo78、@lukiod、@jax-novita、@honginp、@he-yufeng、@fixXxerTech、@er-s-an、@daviddaco1、@birdxs、@QCYTSN、@549236606-oss 和 @1psconstructor。
<details>
@@ -337,47 +337,24 @@ vibe-trading run -p "Analyze my trading behavior, extract my shadow strategy, an
## 💼 本地多账户持仓
-Web UI 提供可编辑的只读 **持仓** 页面。点击“管理账户”,即可从仓库已有的只读连接 Profile 中添加、停用、重命名和排序账户,设置是否计入现金,并选择 USD 或 CNY 作为主要显示货币。新安装默认不选择任何账户。
+Web UI 新增只读的 **持仓** 页面,把你选中的券商连接的持仓汇总到一起。数据源是声明了 `account.read` 与 `positions.read` 的只读 profile 的连接实例——在 [Detailed Capabilities](#-detailed-capabilities) 的 **Broker Connectors** 中配置。IBKR 官方 MCP profile 暂时还不能作为数据源。
-手动刷新会依次读取所有已启用账户,统一换算 USD/CNY,并把不可变快照保存到 `~/.vibe-trading/portfolio/portfolio.sqlite3`。账户选择等不含密钥的偏好保存在权限为仅当前用户可读写的 `~/.vibe-trading/portfolio.json`。单个账户失败时会继续使用该账户最后一次成功数据;不完整快照不会进入历史曲线。
-
-持仓设置只接受同时声明账户读取、持仓读取和只读能力的连接 Profile,拒绝交易型 Profile。券商密钥仍保留在各连接器自己的凭证存储中,不会进入持仓配置。持仓接口不能下单、撤单、转账或提现;发送给模型的分析上下文也不包含账号、密钥、订单 ID、个人姓名或本机路径。
-
-### 本地连接实例与 Codex 接入流程
-
-持仓数据源现在是“本地连接实例”,而不是写死的券商名称:
-
-- 仓库里的 `TradingProfile` 是不含凭证、可复用的连接模板;
-- `~/.vibe-trading/connections.json` 记录这台电脑上的账户连接;
-- `portfolio.json` 只引用本地 `connection_id`。
-
-开发者自己的连接器安装在 Git 仓库外的
-`~/.vibe-trading/connectors/<connector>/`。其中 `connector.json` 必须声明
-`readonly: true`、`account.read` 和 `positions.read`;如果出现下单、撤单、
-转账、提现或其他写能力,框架会拒绝加载。连接器只需实现三个统一函数:
-
-```python
-check_status(credentials=..., config=...)
-get_account_snapshot(credentials=..., config=...)
-get_positions(credentials=..., config=...)
-```
-
-清单文件只声明需要哪些凭证字段,不保存值。在网页“连接中心”输入的值通过
-操作系统凭证库保存(macOS 钥匙串、Windows Credential Manager 或 Linux Secret
-Service),Web API 不会返回凭证明文。
+| 行为 | 你得到什么 |
+|------|------------|
+| **逐源出处** | 每一笔持仓都标明来自哪个连接,以 USD 计价并给出 CNY 换算。 |
+| **失败的源被排除** | 读取失败的源会作为错误报告并排除在合计之外——绝不沿用上一次的数据——快照本身标记为不完整。 |
+| **不可变快照** | 每次刷新都写入 `~/.vibe-trading/portfolio/portfolio.sqlite3`;不含凭证的设置保存在 `~/.vibe-trading/portfolio.json` 与 `connections.json`。 |
+| **导出与分析** | 支持 CSV 导出,并提供脱敏的 `portfolio_summary` agent 工具,其 `risk_xray_args` 可直接传给 `portfolio_risk_xray`。终端里 `vibe-trading portfolio show` 打印同一份快照(另有 `refresh` / `sources`)。 |
-Codex 可以用仓库提供的模板快速开始:
+你自己安装的只读连接器留在仓库之外的 `~/.vibe-trading/connectors/<name>/`:一个 `connector.json` manifest,加一个实现 `check_status` / `get_account_snapshot` / `get_positions` 的 `adapter.py`。声明了任何写能力的 manifest 会被拒绝。
```bash
vibe-trading connector init my-broker --destination /tmp
-# 让 Codex 根据券商官方只读 API 文档实现 /tmp/my-broker/adapter.py
vibe-trading connector validate /tmp/my-broker
vibe-trading connector install /tmp/my-broker
```
-重启本地服务后,打开“持仓 → 管理账户 → 连接中心”,从新安装的 Profile 创建
-本机账户连接、保存凭证、测试连接,再加入持仓汇总。私人插件和密钥始终只留在
-本机;如果某个连接器适合社区,也可以单独提交一份不含任何凭证的公共实现。
+它们的凭证通过 `pip install "vibe-trading-ai[keyring]"` 存入操作系统钥匙串(macOS Keychain、Windows Credential Manager、Linux Secret Service),不会写进配置文件。这条路径上的任何东西都不能下单或撤单。
---
@@ -1412,7 +1389,7 @@ Vibe-Trading 可以以只读模式直连 Interactive Brokers 的官方远程 MCP
"mcpServers": {
"ibkr": {
"type": "streamableHttp",
- "url": "https://api.ibkr.com/v1/api/mcp-public",
+ "url": "https://api.ibkr.com/v1/api/mcp",
"auth": {
"type": "oauth",
"scopes": ["mcp.read"],
@@ -1613,7 +1590,7 @@ Vibe-Trading/
│ │ ├── memory/ # 跨 session 持久记忆
│ │ │ └── persistent.py # 基于文件的记忆(~/.vibe-trading/memory/)
│ │ │
-│ │ ├── tools/ # 97 个自动发现的 agent 工具
+│ │ ├── tools/ # 106 个自动发现的 agent 工具
│ │ │ ├── backtest_tool.py # 运行回测
│ │ │ ├── remember_tool.py # 跨 session 记忆(save/recall/forget)
│ │ │ ├── skill_writer_tool.py # skill CRUD(save/patch/delete/file)
diff --git a/agent/tests/test_readme_counts.py b/agent/tests/test_readme_counts.py
index 579d2514a..8564aa016 100644
--- a/agent/tests/test_readme_counts.py
+++ b/agent/tests/test_readme_counts.py
@@ -255,6 +255,50 @@ def test_repo_tree_states_the_real_mcp_count(name: str) -> None:
assert str(len(_mcp_tool_names())) in _numbers(tree[0])
+# Environment variables that make a credential-gated tool register. The
+# repository-tree line has always carried the keyless registry size (the count a
+# fresh install sees), so those gates are closed while measuring it.
+_CREDENTIAL_GATES = ("FRED_API_KEY", "VIBE_TRADING_IWENCAI_KEY", "QVERIS_API_KEY", "VIBE_TW_STOCK_DB")
+
+
+def _keyless_agent_tool_count(monkeypatch: pytest.MonkeyPatch) -> int:
+ """Return the registry size a fresh, credential-free install ships.
+
+ Shell tools stay off (as they are for ``serve``), and every credential-gated
+ tool is hidden by clearing its gate, so the number does not depend on which
+ API keys happen to be configured on the machine running the suite.
+
+ Args:
+ monkeypatch: pytest fixture used to clear the credential gates.
+
+ Returns:
+ The number of locally registered agent tools.
+ """
+ from src.config.accessor import reset_env_config
+ from src.tools import build_registry
+
+ for name in _CREDENTIAL_GATES:
+ monkeypatch.delenv(name, raising=False)
+ reset_env_config()
+ try:
+ return len(build_registry().tool_names)
+ finally:
+ reset_env_config()
+
+
[email protected]("name", READMES)
+def test_repo_tree_states_the_real_agent_tool_count(name: str, monkeypatch: pytest.MonkeyPatch) -> None:
+ """The repository-tree comment on src/tools/ must state the real registry size.
+
+ This line sat at 97 while the registry shipped 105 — an eight-tool silent
+ drift that no test could see, because nothing measured it.
+ """
+ tree = [line for line in _read(name).splitlines() if re.search(r"│\s+│\s+├── tools/\s+#", line)]
+
+ assert len(tree) == 1, f"{name}: expected one src/tools/ tree line, found {len(tree)}"
+ assert str(_keyless_agent_tool_count(monkeypatch)) in _numbers(tree[0])
+
+
@pytest.mark.parametrize("name", READMES)
def test_feature_badges_state_the_real_counts(name: str) -> None:
"""Each <sub> badge must carry the count the code ships."""