The finance developer workbenchSearch the reference Development · 0.1.4 · unpublished

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 / profilesperformance / backtesting, default, full, portfolio
Default discoveryIncluded
Required capabilitiesNone
Effects / authorizationnone / none
Cost / cancellationsmall / Do not assume inline interruption
Handle-eligible inputsNone
Idempotencynot-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"
  ]
}

All operations · Setup, handles, jobs & permissions