Agent workflows

Portfolio Optimization MCP Tool for AI Agents

optimize-portfolio builds a deterministic historical model scenario for 2–15 active US stock, ADR, or ETF symbols. It supports minimum volatility, risk parity, and maximum Sharpe objectives, adjusted common-date returns, explicit max-weight and one-way turnover constraints, and a chronological 70/30 development/holdout comparison.

MCP tool name
optimize-portfolio

Example prompt

Use Pineify optimize-portfolio for 50% SPY and 50% QQQ with minimum volatility, 75% max weight, and 30% turnover.

Direct answer

What optimize-portfolio does

Current positions must sum to 100% within 0.01. Up to five zero-start candidate symbols may be added without exceeding fifteen total assets.

The final portfolio request and result bypass Agent result-cache keys, entries, single-flight, persistence, logs, analytics, and public error details. Provider-level market-data caches may still operate independently.

Contract

What the agent sends and receives

Inputs

  • `positions`: 2–15 unique symbols with positive current weights totaling 100%.
  • `candidateSymbols`: up to five unique zero-start assets; total assets remain at most fifteen.
  • `objective`, 1y or 3y `lookback`, `maxWeightPercent`, `maxTurnoverPercent`, and optional `detail`.

Structured output

  • `portfolio-optimization-v1` structured content with redacted query counts rather than original input.
  • Included/excluded coverage, current/model weights, deltas summing to zero, turnover, and development objective.
  • Same-window holdout comparison, assumptions, warnings, and explicit final-cache bypass.

Capabilities

Where this MCP tool fits

Solve three fixed objectives

Uses deterministic long-only minimum-volatility, risk-parity, or mean-shrunk maximum-Sharpe methodology.

Enforce explicit constraints

Keeps weights fully invested while respecting max weight, one-way turnover, finite, and convergence checks.

Compare holdout outcomes

Reports current and model return, volatility, Sharpe, and drawdown on the same untouched holdout sample.

Agent workflow

A bounded call from question to review

  1. 1

    Define a complete current portfolio

    Send unique exact symbols and current weights that sum to 100%.

  2. 2

    Choose objective and constraints

    Set one fixed objective, lookback, max weight, and turnover cap.

  3. 3

    Compare rather than obey

    Review exclusions, development objective, and both holdout outcomes before making any independent decision.

Prompt examples

Questions an agent can route to this tool

"Use Pineify optimize-portfolio for 50% SPY and 50% QQQ with minimum volatility, 75% max weight, and 30% turnover."
"Compare a risk-parity historical scenario for AAPL, MSFT, and NVDA over 3y without treating model weights as advice."

Operator notes

How I review the result

I keep excluded assets and weaker model holdout performance visible.

I do not convert model weights into shares, orders, targets, or personalized suitability advice.

Boundaries to keep in the prompt

  • The model is long-only, fully invested, historical, and limited to three fixed objectives.
  • Insufficient common observations, infeasible constraints, or non-convergence return bounded errors rather than approximate targets.
  • Taxes, transaction costs, account circumstances, and suitability are not modeled; the result is not investment advice.

Pineify MCP is an information and code-validation tool, not investment advice. It does not promise returns, place trades, or modify a portfolio. Review timestamps, source fields, code diagnostics, and risk assumptions before acting.

FAQ

Portfolio Optimization MCP Tool for AI Agents questions

Add optimize-portfolio to your AI workflow

Connect one remote Pineify MCP endpoint, then let your compatible AI client discover this tool with the rest of the read-only catalog.

Open MCP setup