MCPInstall

portfolio-management

Manages investment portfolios with quantitative models, risk metrics, and optimization algorithms.

Installs
124
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/alphaonedev/openclaw-graph --skill portfolio-management
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads portfolio-management automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

portfolio-management

Purpose

This skill enables the AI to manage investment portfolios using quantitative models, calculate risk metrics like Value at Risk (VaR), and apply optimization algorithms such as mean-variance optimization. It processes portfolio data to generate actionable insights, supporting decisions in finance by integrating with data sources and executing trades based on predefined strategies.

When to Use

Use this skill for tasks involving portfolio rebalancing, risk assessment, or performance analysis in financial contexts. Apply it when handling user queries about investment strategies, such as diversifying assets or responding to market volatility. Ideal for scenarios with real-time data feeds or when optimizing allocations under constraints like budget limits.

Key Capabilities

  • Quantitative Models: Implement models like CAPM or Black-Litterman; e.g., calculate expected returns with claw portfolio model capm --assets AAPL,GOOG.
  • Risk Metrics: Compute VaR or Sharpe ratio; use API endpoint GET /api/portfolios/risk/var?confidence=0.95 to get 95% VaR for a portfolio.
  • Optimization Algorithms: Run mean-variance optimization; configure via JSON file: {"assets": ["AAPL", "MSFT"], "weights": [0.5, 0.5]}.
  • Data Integration: Pull market data from external APIs; supports formats like CSV or JSON for portfolio inputs.
  • Performance Tracking: Generate reports on portfolio returns; e.g., claw portfolio track --period monthly --metric sharpe.

Usage Patterns

Always initialize with authentication via $PORTFOLIO_API_KEY environment variable. For CLI usage, pipe data inputs directly; e.g., start with claw portfolio load --file portfolio.json then chain commands like claw portfolio optimize --risk-level high. In API patterns, use POST requests for modifications and GET for queries; handle asynchronous operations by polling endpoints. For scripts, wrap in try-catch blocks to manage API failures, and use config files for reusable parameters like asset lists.

Common Commands/API

  • CLI Commands: Use claw portfolio manage --action optimize --config config.json to optimize a portfolio; flags include --action (optimize, analyze), --config (path to JSON), and --verbose for detailed logs.
  • API Endpoints: Send requests to POST /api/portfolios/create with body {"name": "my-portfolio", "assets": ["AAPL", "TSLA"]}; authenticate via header Authorization: Bearer $PORTFOLIO_API_KEY.
  • Code Snippets:
    import requests
    response = requests.post('https://api.openclaw.ai/api/portfolios/optimize', headers={'Authorization': f'Bearer {os.environ["PORTFOLIO_API_KEY"]}'}, json={'assets': ['AAPL', 'GOOG']})
    print(response.json()['optimized_weights'])
    
    claw portfolio analyze --assets AAPL,MSFT --metric var --confidence 0.99
    
  • Config Formats: Use JSON for inputs, e.g., {"portfolio": {"assets": [{"symbol": "AAPL", "quantity": 100}], "constraints": {"max_risk": 0.05}}}; validate with claw portfolio validate --file config.json.

Integration Notes

Integrate by setting $PORTFOLIO_API_KEY in your environment before running commands. For external systems, use webhooks to sync data; e.g., connect to a brokerage API by mapping endpoints like POST /api/portfolios/update to trigger updates. Ensure compatibility with financial libraries like NumPy for calculations; import as a module in Python scripts and handle rate limits by adding delays, e.g., time.sleep(1) between API calls. Test integrations in a sandbox environment using mock data.

Error Handling

Check for authentication errors by verifying $PORTFOLIO_API_KEY is set; if missing, prompt user with os.environ.get('PORTFOLIO_API_KEY') or raise ValueError("API key required"). For API failures, catch HTTP errors like 401 or 429 using try-except in code:

try:
    response = requests.get('https://api.openclaw.ai/api/portfolios/risk')
except requests.exceptions.HTTPError as e:
    print(f"Error: {e.response.status_code} - {e.response.text}")

Handle invalid inputs by validating configs first with claw portfolio validate; log errors to file with --log-file errors.log flag, and retry transient errors up to 3 times with exponential backoff.

Graph Relationships

  • Related to cluster: financial
  • Connected via tags: finance, investments, risk-management, quant-analysis
  • Links to other skills: depends on data-analysis for data processing; enhances trading-execution for automated trades

FAQ

What does the portfolio-management skill do?

Manages investment portfolios with quantitative models, risk metrics, and optimization algorithms.

How do I install portfolio-management?

Run npx skills add https://github.com/alphaonedev/openclaw-graph --skill portfolio-management in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/portfolio-management/ (personal) or .claude/skills/portfolio-management/ (project).

Which AI agents can use portfolio-management?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is portfolio-management safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains portfolio-management?

It is published by alphaonedev in alphaonedev/openclaw-graph. It has 124 recorded installs.

More from alphaonedev/openclaw-graph

View all →

playwright-scraper

alphaonedev/openclaw-graph

Playwright web scraping: dynamic content, auth flows, pagination, data extraction, screenshots

Testing & QA1.6K installs

humanize-ai-text

alphaonedev/openclaw-graph

AI text humanization: reduce AI-detection patterns, natural phrasing, tone adjustment

463 installs

gcp-iam

alphaonedev/openclaw-graph

Manages identity and access control for Google Cloud resources using IAM policies and roles.

DevOps & Cloud431 installs

macos-automation

alphaonedev/openclaw-graph

AppleScript, JXA, Shortcuts, Automator, osascript, System Events, accessibility API

food-order

alphaonedev/openclaw-graph

Food delivery: DoorDash/UberEats/Grubhub ordering, restaurant search, order status tracking

249 installs

tavily-web-search

alphaonedev/openclaw-graph

Open the skill to read its SKILL.md instructions.

Popular other skills

View category →

hyperframes-cli

heygen-com/hyperframes

The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.

1.3M installs

triage

mattpocock/skills

Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.

1M installs

ask-matt

mattpocock/skills

Ask which skill or flow fits your situation. A router over the skills in this repo.

778.4K installs

to-questionnaire

mattpocock/skills

Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

508.9K installs

wait-what

mattpocock/skills

Stop. That last message did not land: re-pitch it.

459.7K installs

loop-me

mattpocock/skills

Grill me about specs for the workflows I want to build, within this workspace.

447.9K installs