performance / wire operation
Full performance summary
totalfinance.performance.analyze
Summarize a return series or equity curve: total/annualized return, volatility, Sharpe, Sortino, Calmar, max drawdown, omega, hit rate, profit factor, expectancy — plus beta/alpha/tracking error/information ratio/Treynor when a `benchmark` is supplied. Suspicious inputs (prices passed as returns, returns passed as equity) are flagged in diagnostics.warnings, never silently reported.
| Pack / profiles | performance / backtesting, default, full, portfolio |
|---|---|
| Default discovery | Included |
| Required capabilities | None |
| Effects / authorization | none / none |
| Cost / cancellation | small / Do not assume inline interruption |
| Handle-eligible inputs | None |
| Idempotency | not-applicable |
Input schema
{
"type": "object",
"properties": {
"returns": {
"type": "array",
"items": {
"type": "number"
},
"description": "Per-period returns as decimals (0.01 = +1%) — supply returns OR equity"
},
"equity": {
"type": "array",
"items": {
"type": "number",
"exclusiveMinimum": 0
},
"description": "Equity curve (growth of capital, price levels) — supply returns OR equity"
},
"periodsPerYear": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Annualization factor (default 252 daily; 12 monthly, 52 weekly)"
},
"riskFreeRate": {
"type": "number",
"description": "Annualized risk-free rate (decimal, default 0)"
},
"benchmark": {
"type": "array",
"items": {
"type": "number"
},
"description": "Aligned per-period benchmark returns (decimals); adds beta/alpha/informationRatio/Treynor"
}
},
"additionalProperties": false
}Output schema
{
"type": "object",
"properties": {
"value": {
"description": "The computed result"
},
"assumptions": {
"type": "object",
"description": "Every applied convention, echoed"
},
"diagnostics": {
"type": "object",
"description": "Engine/method/warnings (+ convergence where iterative)"
}
},
"required": [
"value",
"assumptions",
"diagnostics"
]
}