portfolio-manager

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Portfolio Manager

投资组合管理器

Overview

概述

Analyze and manage investment portfolios by integrating with Alpaca MCP Server to fetch real-time holdings data, then performing comprehensive analysis covering asset allocation, diversification, risk metrics, individual position evaluation, and rebalancing recommendations. Generate detailed portfolio reports with actionable insights.
This skill leverages Alpaca's brokerage API through MCP (Model Context Protocol) to access live portfolio data, ensuring analysis is based on actual current positions rather than manually entered data.
通过集成Alpaca MCP Server获取实时持仓数据,对投资组合进行分析与管理,涵盖资产配置、分散度、风险指标、个股头寸评估及再平衡建议等全面分析内容,生成具备可执行洞察的详细投资组合报告。
本技能通过MCP(模型上下文协议)调用Alpaca的经纪商API,获取实时投资组合数据,确保分析基于真实的当前头寸,而非手动录入的数据。

When to Use

使用场景

Invoke this skill when the user requests:
  • "Analyze my portfolio"
  • "Review my current positions"
  • "What's my asset allocation?"
  • "Check my portfolio risk"
  • "Should I rebalance my portfolio?"
  • "Evaluate my holdings"
  • "Portfolio performance review"
  • "What stocks should I buy or sell?"
  • Any request involving portfolio-level analysis or management
当用户提出以下请求时调用本技能:
  • "分析我的投资组合"
  • "审查我当前的头寸"
  • "我的资产配置情况如何?"
  • "检查我的投资组合风险"
  • "我应该调整投资组合再平衡吗?"
  • "评估我的持仓"
  • "投资组合业绩回顾"
  • "我应该买入或卖出哪些股票?"
  • 任何涉及投资组合层面分析或管理的请求

Prerequisites

前提条件

Alpaca MCP Server Setup

Alpaca MCP Server 设置

This skill requires Alpaca MCP Server to be configured and connected. The MCP server provides access to:
  • Current portfolio positions
  • Account equity and buying power
  • Historical positions and transactions
  • Market data for held securities
MCP Server Tools Used:
  • get_account_info
    - Fetch account equity, buying power, cash balance
  • get_positions
    - Retrieve all current positions with quantities, cost basis, market value
  • get_portfolio_history
    - Historical portfolio performance data
  • Market data tools for price quotes and fundamentals
If Alpaca MCP Server is not connected, inform the user and provide setup instructions from
references/alpaca_mcp_setup.md
.
本技能需要配置并连接Alpaca MCP Server。MCP服务器提供以下数据访问权限:
  • 当前投资组合头寸
  • 账户权益与购买力
  • 历史头寸与交易记录
  • 持仓证券的市场数据
使用的MCP服务器工具:
  • get_account_info
    - 获取账户权益、购买力、现金余额
  • get_positions
    - 获取所有当前头寸的持仓数量、成本基准、市值
  • get_portfolio_history
    - 投资组合历史业绩数据
  • 用于获取报价与基本面数据的市场数据工具
若未连接Alpaca MCP Server,需告知用户并提供
references/alpaca_mcp_setup.md
中的设置说明。

Workflow

工作流程

Step 1: Fetch Portfolio Data via Alpaca MCP

步骤1:通过Alpaca MCP获取投资组合数据

Use Alpaca MCP Server tools to gather current portfolio information:
1.1 Get Account Information:
Use mcp__alpaca__get_account_info to fetch:
- Account equity (total portfolio value)
- Cash balance
- Buying power
- Account status
1.2 Get Current Positions:
Use mcp__alpaca__get_positions to fetch all holdings:
- Symbol ticker
- Quantity held
- Average entry price (cost basis)
- Current market price
- Current market value
- Unrealized P&L ($ and %)
- Position size as % of portfolio
1.3 Get Portfolio History (Optional):
Use mcp__alpaca__get_portfolio_history for performance analysis:
- Historical equity values
- Time-weighted return calculation
- Drawdown analysis
Data Validation:
  • Verify all positions have valid ticker symbols
  • Confirm market values sum to approximate account equity
  • Check for any stale or inactive positions
  • Handle edge cases (fractional shares, options, crypto if supported)
使用Alpaca MCP Server工具收集当前投资组合信息:
1.1 获取账户信息:
使用mcp__alpaca__get_account_info获取:
- 账户权益(投资组合总价值)
- 现金余额
- 购买力
- 账户状态
1.2 获取当前头寸:
使用mcp__alpaca__get_positions获取所有持仓:
- 股票代码
- 持仓数量
- 平均入场价(成本基准)
- 当前市场价
- 当前市值
- 未实现盈亏(美元及百分比)
- 头寸占投资组合的比例
1.3 获取投资组合历史数据(可选):
使用mcp__alpaca__get_portfolio_history进行业绩分析:
- 历史权益价值
- 时间加权收益率计算
- 回撤分析
数据验证:
  • 验证所有头寸的股票代码有效
  • 确认市值总和与账户权益大致相符
  • 检查是否存在过期或无效头寸
  • 处理边缘情况(碎股、期权、加密货币,若支持)

Step 2: Enrich Position Data

步骤2:丰富头寸数据

For each position in the portfolio, gather additional market data and fundamentals:
2.1 Current Market Data:
  • Real-time or delayed price quotes
  • Daily volume and liquidity metrics
  • 52-week range
  • Market capitalization
