Skip to content
Finance
Skill

/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,

From plugin
claude-trading-skills
6.9k74 skills2 agents2 commands

Claude Code

$ npx -y skills add tradermonty/claude-trading-skills --skill portfolio-manager --agent claude-code

SKILL.md

portfolio-manager.SKILL.md
name: portfolio-manager
description: 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.

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.

The full brokerage analysis uses Alpaca's API through MCP for live portfolio data. The `portfolio-holdings-review` workflow provides a limited offline allocation review from CSV or saved Alpaca positions JSON. It reports gross holdings weights and per-position unrealized P&L; account-wide risk analysis uses the full brokerage workflow.

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

Limited Offline CSV Review

For a local USD equity holdings snapshot without credentials, read `references/csv-holdings-review.md` and run `scripts/review_csv.py` with an explicit source timestamp. Use the bundled fictional CSV to verify offline execution. This produces gross allocation and per-position unrealized P&L only; it cannot measure account exposure, leverage or historical performance. Keep personal holdings and reports local. Do not fetch brokerage data or continue the full workflow for this limited mode. Ask Navigator for "review my portfolio from CSV" to select `portfolio-holdings-review`. The recommendation does not read the file: provide the real input path and source timestamp to the CLI before review. Saved Alpaca positions JSON can use `--input-format alpaca-json` for the same limited calculations; it does not fetch broker data. Both formats follow the shared output schema in `assets/holdings-review.schema.json`.

Alpaca MCP Server Setup (Full Brokerage Analysis)

The full brokerage analysis 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`.

REST Fallback Connection Check

Run the connection check from the repository root. Use paper credentials first; never paste credentials into a report or commit them to the repository.

export ALPACA_API_KEY="<alpaca-key-id>"
export ALPACA_SECRET_KEY="<alpaca-secret-key>"
export ALPACA_PAPER="true"
uv run python skills/portfolio-manager/scripts/check_alpaca_connection.py

The command writes a redacted diagnostic summary to stdout and returns zero only when the account and positions endpoints succeed. It does not create a report file or place orders.

Workflow

Step 1: Fetch Portfolio Data via Alpaca MCP or REST fallback

Use Alpaca MCP Server tools to gather current portfolio information when available. In scheduled Hermes jobs, MCP tools may not be exposed even when Alpaca credentials are present; in that case, use the Alpaca REST API directly with `ALPACA_API_KEY`, `ALPACA_SECRET_KEY`, and `ALPACA_PAPER`.

Read `references/alpaca-data-fetch.md` (section "Step 1 detail: account, positions and portfolio history requests") when fetching data. It holds the MCP tool and REST fallback endpoints and headers for steps 1.1 to 1.3.

**Scheduled-job fallback discipline:**

  • Clearly label the source as `Alpaca REST fallback` rather than MCP.
  • Use `ALPACA_PAPER=true` to choose paper endpoint; otherwise use live endpoint.
  • Still validate that long market value plus cash approximately reconciles to equity, and highlight margin/leverage if `long_market_value > equity`.
  • For weekly core portfolio cron jobs, compute exposure using equity as the denominator as well as gross market value: `gross_long_exposure = long_market_value / equity`, `cash_pct = cash / equity`, and explicitly flag margin-funded portfolios when gross exposure is materially above 100% or cash is negative. Do not let sector weights look benign by using only gross-long denominator when the account is levered.
  • When the request emphasizes dividend holdings or forced-review triggers, build normalized monitor input from the live holdings and hand it to `kanchi-dividend-review-monitor` rather than treating dividend review as a narrative-only section. Also build tax-planning input for `kanchi-dividend-us-tax-accounting` when account-location notes are requested; label it degraded if account type or holding-period windows are unavailable.

**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)

Reconcile holdings before weekly allocation review

For `core-portfolio-weekly`, follow [`references/position-reconciliation.md`](references/position-reconcili

Read more
@tradermonty
Ships withclaude-trading-skills

Data handling: Privacy policy · Security policy Claude Trading Skills started as a personal project to use AI to improve my own trading process. Claude Trading Skills is a Claude Skills-based trading workflow toolkit for time-constrained individual investors.

6.9k74 skills2 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
6.9k
Star history of tradermonty/claude-trading-skills on GitHub, a chart by star-history.com

Other skills on claude-trading-skills.

More skills from other plugins.

ccxt-cli

ccxt-cli

CCXT command-line interface (ccxt-cli) for interacting with 100+ cryptocurrency exchanges directly from the terminal — no code…

ccxt9d45k
@ccxt@ccxtInstall Skill

Questions about portfolio-manager.

Which coding agents can use portfolio-manager?
portfolio-manager installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.