Markowitz mean-variance optimisation
portfolio-analytics_mean-variance-optimizeMinimum variance, target return, max Sharpe or target volatility portfolios from expected returns and a covariance matrix, with bounds. Price $0.05 USDC. POST /api/v1/portfolio-analytics/mean-variance-optimize. An unpaid call returns the x402 payment terms and does not run.
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": {
"assets": "<assets>",
"expectedReturns": "<expectedReturns>",
"objective": "<objective>"
},
"name": "portfolio-analytics_mean-variance-optimize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| assets | Yes | assets, array. Required. | |
| bounds | No | bounds, object. Required. | |
| groups | No | groups, array. Required. | |
| returns | No | returns, array. Optional. | |
| riskFree | No | riskFree, number. Required. | |
| objective | Yes | objective, string, one of min_variance, target_return, max_sharpe, target_volatility. Required. | |
| shrinkage | No | shrinkage, string, one of none, ledoit_wolf. Required. | none |
| covariance | No | covariance, array. Optional. | |
| targetReturn | No | targetReturn, number. Optional. | |
| frontierPoints | No | frontierPoints, integer, from 0 to 100. Required. | |
| expectedReturns | Yes | expectedReturns, array. Required. | |
| targetVolatility | No | targetVolatility, number. Optional. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sharpe | No | sharpe. Number. | |
| status | No | status. String. | |
| sources | No | sources. Array. | |
| weights | No | weights. Array. | |
| volatility | No | volatility. Number. | |
| limitations | No | limitations. Array. | |
| expectedReturn | No | expectedReturn. Number. | |
| activeConstraints | No | activeConstraints. Array. |