2.2 Fundamental Data: Use WebSearch or available market data APIs to fetch:
  • Sector and industry classification
  • Key valuation metrics (P/E, P/B, dividend yield)
  • Recent earnings and financial health indicators
  • Analyst ratings and price targets
  • Recent news and material developments
2.3 Technical Analysis:
  • Price trend (20-day, 50-day, 200-day moving averages)
  • Relative strength
  • Support and resistance levels
  • Momentum indicators (RSI, MACD if available)
针对投资组合中的每个头寸,收集额外的市场数据与基本面信息:
2.1 当前市场数据:
  • 实时或延迟报价
  • 日成交量与流动性指标
  • 52周价格区间
  • 市值
2.2 基本面数据: 使用WebSearch或可用的市场数据API获取:
  • 行业与板块分类
  • 关键估值指标(P/E、P/B、股息率)
  • 近期收益与财务健康指标
  • 分析师评级与目标价
  • 近期新闻与重大动态
2.3 技术分析:
  • 价格趋势(20日、50日、200日均线)
  • 相对强度
  • 支撑位与阻力位
  • 动量指标(RSI、MACD,若可用)

Step 3: Portfolio-Level Analysis

步骤3:投资组合层面分析

Perform comprehensive portfolio analysis using frameworks from reference files:
参考文件中的框架进行全面的投资组合分析:

3.1 Asset Allocation Analysis

3.1 资产配置分析

Read references/asset-allocation.md for allocation frameworks
Analyze current allocation across multiple dimensions:
By Asset Class:
  • Equities vs Fixed Income vs Cash vs Alternatives
  • Compare to target allocation for user's risk profile
  • Assess if allocation matches investment goals
By Sector:
  • Technology, Healthcare, Financials, Consumer, etc.
  • Identify sector concentration risks
  • Compare to benchmark sector weights (e.g., S&P 500)
By Market Cap:
  • Large-cap vs Mid-cap vs Small-cap distribution
  • Concentration in mega-caps
  • Market cap diversification score
By Geography:
  • US vs International vs Emerging Markets
  • Domestic concentration risk assessment
Output Format:
markdown
undefined
阅读references/asset-allocation.md获取配置框架
从多个维度分析当前配置:
按资产类别:
  • 股票 vs 固定收益 vs 现金 vs 另类资产
  • 与用户风险偏好的目标配置对比
  • 评估配置是否符合投资目标
按板块:
  • 科技、医疗、金融、消费等
  • 识别板块集中风险
  • 与基准板块权重对比(如S&P 500)
按市值规模:
  • 大盘股 vs 中盘股 vs 小盘股分布
  • 大盘股集中情况
  • 市值分散度评分
按地域:
  • 美国 vs 国际 vs 新兴市场
  • 本土集中风险评估
输出格式:
markdown
undefined

Asset Allocation

资产配置

Current Allocation vs Target

当前配置 vs 目标配置

Asset ClassCurrentTargetVariance
US EquitiesXX.X%YY.Y%+/- Z.Z%
...
资产类别当前占比目标占比偏差
美国股票XX.X%YY.Y%+/- Z.Z%
...

Sector Breakdown

板块分布

[Pie chart description or table with sector percentages]
[饼图描述或含板块占比的表格]

Top 10 Holdings

前十大持仓

RankSymbol% of PortfolioSector
1AAPLX.X%Technology
...
undefined
排名代码占投资组合比例板块
1AAPLX.X%科技
...
undefined

3.2 Diversification Analysis

3.2 分散度分析

Read references/diversification-principles.md for diversification theory
Evaluate portfolio diversification quality:
Position Concentration:
  • Identify top holdings and their aggregate weight
  • Flag if any single position exceeds 10-15% of portfolio
  • Calculate Herfindahl-Hirschman Index (HHI) for concentration measurement
Sector Concentration:
  • Identify dominant sectors
  • Flag if any sector exceeds 30-40% of portfolio
  • Compare to benchmark sector diversity
Correlation Analysis:
  • Estimate correlation between major positions
  • Identify highly correlated holdings (potential redundancy)
  • Assess true diversification benefit
Number of Positions:
  • Optimal range: 15-30 stocks for individual portfolios
  • Flag if under-diversified (<10 stocks) or over-diversified (>50 stocks)
Output:
markdown
undefined
阅读references/diversification-principles.md获取分散化理论
评估投资组合的分散质量:
头寸集中度:
  • 识别前十大持仓及其总权重
  • 若单个头寸占比超过10-15%则标记
  • 计算赫芬达尔-赫希曼指数(HHI)衡量集中度
板块集中度:
  • 识别主导板块
  • 若单个板块占比超过30-40%则标记
  • 与基准板块分散度对比
相关性分析:
  • 估算主要头寸之间的相关性
  • 识别高度相关的持仓(潜在冗余)
  • 评估真实的分散化收益
头寸数量:
  • 个人投资组合的最优范围:15-30只股票
  • 若头寸不足10只标记为分散不足,超过50只标记为过度分散
输出:
markdown
undefined

Diversification Assessment

分散度评估

Concentration Risk: [Low / Medium / High]
  • Top 5 holdings represent XX% of portfolio
  • Largest single position: [SYMBOL] at XX%
Sector Diversification: [Excellent / Good / Fair / Poor]
  • Dominant sector: [Sector Name] at XX%
  • [Assessment of balance across sectors]
