portfolio-managerComprehensive portfolio analysis using Alpaca MCP Server integration to fetch holdings and positions, then analyze asset allocation, risk metrics, individual stock positions, diversification, and generate rebalancing recommendations. Use when user requests portfolio review, position analysis, risk assessment, performance evaluation, or rebalancing suggestions for their brokerage account.
Install via ClawdBot CLI:
clawdbot install Veeramanikandanr48/portfolio-managerAnalyze 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.
Invoke this skill when the user requests:
This skill requires Alpaca MCP Server to be configured and connected. The MCP server provides access to:
MCP Server Tools Used:
get_account_info - Fetch account equity, buying power, cash balanceget_positions - Retrieve all current positions with quantities, cost basis, market valueget_portfolio_history - Historical portfolio performance dataIf Alpaca MCP Server is not connected, inform the user and provide setup instructions from references/alpaca_mcp_setup.md.
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:
For each position in the portfolio, gather additional market data and fundamentals:
2.1 Current Market Data:
2.2 Fundamental Data:
Use WebSearch or available market data APIs to fetch:
2.3 Technical Analysis:
Perform comprehensive portfolio analysis using frameworks from reference files:
Read references/asset-allocation.md for allocation frameworks
Analyze current allocation across multiple dimensions:
By Asset Class:
By Sector:
By Market Cap:
By Geography:
Output Format:
## Asset Allocation
### Current Allocation vs Target
| Asset Class | Current | Target | Variance |
|-------------|---------|--------|----------|
| US Equities | XX.X% | YY.Y% | +/- Z.Z% |
| ... |
### Sector Breakdown
[Pie chart description or table with sector percentages]
### Top 10 Holdings
| Rank | Symbol | % of Portfolio | Sector |
|------|--------|----------------|--------|
| 1 | AAPL | X.X% | Technology |
| ... |
Read references/diversification-principles.md for diversification theory
Evaluate portfolio diversification quality:
Position Concentration:
Sector Concentration:
Correlation Analysis:
Number of Positions:
Output:
## 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]
Read references/portfolio-risk-metrics.md for risk measurement frameworks
Calculate and interpret key risk metrics:
Volatility Measures:
Downside Risk:
Risk Concentration:
Tail Risk:
Output:
## 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 Portfolio | Beta | Risk 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)
Evaluate portfolio performance using available data:
Absolute Returns:
Time-Weighted Returns (if history available):
Position-Level Performance:
Output:
## Performance Review
**Total Portfolio Value:** $XXX,XXX
**Total Unrealized P&L:** $XX,XXX (+XX.X%)
**Cash Balance:** $XX,XXX (XX% of portfolio)
**Best Performers:**
| Symbol | Gain | Position Value |
|--------|------|----------------|
| [TICKER] | +XX.X% | $XX,XXX |
| ... |
**Worst Performers:**
| Symbol | Loss | Position Value |
|--------|------|----------------|
| [TICKER] | -XX.X% | $XX,XXX |
| ... |
**Performance vs Benchmark (if available):**
- Portfolio return: +X.X%
- S&P 500 return: +Y.Y%
- Alpha: +/- Z.Z%
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:
4.2 Valuation Assessment:
4.3 Technical Health:
4.4 Position Sizing:
4.5 Action Recommendation:
Output per position:
### [SYMBOL] - [Company Name] (XX.X% of portfolio)
**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]
Read references/rebalancing-strategies.md for rebalancing approaches
Generate specific rebalancing recommendations:
5.1 Identify Rebalancing Triggers:
5.2 Develop Rebalancing Plan:
Positions to TRIM:
Positions to ADD:
Cash Deployment:
5.3 Prioritization:
Rank rebalancing actions by priority:
Output:
## 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
### 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)
#### 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
#### CASH DEPLOYMENT
**Current Cash:** $XX,XXX (XX% of portfolio)
- **Recommendation:** [Deploy / Keep for opportunities / Reduce to X%]
- **Suggested Allocation:** [Distribution across sectors/stocks]
### 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]
Create comprehensive markdown report saved to repository root:
Filename: portfolio_analysis_YYYY-MM-DD.md
Report Structure:
# Portfolio Analysis Report
**Account:** [Account type if available]
**Report Date:** YYYY-MM-DD
**Portfolio Value:** $XXX,XXX
**Total P&L:** $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
---
## Holdings Overview
[Summary table of all positions]
---
## Asset Allocation
[Section from Step 3.1]
---
## Diversification Analysis
[Section from Step 3.2]
---
## Risk Assessment
[Section from Step 3.3]
---
## Performance Review
[Section from Step 3.4]
---
## Position Analysis
[Detailed analysis of top 10-15 positions from Step 4]
---
## Rebalancing Recommendations
[Section from Step 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]
---
## Appendix: Full Holdings
[Complete table with all positions and metrics]
Be prepared to answer follow-up questions:
Common Questions:
"Why should I sell [SYMBOL]?"
"What should I buy instead?"
"What's my biggest risk?"
"How does my portfolio compare to [benchmark]?"
"Should I rebalance now or wait?"
"Can you analyze [specific position] in more detail?"
This skill includes reference allocation models for different investor profiles:
Read references/target-allocations.md for detailed models:
Each model includes:
Use these as comparison benchmarks when user hasn't specified their allocation strategy.
If user's target allocation is unknown, assess appropriate risk profile based on:
Read references/risk-profile-questionnaire.md for assessment framework
Tone and Style:
Data Presentation:
Recommendation Clarity:
Visual Descriptions:
Load these references as needed during analysis:
references/alpaca-mcp-setup.md
references/asset-allocation.md
references/diversification-principles.md
references/portfolio-risk-metrics.md
references/position-evaluation.md
references/rebalancing-strategies.md
references/target-allocations.md
references/risk-profile-questionnaire.md
If Alpaca MCP Server is not connected:
If API returns incomplete data:
If position data seems stale:
If user has no positions:
Identify positions with unrealized losses suitable for tax-loss harvesting:
For portfolios with dividend-paying stocks:
For portfolios with 5-20 positions:
Model portfolio behavior under different scenarios:
Basic Portfolio Review:
Allocation Analysis:
Risk Assessment:
Rebalancing:
Performance:
Position-Specific:
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.
Generated Mar 1, 2026
An individual investor with a self-managed brokerage account wants a comprehensive analysis of their current holdings. They seek insights into asset allocation, risk exposure, and diversification to ensure their portfolio aligns with their long-term financial goals and risk tolerance.
A financial advisor uses this skill to generate detailed portfolio reports for clients during quarterly reviews. It automates data fetching from Alpaca, performs analysis on asset allocation and risk metrics, and provides rebalancing recommendations to support advisor-client discussions.
An investor notices their portfolio has drifted from target allocations due to market movements. They use this skill to analyze current positions, assess deviations, and receive data-driven rebalancing suggestions on which stocks to buy or sell to restore desired allocations.
A novice investor with a recently built portfolio requests a risk evaluation. The skill analyzes concentration risks, sector exposures, and individual stock volatility to educate the user on potential downsides and diversification gaps in their holdings.
Offer this skill as part of a premium subscription service for individual investors, providing automated portfolio analysis and rebalancing alerts. Revenue is generated through monthly or annual fees, with tiers based on features like advanced risk metrics or historical performance tracking.
License the skill to financial advisory firms as a white-labeled SaaS tool. Advisors integrate it into their workflow to enhance client reporting and decision-making, with pricing based on the number of user seats or assets under management analyzed.
Embed the skill into a broader investment platform, offering basic portfolio analysis for free to attract users. Monetize through premium upgrades for detailed rebalancing recommendations, advanced analytics, or integration with automated trading via Alpaca's API.
💬 Integration Tip
Ensure the Alpaca MCP Server is properly configured and connected before use to fetch real-time portfolio data; refer to setup documentation for authentication and tool access.
Manage Trello boards, lists, and cards via the Trello REST API.
Sync and query CalDAV calendars (iCloud, Google, Fastmail, Nextcloud, etc.) using vdirsyncer + khal. Works on Linux.
Manage tasks and projects in Todoist. Use when user asks about tasks, to-dos, reminders, or productivity.
Master OpenClaw's timing systems. Use for scheduling reliable reminders, setting up periodic maintenance (janitor jobs), and understanding when to use Cron v...
Calendar management and scheduling. Create events, manage meetings, and sync across calendar providers.
Kanban-style task management dashboard for AI assistants. Manage tasks via CLI or dashboard UI. Use when user mentions tasks, kanban, task board, mission con...