longbridge-risk-return

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

longbridge-risk-return

longbridge-risk-return

Risk-return optimisation — evaluate portfolio efficiency versus the efficient frontier and recommend optimal asset allocation.
Response language: match the user's input language — Simplified Chinese / Traditional Chinese / English.
风险收益优化——评估投资组合相对于有效前沿的效率,并推荐最优资产配置。
响应语言:匹配用户输入语言——简体中文/繁体中文/英文。

When to use

使用场景

Trigger on prompts asking for:
  • Portfolio optimisation — "帮我优化投资组合", "optimal portfolio", "投资组合优化"
  • Efficient frontier analysis — "有效前沿", "efficient frontier", "组合效率"
  • Risk preference-based allocation — "稳健型配置", "aggressive allocation", "风险偏好配置"
  • Risk-adjusted return improvement — "提高夏普比率", "risk-adjusted return", "大类资产配置"
Requires Longbridge login with Trade scope for account data.
当用户提出以下需求时触发:
  • 投资组合优化——"帮我优化投资组合", "optimal portfolio", "投资组合优化"
  • 有效前沿分析——"有效前沿", "efficient frontier", "组合效率"
  • 基于风险偏好的配置——"稳健型配置", "aggressive allocation", "风险偏好配置"
  • 提升风险调整后收益——"提高夏普比率", "risk-adjusted return", "大类资产配置"
需要登录Longbridge并授予Trade权限以获取账户数据。

Workflow

工作流程

  1. Fetch current portfolio and positions.
  2. Ask the user for:
    • Risk preference: Conservative (低风险) / Balanced (稳健) / Aggressive (进取)
    • Investment horizon: short (1–2y) / medium (3–5y) / long (5y+)
    • Any constraints: max single-stock weight, excluded asset classes
  3. Fetch 1-year daily return history for each position.
  4. Compute:
    • Current portfolio: expected return, volatility, Sharpe ratio, max drawdown
    • Correlation matrix of holdings
    • Efficient frontier points (using simplified mean-variance framework)
    • Recommended target allocation for the user's risk profile
  5. Compute the Efficiency Gap: distance from current portfolio to the nearest efficient frontier point.
  6. Output target weights and rebalancing actions.
  7. Convert multi-currency positions using FX rates.
If unsure of exact flag names, run
longbridge <subcommand> --help
before proceeding.
  1. 获取当前投资组合及持仓情况。
  2. 向用户询问:
    • 风险偏好:保守(低风险)/平衡(稳健)/进取(进取)
    • 投资期限:短期(1–2年)/中期(3–5年)/长期(5年以上)
    • 约束条件:单只股票最大权重、排除的资产类别
  3. 获取每个持仓标的1年的每日收益历史数据。
  4. 计算:
    • 当前投资组合:预期收益、波动率、夏普比率、最大回撤
    • 持仓标的的相关矩阵
    • 有效前沿点(使用简化的均值-方差框架)
    • 符合用户风险偏好的目标配置建议
  5. 计算效率缺口:当前投资组合与最近的有效前沿点之间的距离。
  6. 输出目标权重和调仓操作建议。
  7. 使用汇率转换多币种持仓。
若不确定具体命令参数,请先运行
longbridge <subcommand> --help

CLI

CLI

bash
undefined
bash
undefined

Account portfolio summary

账户投资组合摘要

longbridge portfolio --format json
longbridge portfolio --format json

Current positions

当前持仓

longbridge positions --format json
longbridge positions --format json

1-year daily OHLCV per holding (run for each symbol)

单个持仓标的1年每日OHLCV数据(每个代码运行一次)

longbridge kline <SYMBOL> --period day --count 252 --format json
longbridge kline <SYMBOL> --period day --count 252 --format json

FX rates for currency normalisation

用于币种归一化的汇率

longbridge exchange-rate --format json
undefined
longbridge exchange-rate --format json
undefined

Output structure

输出结构

RISK-RETURN OPTIMISATION  <Date>

RISK PROFILE: [Conservative | Balanced | Aggressive]
Horizon: x years

CURRENT PORTFOLIO
Expected Return:  x.x% p.a.   Volatility: x.x% p.a.
Sharpe Ratio:     x.xx         Max Drawdown: -x.x%
Efficiency Score: xx/100  (distance from efficient frontier)

