longbridge-profit-analysis
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineselongbridge-profit-analysis
longbridge-profit-analysis
Full account P&L analysis — simple return, time-weighted return (TWR), per-symbol attribution, and market-level breakdown — sourced from the user's Longbridge account.
Response language: match the user's input language — Simplified Chinese / Traditional Chinese / English.
通过用户的Longbridge账户获取全面的账户盈亏分析——包括简单收益率、时间加权收益率(TWR)、单个标的业绩归因、分市场盈亏细分。
响应语言:匹配用户输入语言——简体中文/繁体中文/英文。
When to use
使用场景
- "我账户今年赚了多少", "我今年的收益率", "account P&L this year"
- "我的时间加权收益率", "TWR", "time-weighted return"
- "TSLA 这只股票我亏了多少", "holding P&L for NVDA"
- "美股账户盈亏", "profit by market", "HK market P&L"
- "帮我分析一下 Q1 业绩", "Q1 performance analysis"
- Prefer over when the user wants return-rate metrics (TWR eliminates cash-flow distortion) or detailed per-symbol attribution.
longbridge-portfolio
- "我账户今年赚了多少", "我今年的收益率", "account P&L this year"
- "我的时间加权收益率", "TWR", "time-weighted return"
- "TSLA 这只股票我亏了多少", "holding P&L for NVDA"
- "美股账户盈亏", "profit by market", "HK market P&L"
- "帮我分析一下 Q1 业绩", "Q1 performance analysis"
- 当用户需要收益率指标(TWR可消除现金流干扰)或单个标的详细归因时,优先使用而非
longbridge-profit-analysis。longbridge-portfolio
Workflow
工作流程
- Confirm login; if not logged in, tell user to run with Trade scope.
longbridge auth login - Identify the operation: overall P&L / per-symbol detail / by-market / custom date range.
- Extract date range from context if specified; default to YTD if not stated.
- Call CLI with ; run
--format jsonif unsure about flags.--help - Present: overall return %, absolute gain/loss, TWR (note: eliminates cash-flow timing distortion), top contributors, and breakdown table.
- 确认登录状态;若未登录,告知用户运行带有Trade权限的命令。
longbridge auth login - 识别操作类型:整体盈亏分析/单个标的详情/分市场分析/自定义日期范围。
- 若上下文指定了日期范围则提取;未指定时默认按年初至今(YTD)统计。
- 使用参数调用CLI;若不确定参数可运行
--format json查看。--help - 展示内容:整体收益率百分比、绝对盈亏额、TWR(注意:消除了现金流时间点干扰)、主要盈亏贡献标的,以及细分表格。
CLI
CLI命令
Run to verify exact flags before use.
longbridge profit-analysis --helpbash
undefined使用前请运行确认具体参数。
longbridge profit-analysis --helpbash
undefinedOverall account P&L with TWR (default: YTD or account lifetime)
带TWR的账户整体盈亏分析(默认:年初至今或账户存续期)
longbridge profit-analysis --format json
longbridge profit-analysis --format json
Custom date range
自定义日期范围
longbridge profit-analysis --start 2026-01-01 --end 2026-04-30 --format json
longbridge profit-analysis --start 2026-01-01 --end 2026-04-30 --format json
Per-symbol P&L detail
单个标的盈亏详情
longbridge profit-analysis detail TSLA.US --format json
longbridge profit-analysis detail TSLA.US --format json
P&L broken down by market
分市场盈亏细分
longbridge profit-analysis by-market --market HK --format json
longbridge profit-analysis by-market --market HK --format json
Check available flags and subcommands
查看可用参数和子命令
longbridge profit-analysis --help
undefinedlongbridge profit-analysis --help
undefinedOutput
输出内容
Overall P&L
整体盈亏分析
| Field | 简体 | 繁體 | English |
|---|---|---|---|
| 简单收益率 | 簡單收益率 | Simple return |
| 时间加权收益率 | 時間加權收益率 | Time-weighted return (TWR) |
| 总盈亏 | 總盈虧 | Total P&L |
| 已实现盈亏 | 已實現盈虧 | Realized P&L |
| 未实现盈亏 | 未實現盈虧 | Unrealized P&L |
| 统计期间 | 統計期間 | Period |
TWR note: Always explain TWR briefly — "时间加权收益率消除了追加/取出资金对收益率的影响,是更客观的业绩衡量指标。" / "時間加權收益率消除了追加/取出資金對收益率的影響,是更客觀的業績衡量指標。" / "TWR removes the effect of cash flows (deposits/withdrawals), providing a purer performance measure."
| 字段 | 简体 | 繁體 | English |
|---|---|---|---|
| 简单收益率 | 簡單收益率 | Simple return |
| 时间加权收益率 | 時間加權收益率 | Time-weighted return (TWR) |
| 总盈亏 | 總盈虧 | Total P&L |
| 已实现盈亏 | 已實現盈虧 | Realized P&L |
| 未实现盈亏 | 未實現盈虧 | Unrealized P&L |
| 统计期间 | 統計期間 | Period |
TWR说明:需简要解释TWR——"时间加权收益率消除了追加/取出资金对收益率的影响,是更客观的业绩衡量指标。" / "時間加權收益率消除了追加/取出資金對收益率的影響,是更客觀的業績衡量指標。" / "TWR removes the effect of cash flows (deposits/withdrawals), providing a purer performance measure."
Per-symbol detail
单个标的详情
Render: symbol, market, cost basis, current value, unrealized P&L, realized P&L, total return %.
展示:标的代码(symbol)、市场、成本基准、当前价值、未实现盈亏、已实现盈亏、总收益率百分比。
By-market
分市场分析
Render: market (US / HK / CN / SG), total value, P&L, return %.
End every response with:
⚠️ 以上数据仅供参考,不构成投资建议。/ 以上數據僅供參考,不構成投資建議。/ For reference only. Not investment advice.
展示:市场(美股/港股/A股/新加坡股市)、总市值、盈亏额、收益率百分比。
每个响应末尾需添加:
⚠️ 以上数据仅供参考,不构成投资建议。/ 以上數據僅供參考,不構成投資建議。/ For reference only. Not investment advice.
Error handling
错误处理
| Situation | 简体 | 繁體 | English |
|---|---|---|---|
| 退回 MCP;如未配置,提示安装 longbridge-terminal | 退回 MCP;如未設定,提示安裝 longbridge-terminal | Fall back to MCP; if unavailable, ask user to install longbridge-terminal |
| 请运行 | 請執行 | Run |
| Empty result (no trade history) | 账户暂无交易记录,无法计算盈亏 | 賬戶暫無交易記錄,無法計算盈虧 | No trade history found — cannot compute P&L |
| Invalid date range | 日期格式须为 YYYY-MM-DD,开始日期须早于结束日期 | 日期格式須為 YYYY-MM-DD,開始日期須早於結束日期 | Date must be YYYY-MM-DD; start must precede end |
| Other stderr | 原文转达,不做静默重试 | 原文轉達,不作靜默重試 | Relay verbatim; never retry silently |
| 场景 | 简体 | 繁體 | English |
|---|---|---|---|
| 退回MCP;如未配置,提示安装longbridge-terminal | 退回MCP;如未設定,提示安裝longbridge-terminal | Fall back to MCP; if unavailable, ask user to install longbridge-terminal |
| 请运行 | 請執行 | Run |
| 空结果(无交易记录) | 账户暂无交易记录,无法计算盈亏 | 賬戶暫無交易記錄,無法計算盈虧 | No trade history found — cannot compute P&L |
| 无效日期范围 | 日期格式须为YYYY-MM-DD,开始日期须早于结束日期 | 日期格式須為YYYY-MM-DD,開始日期須早於結束日期 | Date must be YYYY-MM-DD; start must precede end |
| 其他错误输出 | 原文转达,不做静默重试 | 原文轉達,不作靜默重試 | Relay verbatim; never retry silently |
MCP fallback
MCP降级方案
If CLI is not installed, use:
longbridge| CLI usage | MCP tool |
|---|---|
| |
| |
| |
若未安装 CLI,可使用:
longbridge| CLI用法 | MCP工具 |
|---|---|
| |
| |
| |
Related skills
相关技能
- Portfolio overview (value, cash share, industry mix) →
longbridge-portfolio - Account holdings snapshot →
longbridge-positions - Order and fill history →
longbridge-orders - Account statements for export →
longbridge-statement
- 投资组合概览(市值、现金占比、行业分布)→
longbridge-portfolio - 账户持仓快照 →
longbridge-positions - 订单与成交历史 →
longbridge-orders - 可导出的账户对账单 →
longbridge-statement
File layout
文件结构
longbridge-profit-analysis/
└── SKILL.md # prompt-only, no scripts/longbridge-profit-analysis/
└── SKILL.md # 仅含提示词,无scripts/目录