Position Count: [Optimal / Under-diversified / Over-diversified]
  • Total positions: XX stocks
  • [Recommendation]
Correlation Concerns:
  • [List any highly correlated position pairs]
  • [Diversification improvement suggestions]
undefined
集中度风险: [低 / 中 / 高]
  • 前5大持仓占投资组合的XX%
  • 最大单一持仓:[代码],占比XX%
板块分散度: [优秀 / 良好 / 一般 / 较差]
  • 主导板块:[板块名称],占比XX%
  • [板块平衡性评估]
头寸数量: [最优 / 分散不足 / 过度分散]
  • 总头寸:XX只股票
  • [建议]
相关性问题:
  • [列出高度相关的头寸对]
  • [分散化改进建议]
undefined

3.3 Risk Analysis

3.3 风险分析

Read references/portfolio-risk-metrics.md for risk measurement frameworks
Calculate and interpret key risk metrics:
Volatility Measures:
  • Estimated portfolio beta (weighted average of position betas)
  • Individual position volatilities
  • Portfolio standard deviation (if historical data available)
Downside Risk:
  • Maximum drawdown (from portfolio history)
  • Current drawdown from peak
  • Positions with significant unrealized losses
Risk Concentration:
  • Percentage in high-volatility stocks (beta > 1.5)
  • Percentage in speculative/unprofitable companies
  • Leverage usage (if applicable)
Tail Risk:
  • Exposure to potential black swan events
  • Single-stock concentration risk
  • Sector-specific event risk
Output:
markdown
undefined
阅读references/portfolio-risk-metrics.md获取风险衡量框架
计算并解读关键风险指标:
波动率指标:
  • 估算投资组合beta值(头寸beta的加权平均值)
  • 个股头寸波动率
  • 投资组合标准差(若有历史数据)
下行风险:
  • 最大回撤(来自投资组合历史数据)
  • 当前较峰值的回撤
  • 未实现亏损较大的头寸
风险集中度:
  • 高波动率股票(beta > 1.5)的占比
  • 投机性/亏损企业的占比
  • 杠杆使用情况(若适用)
尾部风险:
  • 潜在黑天鹅事件的暴露程度
  • 单一股票集中度风险
  • 板块特定事件风险
输出:
markdown
undefined

Risk Assessment

风险评估

Overall Risk Profile: [Conservative / Moderate / Aggressive]
Portfolio Beta: X.XX (vs market at 1.00)
  • Interpretation: Portfolio is [more/less] volatile than market
Maximum Drawdown: -XX.X% (from $XXX,XXX to $XXX,XXX)
  • Current drawdown from peak: -XX.X%
High-Risk Positions:
Symbol% of PortfolioBetaRisk Factor
[TICKER]XX%X.XX[High volatility / Recent loss / etc]
Risk Concentrations:
  • XX% in single sector ([Sector])
  • XX% in stocks with beta > 1.5
  • [Other concentration risks]
Risk Score: XX/100 ([Low/Medium/High] risk)
undefined
整体风险 profile: [保守 / 适中 / 激进]
投资组合Beta: X.XX(市场基准为1.00)
  • 解读:投资组合波动[高于/低于]市场
最大回撤: -XX.X%(从$XXX,XXX跌至$XXX,XXX)
  • 当前较峰值回撤:-XX.X%
高风险头寸:
代码占投资组合比例Beta风险因素
[股票代码]XX%X.XX[高波动 / 近期亏损 / 等]
风险集中度:
  • XX%集中于单一板块([板块])
  • XX%集中于beta > 1.5的股票
  • [其他集中度风险]
风险评分: XX/100 ([低/中/高]风险)
undefined

3.4 Performance Analysis

3.4 业绩分析

Evaluate portfolio performance using available data:
Absolute Returns:
  • Overall portfolio unrealized P&L ($ and %)
  • Best performing positions (top 5 by % gain)
  • Worst performing positions (bottom 5 by % loss)
Time-Weighted Returns (if history available):
  • YTD return
  • 1-year, 3-year, 5-year annualized returns
  • Compare to benchmark (S&P 500, relevant index)
Position-Level Performance:
  • Winners vs Losers ratio
  • Average gain on winning positions
  • Average loss on losing positions
  • Positions near 52-week highs/lows
Output:
markdown
undefined
使用可用数据评估投资组合业绩:
绝对收益:
  • 投资组合整体未实现盈亏(美元及百分比)
  • 表现最佳的头寸(前5名按涨幅百分比)
  • 表现最差的头寸(后5名按跌幅百分比)
时间加权收益率(若有历史数据):
  • 年初至今收益率
  • 1年、3年、5年年化收益率
  • 与基准对比(S&P 500、相关指数)
头寸层面业绩:
  • 盈利头寸 vs 亏损头寸比例
  • 盈利头寸的平均涨幅
  • 亏损头寸的平均跌幅
  • 接近52周高点/低点的头寸
输出:
markdown
undefined

Performance Review

业绩回顾

Total Portfolio Value: $XXX,XXX Total Unrealized P&L: $XX,XXX (+XX.X%) Cash Balance: $XX,XXX (XX% of portfolio)
Best Performers:
SymbolGainPosition Value
[TICKER]+XX.X%$XX,XXX
...
Worst Performers:
SymbolLossPosition Value
[TICKER]-XX.X%$XX,XXX
...
Performance vs Benchmark (if available):
  • Portfolio return: +X.X%
  • S&P 500 return: +Y.Y%
  • Alpha: +/- Z.Z%
