The finance developer workbenchSearch the reference Development · 0.1.4 · unpublished

options / wire operation

Compute first-order Greeks

totalfinance.option.greeks

Compute first-order Greeks (delta, gamma, theta/day, vega/1%, rho/1%) for a European option under Black–Scholes–Merton. Supply time as timeToExpiryYears (years) or as expiry + asOf (dates).

Pack / profilesoptions / default, full, options, strategies
Default discoveryIncluded
Required capabilitiesNone
Effects / authorizationnone / none
Cost / cancellationsmall / Do not assume inline interruption
Handle-eligible inputsNone
Idempotencynot-applicable
Input schema
{
  "type": "object",
  "properties": {
    "spot": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Spot price of the underlying"
    },
    "strike": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Strike price"
    },
    "timeToExpiryYears": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Time to expiry in years"
    },
    "riskFreeRate": {
      "type": "number",
      "description": "Continuously-compounded risk-free rate (decimal)"
    },
    "volatility": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Volatility (decimal)"
    },
    "dividendYield": {
      "type": "number",
      "description": "Continuous dividend yield (decimal, default 0)"
    },
    "expiry": {
      "type": "string",
      "description": "Option expiry — YYYY-MM-DD (→ the US close: 16:00 ET, 13:00 ET on early-close days) or a zoned ISO datetime. Supply with asOf instead of timeToExpiryYears."
    },
    "asOf": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "string"
        }
      ],
      "description": "Valuation instant — epoch ms or a zoned ISO datetime such as \"2026-07-20T10:30:00-04:00\". A bare YYYY-MM-DD is refused: a same-day option's value depends on the time of day. For an end-of-day mark use the 16:00 ET close (13:00 ET on early-close days)."
    },
    "type": {
      "type": "string",
      "enum": [
        "call",
        "put"
      ],
      "description": "Option type"
    }
  },
  "additionalProperties": false,
  "required": [
    "spot",
    "strike",
    "riskFreeRate",
    "volatility",
    "type"
  ]
}
Output schema
{
  "type": "object",
  "properties": {
    "greeks": {
      "type": "object",
      "properties": {
        "delta": {
          "type": "number"
        },
        "gamma": {
          "type": "number"
        },
        "theta": {
          "type": "number"
        },
        "vega": {
          "type": "number"
        },
        "rho": {
          "type": "number"
        }
      }
    },
    "assumptions": {
      "type": "object",
      "description": "Applied conventions"
    },
    "diagnostics": {
      "type": "object",
      "description": "Engine, method, warnings"
    }
  },
  "required": [
    "greeks"
  ]
}

All operations · Setup, handles, jobs & permissions