finance_portfolio_optimize
Portfolio optimizer (efficient frontier) — Mean-variance portfolio optimization from price or return history. series=NAME:v1,v2,...;NAME:... (2-12 assets, prices oldest first, 11-1001 points). Optional type=returns (percent, or unit=decimal), period= per year (252 daily, 52 weekly, 12 monthly), rf= risk-free %, long_only=false (closed-form Markowitz with shorting), max_weight= / min_weight= %, target= annual return %, shrinkage=0-1 covariance shrink, current=NAME:pct;... to compare. Returns max-Sharpe, minimum-variance, risk-parity, equal-weight (and target/current) portfolios with weights, expected return, volatility, Sharpe, risk contributions, diversification ratio and effective assets, the efficient frontier, rebalance trades and data-quality flags. Long-only results match SciPy SLSQP. Price: $0.004 USDC (Base, via x402).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"series": "<series>"
},
"name": "finance_portfolio_optimize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| series | Yes | STOCKS:100,100.8,100.2,101.1,101.9,101.4,102.3,102.9,102.2,103.4,104.1,103.6,104.8;BONDS:100,100.1,100.25,100.2,100.3,100.42,100.38,100.5,100.61,100.58,100.7,100.79,100.85;GOLD:100,99.6,100.4,100.9,100.3,101.2,101.6,101,102.1,101.8,102.5,103.1,102.7 |