The finance developer workbenchSearch the reference Development · 0.1.4 · unpublished

volatility / wire operation

Probability of touching a level

totalfinance.volatility.probability_of_touch

Risk-neutral probability that the underlying TOUCHES `barrier` at any time before expiry (first-passage probability for geometric Brownian motion). Useful for stop/target and one-touch reasoning.

Pack / profilesvolatility / 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
    },
    "barrier": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "The price level to touch"
    },
    "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": "Implied volatility (annualized decimal)"
    },
    "dividendYield": {
      "type": "number"
    }
  },
  "additionalProperties": false,
  "required": [
    "spot",
    "barrier",
    "timeToExpiryYears",
    "riskFreeRate",
    "volatility"
  ]
}
Output schema
{
  "type": "object",
  "properties": {
    "value": {
      "type": "number",
      "description": "Risk-neutral probability in [0, 1]"
    },
    "assumptions": {
      "type": "object",
      "description": "Applied conventions"
    },
    "diagnostics": {
      "type": "object",
      "description": "Engine, method, warnings"
    }
  },
  "required": [
    "value"
  ]
}

All operations · Setup, handles, jobs & permissions