Portfolio for Claude, Cursor, ChatGPT & agents
Local portfolio positions + honest P&L marks
curl -fsSL https://tradeloop.top/install.sh | shmacOS / Linux. Windows + manual install.
What it does
Local portfolio positions + honest P&L marks. Track what you hold (stocks & crypto, longs and shorts, multi-currency — 0700.HK in HKD, 7203.T in JPY, .L in London pence) in a local file on your device, then mark it to market through an honest source chain: Polygon live snapshot → key-free Yahoo quote batch → Polygon EOD, every mark labeled live|delayed|eod with timestamp and source, non-USD values converted to USD via disclosed Yahoo FX rates. pnl() can also compare the book against a benchmark (SPY etc. over 1mo–1y, current-weights caveat stated). Closes and qty reductions append to a realized-P&L ledger (research record — NOT tax lots, no wash-sale logic), and risk() reports the correlation matrix, beta vs SPY and annualized vol in pure arithmetic. Research, not advice, no trade execution.
The Portfolio skill is one of 40+ pre-wired TradeLoop integrations that any MCP-compatible client — Claude Desktop, Claude Code, Cursor, Windsurf, Codex CLI, and ChatGPT desktop — can call out of the box. You don't configure MCP servers or copy API keys into a JSON file; the TradeLoop daemon discovers the skill at startup and exposes its tools to whichever AI client is running.
Sample prompts
Once TradeLoop is installed and Portfolio is connected, ask your agent something like:
- “Add position from Portfolio.”
- “Remove Position position from Portfolio.”
- “List positions from Portfolio.”
Tools available (9)
portfolio__add_positionAdd or replace a position (upsert by symbol). qty is units held — negative for a short. cost_basis is the average PER-UNIT cost in the position's NATIVE currency. Currency auto-detects from the suffix (.HK→HKD, .T→JPY, .L→GBp pence, .TO→CAD, .AX→AUD, else USD; crypto USD) or pass it explicitly. A same-sign qty REDUCTIO
portfolio__remove_positionRemove (close) a position by symbol. The close is appended to the realized-P&L ledger: exit at the current live mark, or pass exit_price for your actual fill. Research record only — not tax advice, no wash-sale logic.
portfolio__list_positionsList stored positions as-is (no market data, no quota spend).
portfolio__pnlMark the portfolio to market with honest labels: per-position native price, mark tier (live|delayed|eod) + asof timestamp + source (polygon|yahoo|polygon-eod|coingecko), USD value, unrealized P&L $ and %, day change, weight, plus USD totals (totals say marks:'mixed' when tiers differ, and list the FX rates used for non
portfolio__realizedList the realized-P&L ledger (closes from remove_position and qty reductions from add_position) with per-currency totals, optionally filtered by year. Each record: ts, symbol, signed qty_closed, cost_basis, exit_price, realized_pnl, currency, note. Research/record log ONLY — not tax advice; no wash-sale or lot-matching
portfolio__riskPortfolio risk readout from daily adjusted closes (Yahoo, key-free): pairwise correlation matrix for all holdings + SPY (capped at 12 symbols by cost exposure, excess listed), each holding's beta vs SPY and annualized volatility, portfolio weighted-average pairwise correlation and the most/least correlated pair. Comput
portfolio__incomeEstimated annual dividend income for the current stock positions: trailing 12-month dividend rate × shares per position, dividend yield %, yield-on-cost %, and the USD total across currencies. An estimate from past payouts — cuts/raises change it.
portfolio__earningsUpcoming earnings dates for the CURRENT holdings — 'which of my positions report soon': next earnings date per stock position with days_until, BMO/AMC session, estimate flag, sorted soonest first; within_window marks the ones inside days_ahead (default 45). Key-free via Yahoo quote timestamps.
portfolio__size_positionRisk-based position sizing, pure arithmetic: shares = risk budget ÷ |entry − stop|, plus notional, stop distance %, position % of account, and R-multiple/profit at an optional target. Pass risk_amount (USD) or risk_pct (of account_value; falls back to the live portfolio total when omitted). Never advice — it just does
How to connect
Portfolio needs a provider API key to talk to polygon. Connect it from the TradeLoop dashboard:
- Run
curl -fsSL https://tradeloop.top/install.sh | shon macOS / Linux (or the PowerShell command on Windows). - Run
tradeloop loginto create your account and a device-bound encryption key. - Visit tradeloop.top/connect and authorize Portfolio.
- Run
tradeloop updateto sync the skill + credentials to every installed AI client.
Pricing
Free at every TradeLoop tier. Connect your account once at /connect; the OAuth or API-key credential stays encrypted on your machine and syncs to your other devices via the TradeLoop vault.
See the full TradeLoop pricing breakdown — Free $0/mo, Pro $29/mo, Ultra $99/mo — on the homepage.
Related
Looking at Portfolio? You may also want:
- Broker (read-only) — see your live positions, balances, orders and account equity from Interactive Brokers, Alpaca, and Binance
- Charts — Render a trend chart the model can SEE
- China Market (A股/港股) — A股 and Hong Kong market data, key-free from Sina/Tencent public endpoints: realtime quotes (A-share level-1 with the 5-level order book and 委比 book-pressure, HK quotes with 52w range), daily/weekly...
- Trade Coach — Trade review (复盘) coach from your REAL fills: imports executed trades from the broker skill (IBKR Flex / Alpaca, read-only) or any broker CSV export (English or Chinese headers, Futu/Tiger style, U...
- CoinGecko — live crypto prices, market caps, 24h moves, historical charts, trending coins, and coin search across thousands of tokens
Or browse all 40 skills in the TradeLoop catalog.