undefined
投资组合总价值: $XXX,XXX 总未实现盈亏: $XX,XXX (+XX.X%) 现金余额: $XX,XXX(占投资组合XX%)
最佳表现头寸:
代码涨幅头寸价值
[股票代码]+XX.X%$XX,XXX
...
最差表现头寸:
代码跌幅头寸价值
[股票代码]-XX.X%$XX,XXX
...
与基准对比(若可用):
  • 投资组合收益率:+X.X%
  • S&P 500收益率:+Y.Y%
  • Alpha值:+/- Z.Z%
undefined

Step 4: Individual Position Analysis

步骤4:个股头寸分析

For key positions (top 10-15 by portfolio weight), perform detailed analysis:
Read references/position-evaluation.md for position analysis framework
For each significant position:
4.1 Current Thesis Validation:
  • Why was this position initiated? (if known from user context)
  • Has the investment thesis played out or broken?
  • Recent company developments and news
4.2 Valuation Assessment:
  • Current valuation metrics (P/E, P/B, etc.)
  • Compare to historical valuation range
  • Compare to sector peers
  • Overvalued / Fair / Undervalued assessment
4.3 Technical Health:
  • Price trend (uptrend, downtrend, sideways)
  • Position relative to moving averages
  • Support and resistance levels
  • Momentum status
4.4 Position Sizing:
  • Current weight in portfolio
  • Is size appropriate given conviction and risk?
  • Overweight or underweight vs optimal
4.5 Action Recommendation:
  • HOLD - Position is well-sized and thesis intact
  • ADD - Underweight given opportunity, thesis strengthening
  • TRIM - Overweight or valuation stretched
  • SELL - Thesis broken, better opportunities elsewhere
Output per position:
markdown
undefined
针对占投资组合权重较高的头寸(前10-15名)进行详细分析:
阅读references/position-evaluation.md获取头寸分析框架
针对每个重要头寸:
4.1 当前投资逻辑验证:
  • 当初为何建立该头寸?(若用户上下文有提及)
  • 投资逻辑是否已兑现或失效?
  • 公司近期动态与新闻
4.2 估值评估:
  • 当前估值指标(P/E、P/B等)
  • 与历史估值区间对比
  • 与板块同行对比
  • 高估 / 合理 / 低估评估
4.3 技术面健康度:
  • 价格趋势(上涨、下跌、横盘)
  • 价格相对于均线的位置
  • 支撑位与阻力位
  • 动量状态
4.4 头寸规模:
  • 当前占投资组合的权重
  • 规模是否符合投资信心与风险水平?
  • 相对于最优规模的超配或低配情况
4.5 行动建议:
  • 持有 - 头寸规模合理且投资逻辑完整
  • 加仓 - 低配且机会显现,投资逻辑增强
  • 减仓 - 超配或估值过高
  • 卖出 - 投资逻辑失效,存在更好的替代机会
单个头寸输出格式:
markdown
undefined

[SYMBOL] - [Company Name] (XX.X% of portfolio)

[代码] - [公司名称](占投资组合XX.X%)

Position Details:
  • Shares: XXX
  • Avg Cost: $XX.XX
  • Current Price: $XX.XX
  • Market Value: $XX,XXX
  • Unrealized P/L: $X,XXX (+XX.X%)
Fundamental Snapshot:
  • Sector: [Sector]
  • Market Cap: $XX.XB
  • P/E: XX.X | Dividend Yield: X.X%
  • Recent developments: [Key news or earnings]
Technical Status:
  • Trend: [Uptrend / Downtrend / Sideways]
  • Price vs 50-day MA: [Above/Below by XX%]
  • Support: $XX.XX | Resistance: $XX.XX
Position Assessment:
  • Thesis Status: [Intact / Weakening / Broken / Strengthening]
  • Valuation: [Undervalued / Fair / Overvalued]
  • Position Sizing: [Optimal / Overweight / Underweight]
Recommendation: [HOLD / ADD / TRIM / SELL] Rationale: [1-2 sentence explanation]
undefined
头寸详情:
  • 持股数量:XXX
  • 平均成本:$XX.XX
  • 当前价格:$XX.XX
  • 市值:$XX,XXX
  • 未实现盈亏:$X,XXX (+XX.X%)
基本面快照:
  • 板块:[板块]
  • 市值:$XX.XB
  • P/E:XX.X | 股息率:X.X%
  • 近期动态:[关键新闻或收益情况]
技术面状态:
  • 趋势:[上涨 / 下跌 / 横盘]
  • 价格 vs 50日均线:[高于/低于XX%]
  • 支撑位:$XX.XX | 阻力位:$XX.XX
头寸评估:
  • 投资逻辑状态:[完整 / 弱化 / 失效 / 增强]
  • 估值:[低估 / 合理 / 高估]
  • 头寸规模:[最优 / 超配 / 低配]
建议:[持有 / 加仓 / 减仓 / 卖出] 理由:[1-2句话说明]
undefined

Step 5: Rebalancing Recommendations

步骤5:再平衡建议

Read references/rebalancing-strategies.md for rebalancing approaches
Generate specific rebalancing recommendations:
5.1 Identify Rebalancing Triggers:
  • Positions that have drifted significantly from target weights
  • Sector/asset class allocations requiring adjustment
  • Overweight positions to trim (exceeded threshold)
  • Underweight areas to add (below threshold)
  • Tax considerations (capital gains implications)
