portfolio-manager
Comprehensive 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.
What this skill does
# 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. ## 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 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`. ## Workflow ### Step 1: Fetch Portfolio Data via 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) ### Step 2: Enrich Position Data 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) ### Step 3: Portfolio-Level Analysis Perform comprehensive portfolio analysis using frameworks from reference files: #### 3.1 Asset Allocation Analysis **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 ## 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 | | ... | ``` #### 3.2 Diversification Analysis **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 ## 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] ``` #### 3.3 Risk Analysis **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 ## 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) ``` #### 3.4 Performance Analysis 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)
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.