EFFICIENT FRONTIER TARGETS
                   Conservative   Balanced   Aggressive
Expected Return    x.x%           x.x%       x.x%
Volatility         x.x%           x.x%       x.x%
Sharpe             x.xx           x.xx       x.xx

RECOMMENDED ALLOCATION (for your profile)
Equities:          xx%  (current: xx%)
Bonds / Fixed:     xx%  (current: xx%)
Cash:              xx%  (current: xx%)
Commodities/Alt:   xx%  (current: xx%)

CONCENTRATION RISK
Top holdings by weight:
1. <SYMBOL>  xx%  → Recommend: reduce to xx%
2. ...

REBALANCING ACTIONS
• Buy: <SYMBOL> +$x,xxx
• Sell: <SYMBOL> -$x,xxx
• No action: <SYMBOL>
RISK-RETURN OPTIMISATION  <日期>

风险偏好:[保守 | 平衡 | 进取]
投资期限:x年

当前投资组合
预期收益:  x.x% 年化   波动率:x.x% 年化
夏普比率:  x.xx         最大回撤:-x.x%
效率得分:xx/100 (与有效前沿的距离)

有效前沿目标值
                   保守型   平衡型   进取型
预期收益          x.x%       x.x%     x.x%
波动率            x.x%       x.x%     x.x%
夏普比率          x.xx       x.xx     x.xx

推荐配置(匹配您的风险偏好)
股票:          xx% (当前:xx%)
债券/固定收益: xx% (当前:xx%)
现金:          xx% (当前:xx%)
大宗商品/另类资产:xx% (当前:xx%)

集中度风险
按权重排序的前十大持仓:
1. <代码>  xx%  → 建议:降至xx%
2. ...

调仓操作建议
• 买入:<代码> +$x,xxx
• 卖出:<代码> -$x,xxx
• 无需操作:<代码>

Error handling

错误处理

Situation简体回复繁體回復English reply
Not logged in请运行
longbridge auth login
并授予 Trade 权限。
請執行
longbridge auth login
並授予 Trade 權限。
Run
longbridge auth login
with Trade scope.
Insufficient history for a holding部分持仓历史数据不足,已使用市场代理替代。部分持倉歷史數據不足,已使用市場代理替代。Insufficient history for some holdings — market proxy used.
Empty portfolio账户暂无持仓。賬戶暫無持倉。No positions found in the account.
command not found: longbridge
请安装 longbridge-terminal 或通过 MCP 连接。請安裝 longbridge-terminal 或透過 MCP 連線。Install longbridge-terminal or connect via MCP.
场景简体回复繁体回复English reply
未登录请运行
longbridge auth login
并授予Trade权限。
請執行
longbridge auth login
並授予Trade權限。
Run
longbridge auth login
with Trade scope.
部分持仓历史数据不足部分持仓历史数据不足,已使用市场代理替代。部分持倉歷史數據不足,已使用市場代理替代。Insufficient history for some holdings — market proxy used.
空投资组合账户暂无持仓。賬戶暫無持倉。No positions found in the account.
command not found: longbridge
请安装longbridge-terminal或通过MCP连接。請安裝longbridge-terminal或透過MCP連線。Install longbridge-terminal or connect via MCP.

MCP fallback

MCP fallback

If
longbridge
binary is not found, fall back to
mcp__longbridge__portfolio
,
mcp__longbridge__positions
,
mcp__longbridge__kline
, and
mcp__longbridge__exchange_rate
.
若未找到
longbridge
二进制文件,可 fallback 至
mcp__longbridge__portfolio
,
mcp__longbridge__positions
,
mcp__longbridge__kline
, 和
mcp__longbridge__exchange_rate

Related skills

相关技能

  • longbridge-portfolio
    — account P&L and current allocation
  • longbridge-positions
    — holdings detail
  • longbridge-financial-planning
    — retirement and savings goals
  • longbridge-strategy-optimizer
    — strategy-level optimisation
  • longbridge-portfolio
    — 账户盈亏及当前配置
  • longbridge-positions
    — 持仓详情
  • longbridge-financial-planning
    — 退休及储蓄目标规划
  • longbridge-strategy-optimizer
    — 策略层面优化

File layout

文件结构

skills/longbridge-risk-return/
└── SKILL.md
skills/longbridge-risk-return/
└── SKILL.md