5.2 Develop Rebalancing Plan:
Positions to TRIM:
  • Overweight positions (>threshold deviation from target)
  • Stocks that have run up significantly (valuation concerns)
  • Concentrated positions exceeding 15-20% of portfolio
  • Positions with broken thesis
Positions to ADD:
  • Underweight sectors or asset classes
  • High-conviction positions currently underweight
  • New opportunities to improve diversification
Cash Deployment:
  • If excess cash (>10% of portfolio), suggest deployment
  • Prioritize based on opportunity and allocation gaps
5.3 Prioritization: Rank rebalancing actions by priority:
  1. Immediate - Risk reduction (trim concentrated positions)
  2. High Priority - Major allocation drift (>10% from target)
  3. Medium Priority - Moderate drift (5-10% from target)
  4. Low Priority - Fine-tuning and opportunistic adjustments
Output:
markdown
undefined
阅读references/rebalancing-strategies.md获取再平衡方法
生成具体的再平衡建议:
5.1 识别再平衡触发因素:
  • 头寸权重偏离目标幅度较大
  • 需要调整的板块/资产类别配置
  • 需减仓的超配头寸(超过阈值)
  • 需加仓的低配领域(低于阈值)
  • 税务考虑(资本利得影响)
5.2 制定再平衡计划:
需减仓的头寸:
  • 超配头寸(偏离目标超过阈值)
  • 涨幅过大的股票(估值担忧)
  • 占比超过15-20%的集中头寸
  • 投资逻辑失效的头寸
需加仓的头寸:
  • 低配的板块或资产类别
  • 当前低配的高信心头寸
  • 可提升分散度的新机会
现金部署:
  • 若现金占比超过10%,建议部署
  • 根据机会与配置缺口优先安排
5.3 优先级排序: 按优先级对再平衡行动排序:
  1. 立即执行 - 风险降低(减仓集中头寸)
  2. 高优先级 - 配置大幅偏离(偏离目标超过10%)
  3. 中优先级 - 中度偏离(偏离目标5-10%)
  4. 低优先级 - 微调与机会性调整
输出:
markdown
undefined

Rebalancing Recommendations

再平衡建议

Summary

摘要

  • Rebalancing Needed: [Yes / No / Optional]
  • Primary Reason: [Concentration risk / Sector drift / Cash deployment / etc]
  • Estimated Trades: X sell orders, Y buy orders
  • 是否需要再平衡:[是 / 否 / 可选]
  • 主要原因:[集中度风险 / 板块偏离 / 现金部署 / 等]
  • **预计交易次数:**X笔卖出订单,Y笔买入订单

Recommended Actions

建议行动

HIGH PRIORITY: Risk Reduction

高优先级:风险降低

TRIM [SYMBOL] from XX% to YY% of portfolio
  • Shares to Sell: XX shares (~$XX,XXX)
  • Rationale: [Overweight / Valuation extended / etc]
  • Tax Impact: $X,XXX capital gain (est)
减仓 [代码] 从XX%调整至投资组合的YY%
  • **需卖出数量:**XX股(约$XX,XXX)
  • 理由:[超配 / 估值过高 / 等]
  • **税务影响:**约$X,XXX资本利得(估算)

MEDIUM PRIORITY: Asset Allocation

中优先级:资产配置调整

ADD [Sector/Asset Class] exposure
  • Target: Increase from XX% to YY%
  • Suggested Stocks: [SYMBOL1, SYMBOL2, SYMBOL3]
  • Amount to Invest: ~$XX,XXX
加仓 [板块/资产类别] 敞口
  • **目标:**从XX%提升至YY%
  • 建议股票:[代码1, 代码2, 代码3]
  • **投资金额:**约$XX,XXX

CASH DEPLOYMENT

现金部署

Current Cash: $XX,XXX (XX% of portfolio)
  • Recommendation: [Deploy / Keep for opportunities / Reduce to X%]
  • Suggested Allocation: [Distribution across sectors/stocks]
当前现金:$XX,XXX(占投资组合XX%)
  • 建议:[部署 / 留存等待机会 / 降至X%]
  • 建议配置:[跨板块/股票的分配方案]

Implementation Plan

实施计划

  1. [First action - highest priority]
  2. [Second action]
  3. [Third action] ...
Timing Considerations:
  • [Tax year-end planning / Earnings season / Market conditions]
  • [Suggested phasing if applicable]
undefined
  1. [第一项行动 - 最高优先级]
  2. [第二项行动]
  3. [第三项行动] ...
时间考量:
  • [税务年末规划 / 财报季 / 市场状况]
  • [若适用,建议分阶段实施]
undefined

Step 6: Generate Portfolio Report

步骤6:生成投资组合报告

Create comprehensive markdown report saved to repository root:
Filename:
portfolio_analysis_YYYY-MM-DD.md
Report Structure:
markdown
undefined
创建完整的markdown报告并保存至仓库根目录:
文件名:
portfolio_analysis_YYYY-MM-DD.md
报告结构:
markdown
undefined

Portfolio Analysis Report

投资组合分析报告

Account: [Account type if available] Report Date: YYYY-MM-DD Portfolio Value: $XXX,XXX Total P&L: $XX,XXX (+XX.X%)

