Skip to content
HALOWERK

Finopswerk

martingale transport option price bounds

Computes two-date martingale optimal transport price bounds for a derivative from supplied finite risk-neutral marginals and an arbitrary path-payoff cost matrix. It validates strictly increasing atom supports, positive integer weights p/q with common total W, equal means and convex order. Returns the lower and upper expected payoff, the attaining couplings and semi-static sub/superhedge dual vectors a_i, b_j, h_i whose dual expectation equals the primal value.

POST https://finops.halowerk.com/v1/martingale-transport-option-price-bounds

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
problemSee schemaYes
Show full input schema
{
  "type": "object",
  "required": [
    "problem"
  ],
  "properties": {
    "problem": {
      "anyOf": [
        {
          "type": "object",
          "required": [
            "x",
            "y",
            "p",
            "q",
            "W",
            "cost"
          ],
          "properties": {
            "x": {
              "type": "array",
              "minItems": 2,
              "maxItems": 4,
              "items": {
                "type": "integer",
                "minimum": -1000000,
                "maximum": 1000000
              }
            },
            "y": {
              "type": "array",
              "minItems": 2,
              "maxItems": 4,
              "items": {
                "type": "integer",
                "minimum": -1000000,
                "maximum": 1000000
              }
            },
            "p": {
              "type": "array",
              "minItems": 2,
              "maxItems": 4,
              "items": {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000000
              }
            },
            "q": {
              "type": "array",
              "minItems": 2,
              "maxItems": 4,
              "items": {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000000
              }
            },
            "W": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000
            },
            "cost": {
              "type": "array",
              "minItems": 2,
              "maxItems": 4,
              "items": {
                "type": "array",
                "minItems": 2,
                "maxItems": 4,
                "items": {
                  "type": "integer",
                  "minimum": -1000000,
                  "maximum": 1000000
                }
              }
            }
          },
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false
}

Open original schema

Published input example

{
  "problem": {
    "x": [
      2,
      4
    ],
    "y": [
      0,
      3,
      6
    ],
    "p": [
      3,
      3
    ],
    "q": [
      2,
      2,
      2
    ],
    "W": 6,
    "cost": [
      [
        0,
        1,
        16
      ],
      [
        0,
        0,
        4
      ]
    ]
  }
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’