get_performance_stats
Calculate return and risk statistics per ticker—including Sharpe, drawdown, and beta/alpha versus a chosen benchmark—to compare investment performance.
Instructions
Return and risk statistics per ticker, optionally vs a benchmark.
Total and annualised return (annualised only for windows >= 1 year),
annualised volatility, Sharpe, Sortino, Calmar, max drawdown with peak /
trough / recovery dates, best and worst period. With `benchmark`: beta,
alpha, correlation, tracking error and information ratio. Uses adjusted
closes (dividends reinvested). Each ticker uses its own available window,
so check `from`/`to` before comparing; for a portfolio use
analyze_portfolio_risk.
Args:
tickers: Yahoo symbols.
start_date: YYYY-MM-DD. Defaults to 2020-01-01.
end_date: YYYY-MM-DD (exclusive). Defaults to the latest value.
interval: Return frequency: "1d", "1wk" or "1mo".
base_currency: Optional ISO code to measure everything in (e.g. "EUR"
for a euro investor holding USD assets); default local currency.
risk_free_rate_pct: Annual risk-free rate in %, for Sharpe/Sortino.
benchmark: Optional Yahoo symbol to compare against, e.g. "IWDA.AS".
Returns:
`stats` per ticker (with `vs_benchmark` when given), the currency used
and any `warnings`; or an error dict.
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": {
"tickers": "<tickers>"
},
"name": "get_performance_stats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tickers | Yes | ||
| end_date | No | ||
| interval | No | 1d | |
| benchmark | No | ||
| start_date | No | 2020-01-01 | |
| base_currency | No | ||
| risk_free_rate_pct | No |