账户:[若有,填写账户类型] **报告日期:**YYYY-MM-DD 投资组合价值:$XXX,XXX 总盈亏:$XX,XXX (+XX.X%)

Executive Summary

执行摘要

[3-5 bullet points summarizing key findings]
  • Overall portfolio health assessment
  • Major strengths
  • Key risks or concerns
  • Primary recommendations

[3-5个要点总结关键发现]
  • 投资组合整体健康状况评估
  • 主要优势
  • 关键风险或担忧
  • 核心建议

Holdings Overview

持仓概述

[Summary table of all positions]

[所有头寸的汇总表格]

Asset Allocation

资产配置

[Section from Step 3.1]

[步骤3.1中的内容]

Diversification Analysis

分散度分析

[Section from Step 3.2]

[步骤3.2中的内容]

Risk Assessment

风险评估

[Section from Step 3.3]

[步骤3.3中的内容]

Performance Review

业绩回顾

[Section from Step 3.4]

[步骤3.4中的内容]

Position Analysis

头寸分析

[Detailed analysis of top 10-15 positions from Step 4]

[步骤4中前10-15个头寸的详细分析]

Rebalancing Recommendations

再平衡建议

[Section from Step 5]

[步骤5中的内容]

Action Items

行动项

Immediate Actions:
  • [Action 1]
  • [Action 2]
Medium-Term Actions:
  • [Action 3]
  • [Action 4]
Monitoring Priorities:
  • [Watch list item 1]
  • [Watch list item 2]

立即行动:
  • [行动1]
  • [行动2]
中期行动:
  • [行动3]
  • [行动4]
监控重点:
  • [观察列表项1]
  • [观察列表项2]

Appendix: Full Holdings

附录:完整持仓

[Complete table with all positions and metrics]
undefined
[包含所有头寸及指标的完整表格]
undefined

Step 7: Interactive Follow-up

步骤7:交互式跟进

Be prepared to answer follow-up questions:
Common Questions:
"Why should I sell [SYMBOL]?"
  • Explain specific concerns (valuation, thesis breakdown, concentration)
  • Provide supporting data
  • Offer alternative positions if applicable
"What should I buy instead?"
  • Suggest specific stocks to improve allocation
  • Explain how they address portfolio gaps
  • Provide brief investment thesis
"What's my biggest risk?"
  • Identify primary risk factor (concentration, sector exposure, volatility)
  • Quantify the risk
  • Suggest mitigation strategies
"How does my portfolio compare to [benchmark]?"
  • Compare allocation, sector weights, risk metrics
  • Highlight key differences
  • Assess if differences are justified
"Should I rebalance now or wait?"
  • Consider market conditions, tax implications, transaction costs
  • Provide timing recommendation with rationale
"Can you analyze [specific position] in more detail?"
  • Perform deep-dive analysis using us-stock-analysis skill if needed
  • Integrate findings back into portfolio context
准备回答用户的跟进问题:
常见问题:
"我为什么要卖出[代码]?"
  • 解释具体担忧(估值、投资逻辑失效、集中度)
  • 提供支持数据
  • 若适用,提供替代头寸建议
"我应该买什么替代?"
  • 建议可改善配置的具体股票
  • 解释如何填补投资组合缺口
  • 提供简要投资逻辑
"我最大的风险是什么?"
  • 识别主要风险因素(集中度、板块暴露、波动率)
  • 量化风险
  • 建议缓解策略
"我的投资组合与[基准]相比如何?"
  • 对比配置、板块权重、风险指标
  • 突出关键差异
  • 评估差异是否合理
"我现在应该再平衡还是等待?"
  • 考虑市场状况、税务影响、交易成本
  • 提供带理由的时间建议
"你能更详细地分析[特定头寸]吗?"
  • 若需要,使用us-stock-analysis技能进行深度分析
  • 将结果整合回投资组合背景中

Analysis Frameworks

分析框架

Target Allocation Templates

目标配置模板

This skill includes reference allocation models for different investor profiles:
Read references/target-allocations.md for detailed models:
  • Conservative (Capital preservation, income focus)
  • Moderate (Balanced growth and income)
  • Growth (Long-term capital appreciation)
  • Aggressive (Maximum growth, high risk tolerance)
Each model includes:
  • Asset class targets (Stocks/Bonds/Cash/Alternatives)
  • Sector guidelines
  • Market cap distribution
  • Geographic allocation
  • Position sizing rules
Use these as comparison benchmarks when user hasn't specified their allocation strategy.
本技能包含针对不同投资者profile的参考配置模型:
阅读references/target-allocations.md获取详细模型:
  • 保守型(资本保值、收益导向)
  • 适中型(平衡增长与收益)
  • 增长型(长期资本增值)
  • 激进型(最大化增长、高风险承受力)
每个模型包含:
  • 资产类别目标(股票/债券/现金/另类资产)
  • 板块指引
  • 市值分布
  • 地域配置
  • 头寸规模规则
当用户未指定配置策略时,将这些模型作为对比基准。

Risk Profile Assessment

风险profile评估

If user's target allocation is unknown, assess appropriate risk profile based on:
  • Age (if mentioned)
  • Investment timeline (if mentioned)
  • Current allocation (reveals preferences)
  • Position types (conservative vs speculative stocks)
Read references/risk-profile-questionnaire.md for assessment framework
若用户的目标配置未知,根据以下因素评估合适的风险profile:
  • 年龄(若提及)
  • 投资期限(若提及)
  • 当前配置(反映偏好)
  • 头寸类型(保守型vs投机型股票)
