From us-stock-analysis
Reviews investment portfolio performance, asset allocation, and holdings. Provides a structured framework for analysis and optimization recommendations.
How this skill is triggered — by the user, by Claude, or both
Slash command
/us-stock-analysis:portfolio-reviewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Comprehensive portfolio analysis and optimization recommendations.
Comprehensive portfolio analysis and optimization recommendations.
Start with a high-level summary before diving into details:
Absolute Returns
Risk-Adjusted Returns
Drawdown Analysis
Volatility Metrics
Current Allocation Breakdown
Geographic Diversification
Sector and Industry Weights
Market Cap Distribution
Individual Position Analysis
Position Sizing Discipline
Overlap and Redundancy
Cost Efficiency
Score each concentration dimension independently, then aggregate:
Single-Stock Concentration
| Position Weight | Score | Status |
|---|---|---|
| < 5% | 0 | OK |
| 5%–10% | 1 | Monitor |
| 10%–15% | 2 | Warning |
| 15%–20% | 3 | High Risk |
| > 20% | 5 | Red Flag — immediate review required |
Sector Concentration
| Largest Sector Weight | Score | Status |
|---|---|---|
| < 20% | 0 | Diversified |
| 20%–25% | 1 | Slight tilt |
| 25%–30% | 2 | Elevated |
| 30%–40% | 3 | Warning |
| > 40% | 5 | Concentration risk — rebalance urged |
Factor Concentration
| Factor Tilt Condition | Score | Note |
|---|---|---|
| Mixed factors | 0 | Balanced |
| Mild single-factor tilt | 1 | Acceptable with thesis |
| Strong single-factor tilt (>70% one factor) | 3 | Vulnerable to factor drawdown |
| Pure single-factor portfolio (>90%) | 5 | Maximum factor risk |
Common factor concentration traps: all high-growth names (P/E > 40), all micro/small-cap, all rate-sensitive (long-duration bonds + REITs + utilities together).
Aggregate Concentration Score
Measuring Diversification Benefit
Portfolio volatility reduction vs. average asset volatility signals diversification quality. If portfolio vol ≈ average position vol, diversification benefit is near zero.
Diversification Ratio = (Weighted average individual vol) / (Portfolio vol)
Pairwise Correlation Heatmap Template
For each pair of top-10 holdings, estimate 1-year rolling correlation:
AAPL MSFT GOOGL AMZN NVDA JPM XOM GLD
AAPL 1.00 0.85 0.82 0.79 0.76 0.42 0.15 -0.10
MSFT 0.85 1.00 0.84 0.80 0.78 0.41 0.14 -0.12
GOOGL 0.82 0.84 1.00 0.81 0.73 0.39 0.12 -0.09
AMZN 0.79 0.80 0.81 1.00 0.70 0.37 0.10 -0.08
NVDA 0.76 0.78 0.73 0.70 1.00 0.35 0.11 -0.07
JPM 0.42 0.41 0.39 0.37 0.35 1.00 0.48 0.05
XOM 0.15 0.14 0.12 0.10 0.11 0.48 1.00 0.30
GLD -0.10 -0.12 -0.09 -0.08 -0.07 0.05 0.30 1.00
Color code: > 0.75 = HIGH (red), 0.50–0.75 = MODERATE (yellow), < 0.50 = LOW (green)
Effective Number of Positions (ENP)
ENP = 1 / sum(wi²) where wi = weight of position i
Interpretation:
Correlated Cluster Identification
Group holdings with pairwise correlation > 0.75 into clusters. Each cluster behaves as a single economic bet. Example clusters: Big Tech, Energy Majors, Regional Banks, Long-Duration Fixed Income.
Actionable rule: no single cluster should exceed 35% of portfolio weight.
Identification Criteria
Screen all positions for:
Wash-Sale Rule (30-Day Rule)
Do not repurchase the same or substantially identical security within 30 days before or after the sale. Alternatives to maintain exposure during the 30-day window: sell XOM, buy CVX; sell QQQ, buy VGT; sell one S&P 500 ETF for another.
Net Tax Benefit Calculation
Gross Tax Saving = Realized Loss × Marginal Tax Rate
Transaction Cost = (Bid-Ask Spread + Commission) × 2
Net Benefit = Gross Tax Saving − Transaction Cost
Harvest if: Net Benefit > 0 AND loss > $500 minimum threshold
Tax-Loss Harvest Decision Table
| Condition | Action |
|---|---|
| Unrealized loss > 10%, gains to offset, loss > $500 | Harvest — sell and replace with correlated substitute |
| Unrealized loss 5–10%, gains to offset | Evaluate: transaction cost vs. tax saving |
| Unrealized loss > 10%, no offsetting gains | Hold or carry forward — harvest at year-end if gains materialize |
| Position held < 30 days | Wait for 30-day window to avoid wash-sale |
| Loss < $500 | Skip — transaction costs exceed benefit |
| Short-term gain offset | Priority harvest — short-term rates are higher |
Annual Harvest Tracking
Maintain a log: position, cost basis, current value, loss amount, harvest date, replacement security, re-entry date. Review in October before year-end to maximize benefit.
Six-Factor Portfolio Map
For each holding, estimate factor scores (1–5 scale, 3 = neutral):
| Factor | Measurement Proxy | Low (1–2) | Neutral (3) | High (4–5) |
|---|---|---|---|---|
| Value | P/E, P/B vs. sector | Expensive | Fair | Cheap |
| Growth | Revenue/EPS CAGR 3Y | < 5% | 5–15% | > 15% |
| Momentum | 12-1 month return | Bottom quartile | Middle | Top quartile |
| Quality | ROE, Debt/EBITDA | Low ROE, high debt | Average | High ROE, low debt |
| Low-Vol | 1Y realized vol | High vol | Average | Low vol |
| Size | Market cap | Mega-cap | Mid-cap | Small-cap |
Portfolio-Level Factor Score
Weight each holding's factor score by portfolio weight. Compare to S&P 500 baseline (all factors = 3.0):
Factor Portfolio Score Benchmark Active Tilt
Value 2.1 3.0 -0.9 (Growth tilt)
Growth 4.2 3.0 +1.2 (Strong growth)
Momentum 3.8 3.0 +0.8 (Slight momentum)
Quality 3.5 3.0 +0.5 (Slight quality)
Low-Vol 2.3 3.0 -0.7 (Higher volatility)
Size 2.4 3.0 -0.6 (Large-cap tilt)
Unintended Factor Tilt Detection
Flag when any active tilt exceeds ±1.0: this signals an unintended concentration that may not be in the investment thesis. Common unintended tilts: growth investors inadvertently loading up on momentum; dividend investors loading up on low-vol (rate sensitive); index investors with large-cap tilt through tech sector overweight.
Benchmark Factor Comparison
Use the factor tilts to explain return difference from benchmark. Growth tilt +1.2 in a value-outperforming market explains underperformance. Momentum tilt in a mean-reverting market increases drawdown risk.
When to Rebalance
Three trigger systems — use the one matching the investor's approach:
Threshold-Based (Recommended for most investors)
Calendar-Based
Factor-Based
Cost-Benefit Analysis
Before executing any rebalance, verify it clears the cost hurdle:
Expected Drift Cost (annual) = Excess vol from drift × Sharpe ratio penalty
Transaction Cost = Commission + (Bid-Ask Spread × Trade Size) + Tax Impact
Rebalance if: Drift Cost > Transaction Cost × 2 (safety margin)
Rule of thumb: do not rebalance positions with < $2,000 drift — transaction costs exceed benefit.
Rebalancing Decision Flowchart
START
|
v
Is drift > threshold?
NO --> Monitor next period
YES --> Is account taxable?
YES --> Are there harvesting opportunities?
YES --> Combine harvest + rebalance
NO --> Evaluate tax cost of rebalance
Tax cost > drift benefit? --> Delay
Tax cost < drift benefit? --> Rebalance
NO --> Rebalance immediately (no tax friction)
Tax-Smart Rebalancing Order
Per-Position Maximum Drawdown
For each holding, calculate the worst peak-to-trough decline over the analysis window:
| Position | Max Drawdown | Recovery Time | Current From Peak | Risk Level |
|---|---|---|---|---|
| Example | -35% | 14 months | -8% | Medium |
Flag positions with max drawdown > 50%: high-volatility securities require smaller position sizes to avoid outsized portfolio impact.
Portfolio-Level Value at Risk (VaR)
95% VaR (1-day): the loss not exceeded on 95% of trading days.
Parametric VaR (simplified) = Portfolio Value × Portfolio Daily Vol × 1.645
Example: $500,000 portfolio, daily vol 0.9% → 95% VaR = $500,000 × 0.009 × 1.645 = $7,403/day
Report also: 99% VaR (multiply by 2.326 / 1.645) and 10-day VaR (multiply by √10).
Contribution to Portfolio Volatility
Each position's marginal contribution to total portfolio volatility:
Marginal Vol Contribution (i) = weight(i) × Cov(i, portfolio) / Portfolio Vol
% Vol Contribution = Marginal Vol Contribution / Portfolio Vol × 100
Target: no single position contributes > 20% of total portfolio volatility unless it is a deliberate high-conviction overweight.
Risk Budget Allocation Table
| Position | Weight % | Vol Contribution % | Risk Budget Used | Status |
|---|---|---|---|---|
| Ideal | ≤ 10% | ≤ 15% | ≤ budget | OK |
| Flag | > 10% | > 20% | Over budget | Trim |
Stress Test Scenarios
Apply historical shock scenarios to estimate portfolio impact:
For each scenario: estimate portfolio decline, identify worst-hit positions, confirm portfolio can withstand the scenario without forcing a distressed sale.
Rebalancing Actions
Diversification Improvements
Underperformer Review
Upgrade Candidates
Deliver the review as a structured report with these sections:
Focus on actionable insights aligned with the investor's stated objectives and risk tolerance. Flag any positions or allocations that conflict with the investor profile.
Before finalizing the analysis, verify:
All analysis concludes with this standardized block:
╔══════════════════════════════════════════════╗
║ INVESTMENT SIGNAL ║
╠══════════════════════════════════════════════╣
║ Signal: BULLISH / NEUTRAL / BEARISH ║
║ Confidence: HIGH / MEDIUM / LOW ║
║ Horizon: SHORT / MEDIUM / LONG-TERM ║
║ Score: X.X / 10 ║
╠══════════════════════════════════════════════╣
║ Action: BUY / HOLD / SELL ║
║ Conviction: STRONG / MODERATE / WEAK ║
╚══════════════════════════════════════════════╝
Score Guide: 8.0–10.0 Strongly Bullish | 6.0–7.9 Moderately Bullish | 4.0–5.9 Neutral | 2.0–3.9 Moderately Bearish | 0.0–1.9 Strongly Bearish Confidence: HIGH (strong data, clear signals) | MEDIUM (mixed signals) | LOW (limited data, conflicting signals) Horizon: SHORT-TERM (1 week–3 months) | MEDIUM-TERM (3 months–1 year) | LONG-TERM (1+ years)
npx claudepluginhub yennanliu/investskill --plugin us-stock-analysisFetches portfolio holdings from Alpaca MCP Server, then analyzes asset allocation, risk metrics, diversification, and generates rebalancing recommendations. Use for portfolio review or position analysis.
Fetches portfolio holdings from Alpaca via MCP and analyzes asset allocation, risk metrics, diversification, and rebalancing needs.
Builds diversified portfolios using correlation analysis, efficient frontier construction, and factor-based diversification. Covers portfolio variance, risk contributions, minimum variance portfolios, and correlation effects.