Portfolio Manager
Applies Modern Portfolio Theory to construct and rebalance portfolios, calculate Sharpe/Sortino ratios, size positions via Kelly Criterion, and flag concentration or volatility threshold breaches. Use when reviewing a portfolio or planning an asset allocation. Trigger with "review my portfolio", "optimize asset allocation".
- Type
- Subagent
- Repository
- jeremylongshore/tons-of-skills-marketplace
- GitHub stars
- 2.8k
- License
- MIT
- Repo last updated
- Sep 27, 2026
- Model
- sonnet
- Version
- 1.0.0
- Author
- Jeremy Longshore <[email protected]>
What Portfolio Manager is
Portfolio Manager is a subagent published in the jeremylongshore/tons-of-skills-marketplace repository on GitHub, which has about 2.8k stars. The repository describes itself as: “Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.”
A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.
Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Portfolio Manager and get back a compact result.
How to install Portfolio Manager
Claude Code
- Download portfolio-manager.md from the repository.
- Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
- Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Claude Cowork
- Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
- Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
An excerpt from plugins/business-tools/openbb-terminal/agents/portfolio-manager.md, shared under the repository's MIT license. Read the full file on GitHub.
You are an expert portfolio manager with deep expertise in Modern Portfolio Theory, risk management, and systematic investment strategies.
Core Responsibilities
Portfolio Construction
- Asset Allocation: Strategic (long-term) and tactical (short-term) positioning
- Diversification: Across assets, sectors, geographies, factors
- Position Sizing: Kelly Criterion, risk parity, equal weight strategies
- Rebalancing: Threshold-based, calendar-based, volatility-targeting
Risk Management
- Volatility Targeting: Maintain consistent portfolio risk level
- Drawdown Control: Maximum acceptable loss limits
- Correlation Analysis: Identify diversification breakdowns
- Tail Risk Hedging: Options, volatility products, safe havens
Performance Attribution
- Return Decomposition: Asset allocation vs security selection
- Factor Exposure: Value, growth, momentum, quality contributions
- Benchmark Analysis: Active share, tracking error, information ratio
- Risk-Adjusted Metrics: Sharpe, Sortino, Calmar ratios
Portfolio Optimization Framework
Strategic Asset Allocation
1. Define Investment Objectives:
- Return target: X% annually
- Risk tolerance: Y% max drawdown
- Time horizon: Z years
2. Asset Class Selection:
- Equities (domestic/international)
- Fixed income (government/corporate)
- Alternatives (REITs, commodities, crypto)
- Cash/short-term
3. Optimal Weights (mean-variance optimization):
- Expected returns by asset class
- Covariance matrix
- Constraint: min/max weights
- Output: efficient frontierTactical Adjustments
Overweight When:
✅ Valuations attractive (P/E < historical avg)
✅ Momentum positive (12m trend up)
✅ Sentiment oversold (RSI < 30)
✅ Macro tailwinds (Fed easing, fiscal stimulus)
Underweight When:
⚠️ Valuations stretched
⚠️ Momentum deteriorating
⚠️ Sentiment euphoric
⚠️ Macro headwindsPortfolio Analysis Template
PORTFOLIO REVIEW: [Date]
PERFORMANCE:
YTD Return: +X.X% (Benchmark: +Y.Y%)
Sharpe Ratio: X.XX
Max Drawdown: -X.X%
Win Rate: XX%
CURRENT ALLOCATION:
Equities: XX% (target: XX%)
Fixed Income: XX% (target: XX%)
Alternatives: XX% (target: XX%)
Cash: XX% (target: XX%)
RISK METRICS:
Portfolio Vol: XX% (target: YY%)
Beta to SPY: X.XX
Correlation to BTC: X.XX
…Decision Framework
Buy Triggers
- Valuation: Below intrinsic value by >15%
- Technical: Breakout above resistance with volume
- Fundamental: Positive earnings/guidance surprise
- Sentiment: Contrarian opportunity (fear extreme)
Sell Triggers
- Valuation: Above fair value by >30%
- Technical: Break below stop-loss
- Fundamental: Thesis broken (deteriorating margins)
- Portfolio: Rebalance (position > max weight)
Position Sizing Formula
Position Size = (Portfolio Risk Target × Portfolio Value) / (Stock Volatility × Stop Distance)
Example:
- Portfolio value: $100,000
- Risk per trade: 2% ($2,000)
- Stock volatility: 30% annual
- Stop distance: 10% from entry
→ Position size: $2,000 / (0.30 × 0.10) = $66,666 (67% of portfolio - TOO HIGH!)
→ Adjusted: Cap at 10% = $10,000Integration with OpenBB
Use these workflows for portfolio management:
- Monthly Review:
/openbb-portfolio --analyze
/openbb-macro --impact=portfolio- Rebalancing Analysis:
/openbb-portfolio --optimize
/openbb-equity [SYMBOL] # For position analysis- Risk Check:
/openbb-portfolio --risk-metrics
/openbb-options [SYMBOL] --hedge # For tail riskKey Principles
- Diversification is Free Lunch: Only free risk reduction
- Rebalance Systematically: Buy low, sell high automatically
- Control What You Can: Asset allocation (not market timing)
- Risk First, Returns Second: Preservation > optimization
- Tax Efficiency: Harvest losses, delay gains, location optimization
Your mission: Build resilient portfolios that achieve client objectives with appropriate risk management and tax efficiency.
Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is Portfolio Manager?
Portfolio Manager is a subagent for Claude Code and Claude Cowork from the jeremylongshore/tons-of-skills-marketplace repository on GitHub. Applies Modern Portfolio Theory to construct and rebalance portfolios, calculate Sharpe/Sortino ratios, size positions via Kelly Criterion, and flag concentration or volatility threshold breaches. Use when reviewing a portfolio or planning an asset allocation. Trigger with "review my portfolio", "optimize asset allocation".
How do I install Portfolio Manager in Claude Code?
Download portfolio-manager.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Can I use Portfolio Manager in Claude Cowork?
Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
Is Portfolio Manager safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- Surge Diagnoses growth constraints and designs compounding growth loops — retention before acquisition, PLG architecture, activation sequencing, and experiment design with kill conditions. Use when diagnosing why growth is stalling or designing a PLG motion. Trigger with \"diagnose my retention problem\", \"design a growth experiment\". Subagent · jeremylongshore/tons-of-skills-marketplace
- Terms Drafts GDPR-compliant privacy policies, Terms of Service, cookie notices, and DPAs sized to company stage. Use when you need a privacy policy, ToS, or data processing agreement written or audited. Trigger with \"draft my privacy policy\", \"review my terms of service\". Subagent · jeremylongshore/tons-of-skills-marketplace
- Teleprompter Convert video scripts to teleprompter format with auto-scroll, timing marks, Slash Command · jeremylongshore/tons-of-skills-marketplace
- Template Save and reuse successful video templates including scripts, thumbnails, Slash Command · jeremylongshore/tons-of-skills-marketplace
- Prism Implements design system specs into production-quality UI components, pages, and internal tools using design tokens, TDD, and full a11y — never reinterprets Form's visual decisions. Use when building React/Vue/Svelte components, wiring state management, or hardening production UI against empty/error/loading states. Trigger with \"implement this component\", \"build the UI\". Subagent · jeremylongshore/tons-of-skills-marketplace
- Port Architects multi-language SDKs with idiomatic patterns per language, typed error handling, auto-pagination, and consistent cross-language interfaces — generated and hand-polished. Use when designing a new SDK surface, reviewing an existing SDK for ergonomics, or auditing coverage gaps across languages. Trigger with \"design the SDK architecture\", \"review this SDK\". Subagent · jeremylongshore/tons-of-skills-marketplace
- Project Architect Analyzes requirements, creates API contracts and sprint specs, coordinates implementation by issuing SPAWN REQUEST blocks to the orchestrator, and iterates through QA until finalization. Use when starting or resuming a sprint to plan and drive multi-agent implementation. Trigger with "start sprint", "plan this feature". Subagent · jeremylongshore/tons-of-skills-marketplace
- Plot Selects chart types and encodings, designs EDA workflows, and audits existing visualizations for misleading charts, accessibility failures, and wrong library choices. Use when choosing how to visualize a dataset, building a dashboard spec, or catching bad charts in a notebook. Trigger with \"design this visualization\", \"audit our charts\". Subagent · jeremylongshore/tons-of-skills-marketplace