阅读references/risk-profile-questionnaire.md获取评估框架

Output Guidelines

输出指南

Tone and Style:
  • Objective and analytical
  • Actionable recommendations with clear rationale
  • Acknowledge uncertainty in market forecasts
  • Balance optimism with risk awareness
  • Quantify whenever possible
Data Presentation:
  • Tables for comparisons and metrics
  • Percentages for allocations and returns
  • Dollar amounts for absolute values
  • Consistent formatting throughout report
Recommendation Clarity:
  • Explicit action verbs (TRIM, ADD, HOLD, SELL)
  • Specific quantities (sell XX shares, add $X,XXX)
  • Priority levels (Immediate, High, Medium, Low)
  • Supporting rationale for each recommendation
Visual Descriptions:
  • Describe allocation breakdowns as if creating pie charts
  • Sector weights as bar chart equivalents
  • Performance trends with directional indicators (↑ ↓ →)
语气与风格:
  • 客观且分析性
  • 具备清晰理由的可执行建议
  • 承认市场预测的不确定性
  • 在乐观与风险意识间取得平衡
  • 尽可能量化
数据呈现:
  • 使用表格进行对比与展示指标
  • 配置与收益率使用百分比
  • 绝对价值使用美元金额
  • 报告格式保持一致
建议清晰度:
  • 使用明确的动作动词(减仓、加仓、持有、卖出)
  • 具体数量(卖出XX股,加仓$X,XXX)
  • 优先级(立即、高、中、低)
  • 每个建议的支撑理由
可视化描述:
  • 将配置分解描述为饼图形式
  • 板块权重描述为等效柱状图
  • 业绩趋势使用方向指标(↑ ↓ →)

Reference Files

参考文件

Load these references as needed during analysis:
references/alpaca-mcp-setup.md
  • When: User needs help setting up Alpaca MCP Server
  • Contains: Installation instructions, API key configuration, MCP server connection steps, troubleshooting
references/asset-allocation.md
  • When: Analyzing portfolio allocation or creating rebalancing plan
  • Contains: Asset allocation theory, optimal allocation by risk profile, sector allocation guidelines, rebalancing triggers
references/diversification-principles.md
  • When: Assessing portfolio diversification quality
  • Contains: Modern portfolio theory basics, correlation concepts, optimal position count, concentration risk thresholds, diversification metrics
references/portfolio-risk-metrics.md
  • When: Calculating risk scores or interpreting volatility
  • Contains: Beta calculation, standard deviation, Sharpe ratio, maximum drawdown, Value at Risk (VaR), risk-adjusted return metrics
references/position-evaluation.md
  • When: Analyzing individual holdings for buy/hold/sell decisions
  • Contains: Position analysis framework, thesis validation checklist, position sizing guidelines, sell discipline criteria
references/rebalancing-strategies.md
  • When: Developing rebalancing recommendations
  • Contains: Rebalancing methodologies (calendar-based, threshold-based, tactical), tax optimization strategies, transaction cost considerations, implementation timing
references/target-allocations.md
  • When: Need benchmark allocations for comparison
  • Contains: Model portfolios for conservative/moderate/growth/aggressive investors, sector target ranges, market cap distributions
references/risk-profile-questionnaire.md
  • When: User hasn't specified risk tolerance or target allocation
  • Contains: Risk assessment questions, scoring methodology, risk profile classification
分析过程中按需加载以下参考文件:
references/alpaca-mcp-setup.md
  • 使用场景:用户需要Alpaca MCP Server设置帮助
  • 包含:安装说明、API密钥配置、MCP服务器连接步骤、故障排除
references/asset-allocation.md
  • 使用场景:分析投资组合配置或制定再平衡计划
  • 包含:资产配置理论、按风险profile划分的最优配置、板块配置指引、再平衡触发因素
references/diversification-principles.md
  • 使用场景:评估投资组合分散质量
  • 包含:现代投资组合理论基础、相关性概念、最优头寸数量、集中度风险阈值、分散度指标
references/portfolio-risk-metrics.md
  • 使用场景:计算风险评分或解读波动率
  • 包含:Beta计算、标准差、夏普比率、最大回撤、风险价值(VaR)、风险调整后收益指标
references/position-evaluation.md
  • 使用场景:分析个股持仓以决定买/持/卖
  • 包含:头寸分析框架、投资逻辑验证清单、头寸规模指引、卖出纪律标准
references/rebalancing-strategies.md
  • 使用场景:制定再平衡建议
  • 包含:再平衡方法(日历型、阈值型、战术型)、税务优化策略、交易成本考量、实施时机
references/target-allocations.md
  • 使用场景:需要基准配置进行对比
  • 包含:保守/适中/增长/激进投资者的模型投资组合、板块目标区间、市值分布
references/risk-profile-questionnaire.md
  • 使用场景:用户未指定风险承受力或目标配置
  • 包含:风险评估问题、评分方法、风险profile分类

Error Handling

错误处理

If Alpaca MCP Server is not connected:
  1. Inform user that Alpaca integration is required
  2. Provide setup instructions from references/alpaca-mcp-setup.md
  3. Offer alternative: manual data entry (less ideal, user provides CSV of positions)
If API returns incomplete data:
  • Proceed with available data
  • Note limitations in report
  • Suggest manual verification for missing positions
