Portfolio Metrics
portfolio_metricsPortfolio and asset risk/return analytics from price or return series you supply: annualised return (CAGR) and volatility, Sharpe and Sortino ratios, max drawdown, historical and parametric 95% VaR, beta/alpha against a benchmark series and a correlation matrix, for each asset and the weighted (periodically rebalanced) portfolio. Up to 20 assets. POST JSON body. Price: $0.003 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/portfolio-metrics
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "portfolio_metrics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prices | No | Price series per asset, oldest first: {"BTC":[...],"ETH":[...]} (same length) | |
| returns | No | Alternatively periodic simple returns per asset as decimals (0.01 = 1%) | |
| weights | No | Portfolio weights per asset (normalised; default equal) | |
| benchmark | No | Name of the series to use as benchmark for beta/alpha (excluded from the portfolio unless weighted) | |
| riskFreePct | No | Annual risk-free rate in percent | |
| periodsPerYear | No | 252 trading days, 365 crypto days, 52 weeks, 12 months |