If position data seems stale:
  • Flag the issue
  • Recommend refreshing connection or checking Alpaca status
  • Proceed with analysis but caveat findings
If user has no positions:
  • Acknowledge empty portfolio
  • Offer portfolio construction guidance instead of analysis
  • Suggest using value-dividend-screener or us-stock-analysis for stock ideas
若Alpaca MCP Server未连接:
  1. 告知用户需要Alpaca集成
  2. 提供references/alpaca-mcp-setup.md中的设置说明
  3. 提供替代方案:手动录入数据(不太理想,用户提供头寸CSV文件)
若API返回数据不完整:
  • 使用可用数据继续分析
  • 在报告中注明局限性
  • 建议用户手动验证缺失头寸
若头寸数据似乎过期:
  • 标记该问题
  • 建议刷新连接或检查Alpaca状态
  • 继续分析但对结果附加说明
若用户没有头寸:
  • 确认投资组合为空
  • 提供投资组合构建指导而非分析
  • 建议使用value-dividend-screener或us-stock-analysis获取股票建议

Advanced Features

高级功能

Tax-Loss Harvesting Opportunities

税损收割机会

Identify positions with unrealized losses suitable for tax-loss harvesting:
  • Positions with losses >5%
  • Holding period considerations (avoid wash sale rule)
  • Replacement security suggestions (similar but not substantially identical)
识别适合税损收割的未实现亏损头寸:
  • 亏损超过5%的头寸
  • 持有期限考量(避免洗售规则)
  • 替代证券建议(相似但非实质相同)

Dividend Income Analysis

股息收益分析

For portfolios with dividend-paying stocks:
  • Estimate annual dividend income
  • Dividend growth rate trajectory
  • Dividend coverage and sustainability
  • Yield on cost for long-term holdings
针对含股息股票的投资组合:
  • 估算年度股息收益
  • 股息增长率轨迹
  • 股息覆盖与可持续性
  • 长期持仓的成本收益率

Correlation Matrix

相关性矩阵

For portfolios with 5-20 positions:
  • Estimate correlation between major positions
  • Identify redundant positions (correlation >0.8)
  • Suggest diversification improvements
针对含5-20个头寸的投资组合:
  • 估算主要头寸之间的相关性
  • 识别冗余头寸(相关性>0.8)
  • 建议分散化改进方案

Scenario Analysis

情景分析

Model portfolio behavior under different scenarios:
  • Bull Market (+20% equity appreciation)
  • Bear Market (-20% equity decline)
  • Sector Rotation (Tech weakness, Value strength)
  • Rising Rates (Impact on growth stocks and bonds)
模拟不同情景下的投资组合表现:
  • 牛市(股票上涨20%)
  • 熊市(股票下跌20%)
  • 板块轮动(科技走弱、价值走强)
  • 利率上升(对成长股与债券的影响)

Example Queries

示例查询

Basic Portfolio Review:
  • "Analyze my portfolio"
  • "Review my positions"
  • "How's my portfolio doing?"
Allocation Analysis:
  • "What's my asset allocation?"
  • "Am I too concentrated in tech?"
  • "Show me my sector breakdown"
Risk Assessment:
  • "Is my portfolio too risky?"
  • "What's my portfolio beta?"
  • "What are my biggest risks?"
Rebalancing:
  • "Should I rebalance?"
  • "What should I buy or sell?"
  • "How can I improve diversification?"
Performance:
  • "What are my best and worst positions?"
  • "How am I performing vs the market?"
  • "Which stocks are winning and losing?"
Position-Specific:
  • "Should I sell [SYMBOL]?"
  • "Is [SYMBOL] overweight in my portfolio?"
  • "What should I do with [SYMBOL]?"
基础投资组合审查:
  • "分析我的投资组合"
  • "审查我的头寸"
  • "我的投资组合表现如何?"
配置分析:
  • "我的资产配置情况如何?"
  • "我是不是过于集中在科技板块?"
  • "展示我的板块分布"
风险评估:
  • "我的投资组合风险太高吗?"
  • "我的投资组合Beta值是多少?"
  • "我最大的风险是什么?"
再平衡:
  • "我应该再平衡吗?"
  • "我应该买入或卖出什么?"
  • "我如何提升分散度?"
业绩:
  • "我表现最好和最差的头寸是什么?"
  • "我与市场相比表现如何?"
  • "哪些股票在盈利哪些在亏损?"
特定头寸:
  • "我应该卖出[代码]吗?"
  • "[代码]在我的投资组合中是不是超配了?"
  • "我应该如何处理[代码]?"

Limitations and Disclaimers

局限性与免责声明

Include in all reports:
This analysis is for informational purposes only and does not constitute financial advice. Investment decisions should be made based on individual circumstances, risk tolerance, and financial goals. Past performance does not guarantee future results. Consult with a qualified financial advisor before making investment decisions.
Data accuracy depends on Alpaca API and third-party market data sources. Verify critical information independently. Tax implications are estimates only; consult a tax professional for specific guidance.
所有报告需包含:
本分析仅供参考,不构成财务建议。投资决策应基于个人情况、风险承受力与财务目标。过往业绩不代表未来表现。在做出投资决策前,请咨询合格的财务顾问。
数据准确性依赖Alpaca API与第三方市场数据源。请独立验证关键信息。税务影响仅为估算;具体指导请咨询税务专业人士。