{"abstract":"Exercised puts add shares and debit cash instead of delivering shares for cash.","category":"Options payoff and settlement","checks":8,"contract":"Inputs kind C/P, strike, signed contracts (+long exercised, -short assigned), deliverable shares per contract and whether exercise happened. Long calls and short puts receive shares and pay strike*shares; long puts and short calls deliver shares and receive strike*shares. Return [share delta, cash delta] (cash in currency, computed in cents); unexercised returns [0, 0.0].","evaluation_group":"w2-options_payoff_and_settlement-physical-delivery","failed_approach":"Special-casing only long puts leaves short puts inverted twice.","family":"w2-options_payoff_and_settlement-physical-delivery-put-delivery-direction","id":"FA-61366","implementations":{"attempt":{"sha256":"70f91724a365207826e0f89b700de7d27c22e57335af6680bb1032fc59db90c0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(kind, strike, contracts, deliverable, exercised):\n    if not exercised:\n        return [0, 0.0]\n    n = abs(contracts) * deliverable\n    k = round(strike * 100)\n    direction = -1 if kind == 'P' and contracts > 0 else 1\n    if contracts < 0:\n        direction = -direction\n    shares = direction * n\n    cash = -direction * n * k\n    return [shares, cash / 100]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression put delivery direction 1', ['P', 10, 5, 100, True], [-500, 5000.0]], ['regression put delivery direction 2', ['P', 42.5, -3, 100, True], [300, -12750.0]], ['partial repair probe 1', ['P', 250, -1, 50, True], [50, -12500.0]], ['partial repair probe 2', ['P', 101.25, -3, 133, True], [399, -40398.75]], ['boundary control 1', ['C', 50, 1, 100, True], [100, -5000.0]], ['boundary control 2', ['C', 50, 1, 100, False], [0, 0.0]], ['normal control 1', ['C', 250, 2, 133, True], [266, -66500.0]], ['normal control 2', ['C', 42.5, -1, 50, True], [-50, 2125.0]]], [['regression put delivery direction 1', ['P', 10, 5, 50, True], [-250, 2500.0]], ['regression put delivery direction 2', ['P', 10, 2, 150, True], [-300, 3000.0]], ['partial repair probe 1', ['P', 250, -3, 133, True], [399, -99750.0]], ['partial repair probe 2', ['P', 101.25, -1, 150, True], [150, -15187.5]], ['boundary control 1', ['C', 50, 1, 100, False], [0, 0.0]], ['boundary control 2', ['C', 50, 1, 100, True], [100, -5000.0]], ['normal control 1', ['C', 42.5, -3, 150, False], [0, 0.0]], ['normal control 2', ['P', 10, 1, 100, False], [0, 0.0]]], [['regression put delivery direction 1', ['P', 42.5, 2, 150, True], [-300, 12750.0]], ['regression put delivery direction 2', ['P', 250, 2, 100, True], [-200, 50000.0]], ['partial repair probe 1', ['P', 42.5, -1, 50, True], [50, -2125.0]], ['partial repair probe 2', ['P', 250, -3, 50, True], [150, -37500.0]], ['boundary control 1', ['C', 50, 1, 100, True], [100, -5000.0]], ['boundary control 2', ['C', 50, 1, 100, False], [0, 0.0]], ['normal control 1', ['C', 250, 1, 133, True], [133, -33250.0]], ['normal control 2', ['C', 250, 2, 100, True], [200, -50000.0]]], [['regression put delivery direction 1', ['P', 10, -3, 150, True], [450, -4500.0]], ['regression put delivery direction 2', ['P', 42.5, -1, 133, True], [133, -5652.5]], ['partial repair probe 1', ['P', 250, -3, 100, True], [300, -75000.0]], ['partial repair probe 2', ['P', 101.25, -3, 50, True], [150, -15187.5]], ['boundary control 1', ['C', 50, 1, 100, False], [0, 0.0]], ['boundary control 2', ['C', 50, 1, 100, True], [100, -5000.0]], ['normal control 1', ['C', 42.5, -1, 100, True], [-100, 4250.0]], ['normal control 2', ['C', 101.25, 5, 100, True], [500, -50625.0]]], [['regression put delivery direction 1', ['P', 42.5, 1, 50, True], [-50, 2125.0]], ['regression put delivery direction 2', ['P', 42.5, -3, 100, True], [300, -12750.0]], ['partial repair probe 1', ['P', 42.5, -1, 100, True], [100, -4250.0]], ['partial repair probe 2', ['P', 101.25, -1, 133, True], [133, -13466.25]], ['boundary control 1', ['C', 50, 1, 100, False], [0, 0.0]], ['boundary control 2', ['C', 50, 1, 100, True], [100, -5000.0]], ['normal control 1', ['C', 250, -3, 100, True], [-300, 75000.0]], ['normal control 2', ['C', 10, -3, 150, True], [-450, 4500.0]]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"5d4bb78f1032a44c4fb2e416494bc2c8cc7ec2dec4ce641379c7cdefe95ac267","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(kind, strike, contracts, deliverable, exercised):\n    if not exercised:\n        return [0, 0.0]\n    n = abs(contracts) * deliverable\n    k = round(strike * 100)\n    direction = 1\n    if contracts < 0:\n        direction = -direction\n    shares = direction * n\n    cash = -direction * n * k\n    return [shares, cash / 100]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression put delivery direction 1', ['P', 10, 5, 100, True], [-500, 5000.0]], ['regression put delivery direction 2', ['P', 42.5, -3, 100, True], [300, -12750.0]], ['partial repair probe 1', ['P', 250, -1, 50, True], [50, -12500.0]], ['partial repair probe 2', ['P', 101.25, -3, 133, True], [399, -40398.75]], ['boundary control 1', ['C', 50, 1, 100, True], [100, -5000.0]], ['boundary control 2', ['C', 50, 1, 100, False], [0, 0.0]], ['normal control 1', ['C', 250, 2, 133, True], [266, -66500.0]], ['normal control 2', ['C', 42.5, -1, 50, True], [-50, 2125.0]]], [['regression put delivery direction 1', ['P', 10, 5, 50, True], [-250, 2500.0]], ['regression put delivery direction 2', ['P', 10, 2, 150, True], [-300, 3000.0]], ['partial repair probe 1', ['P', 250, -3, 133, True], [399, -99750.0]], ['partial repair probe 2', ['P', 101.25, -1, 150, True], [150, -15187.5]], ['boundary control 1', ['C', 50, 1, 100, False], [0, 0.0]], ['boundary control 2', ['C', 50, 1, 100, True], [100, -5000.0]], ['normal control 1', ['C', 42.5, -3, 150, False], [0, 0.0]], ['normal control 2', ['P', 10, 1, 100, False], [0, 0.0]]], [['regression put delivery direction 1', ['P', 42.5, 2, 150, True], [-300, 12750.0]], ['regression put delivery direction 2', ['P', 250, 2, 100, True], [-200, 50000.0]], ['partial repair probe 1', ['P', 42.5, -1, 50, True], [50, -2125.0]], ['partial repair probe 2', ['P', 250, -3, 50, True], [150, -37500.0]], ['boundary control 1', ['C', 50, 1, 100, True], [100, -5000.0]], ['boundary control 2', ['C', 50, 1, 100, False], [0, 0.0]], ['normal control 1', ['C', 250, 1, 133, True], [133, -33250.0]], ['normal control 2', ['C', 250, 2, 100, True], [200, -50000.0]]], [['regression put delivery direction 1', ['P', 10, -3, 150, True], [450, -4500.0]], ['regression put delivery direction 2', ['P', 42.5, -1, 133, True], [133, -5652.5]], ['partial repair probe 1', ['P', 250, -3, 100, True], [300, -75000.0]], ['partial repair probe 2', ['P', 101.25, -3, 50, True], [150, -15187.5]], ['boundary control 1', ['C', 50, 1, 100, False], [0, 0.0]], ['boundary control 2', ['C', 50, 1, 100, True], [100, -5000.0]], ['normal control 1', ['C', 42.5, -1, 100, True], [-100, 4250.0]], ['normal control 2', ['C', 101.25, 5, 100, True], [500, -50625.0]]], [['regression put delivery direction 1', ['P', 42.5, 1, 50, True], [-50, 2125.0]], ['regression put delivery direction 2', ['P', 42.5, -3, 100, True], [300, -12750.0]], ['partial repair probe 1', ['P', 42.5, -1, 100, True], [100, -4250.0]], ['partial repair probe 2', ['P', 101.25, -1, 133, True], [133, -13466.25]], ['boundary control 1', ['C', 50, 1, 100, False], [0, 0.0]], ['boundary control 2', ['C', 50, 1, 100, True], [100, -5000.0]], ['normal control 1', ['C', 250, -3, 100, True], [-300, 75000.0]], ['normal control 2', ['C', 10, -3, 150, True], [-450, 4500.0]]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"c5cf00e3c8a6b9ce4b24e7d5cecf34f57ec77b4a0a3e95f90da099b243d272bc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(kind, strike, contracts, deliverable, exercised):\n    if not exercised:\n        return [0, 0.0]\n    n = abs(contracts) * deliverable\n    k = round(strike * 100)\n    direction = 1 if kind == 'C' else -1\n    if contracts < 0:\n        direction = -direction\n    shares = direction * n\n    cash = -direction * n * k\n    return [shares, cash / 100]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression put delivery direction 1', ['P', 10, 5, 100, True], [-500, 5000.0]], ['regression put delivery direction 2', ['P', 42.5, -3, 100, True], [300, -12750.0]], ['partial repair probe 1', ['P', 250, -1, 50, True], [50, -12500.0]], ['partial repair probe 2', ['P', 101.25, -3, 133, True], [399, -40398.75]], ['boundary control 1', ['C', 50, 1, 100, True], [100, -5000.0]], ['boundary control 2', ['C', 50, 1, 100, False], [0, 0.0]], ['normal control 1', ['C', 250, 2, 133, True], [266, -66500.0]], ['normal control 2', ['C', 42.5, -1, 50, True], [-50, 2125.0]]], [['regression put delivery direction 1', ['P', 10, 5, 50, True], [-250, 2500.0]], ['regression put delivery direction 2', ['P', 10, 2, 150, True], [-300, 3000.0]], ['partial repair probe 1', ['P', 250, -3, 133, True], [399, -99750.0]], ['partial repair probe 2', ['P', 101.25, -1, 150, True], [150, -15187.5]], ['boundary control 1', ['C', 50, 1, 100, False], [0, 0.0]], ['boundary control 2', ['C', 50, 1, 100, True], [100, -5000.0]], ['normal control 1', ['C', 42.5, -3, 150, False], [0, 0.0]], ['normal control 2', ['P', 10, 1, 100, False], [0, 0.0]]], [['regression put delivery direction 1', ['P', 42.5, 2, 150, True], [-300, 12750.0]], ['regression put delivery direction 2', ['P', 250, 2, 100, True], [-200, 50000.0]], ['partial repair probe 1', ['P', 42.5, -1, 50, True], [50, -2125.0]], ['partial repair probe 2', ['P', 250, -3, 50, True], [150, -37500.0]], ['boundary control 1', ['C', 50, 1, 100, True], [100, -5000.0]], ['boundary control 2', ['C', 50, 1, 100, False], [0, 0.0]], ['normal control 1', ['C', 250, 1, 133, True], [133, -33250.0]], ['normal control 2', ['C', 250, 2, 100, True], [200, -50000.0]]], [['regression put delivery direction 1', ['P', 10, -3, 150, True], [450, -4500.0]], ['regression put delivery direction 2', ['P', 42.5, -1, 133, True], [133, -5652.5]], ['partial repair probe 1', ['P', 250, -3, 100, True], [300, -75000.0]], ['partial repair probe 2', ['P', 101.25, -3, 50, True], [150, -15187.5]], ['boundary control 1', ['C', 50, 1, 100, False], [0, 0.0]], ['boundary control 2', ['C', 50, 1, 100, True], [100, -5000.0]], ['normal control 1', ['C', 42.5, -1, 100, True], [-100, 4250.0]], ['normal control 2', ['C', 101.25, 5, 100, True], [500, -50625.0]]], [['regression put delivery direction 1', ['P', 42.5, 1, 50, True], [-50, 2125.0]], ['regression put delivery direction 2', ['P', 42.5, -3, 100, True], [300, -12750.0]], ['partial repair probe 1', ['P', 42.5, -1, 100, True], [100, -4250.0]], ['partial repair probe 2', ['P', 101.25, -1, 133, True], [133, -13466.25]], ['boundary control 1', ['C', 50, 1, 100, False], [0, 0.0]], ['boundary control 2', ['C', 50, 1, 100, True], [100, -5000.0]], ['normal control 1', ['C', 250, -3, 100, True], [-300, 75000.0]], ['normal control 2', ['C', 10, -3, 150, True], [-450, 4500.0]]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"A deterministic toy contract stated explicitly in the contract field; no claim of conformance to any exchange or clearing rulebook. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-options_payoff_and_settlement-physical-delivery-put-delivery-direction","generated_at":"2026-09-29T14:46:54.544301+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Option expiry, exercise and settlement engines move cash and shares; a wrong branch misstates obligations.","repair":"Receive shares on calls and deliver on puts before applying the short-side inversion.","root_cause":"The delivery direction is fixed at +1 regardless of option type.","sha256":"30296e80a705285fbb658ecea509eedb178be3beb047fcb1353294bcdf5fa5da","title":"Physical delivery on exercise and assignment: put exercises are booked as share receipts · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.863,"exit_code":1,"observations":[{"actual":[-500,5000.0],"check":"regression put delivery direction 1","expected":[-500,5000.0],"passed":true},{"actual":[-300,12750.0],"check":"regression put delivery direction 2","expected":[300,-12750.0],"passed":false},{"actual":[-50,12500.0],"check":"partial repair probe 1","expected":[50,-12500.0],"passed":false},{"actual":[-399,40398.75],"check":"partial repair probe 2","expected":[399,-40398.75],"passed":false},{"actual":[100,-5000.0],"check":"boundary control 1","expected":[100,-5000.0],"passed":true},{"actual":[0,0.0],"check":"boundary control 2","expected":[0,0.0],"passed":true},{"actual":[266,-66500.0],"check":"normal control 1","expected":[266,-66500.0],"passed":true},{"actual":[-50,2125.0],"check":"normal control 2","expected":[-50,2125.0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression put delivery direction 1\", \"actual\": [-500, 5000.0], \"expected\": [-500, 5000.0], \"passed\": true}, {\"check\": \"regression put delivery direction 2\", \"actual\": [-300, 12750.0], \"expected\": [300, -12750.0], \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": [-50, 12500.0], \"expected\": [50, -12500.0], \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": [-399, 40398.75], \"expected\": [399, -40398.75], \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": [100, -5000.0], \"expected\": [100, -5000.0], \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": [0, 0.0], \"expected\": [0, 0.0], \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [266, -66500.0], \"expected\": [266, -66500.0], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [-50, 2125.0], \"expected\": [-50, 2125.0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.304,"exit_code":1,"observations":[{"actual":[500,-5000.0],"check":"regression put delivery direction 1","expected":[-500,5000.0],"passed":false},{"actual":[-300,12750.0],"check":"regression put delivery direction 2","expected":[300,-12750.0],"passed":false},{"actual":[-50,12500.0],"check":"partial repair probe 1","expected":[50,-12500.0],"passed":false},{"actual":[-399,40398.75],"check":"partial repair probe 2","expected":[399,-40398.75],"passed":false},{"actual":[100,-5000.0],"check":"boundary control 1","expected":[100,-5000.0],"passed":true},{"actual":[0,0.0],"check":"boundary control 2","expected":[0,0.0],"passed":true},{"actual":[266,-66500.0],"check":"normal control 1","expected":[266,-66500.0],"passed":true},{"actual":[-50,2125.0],"check":"normal control 2","expected":[-50,2125.0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression put delivery direction 1\", \"actual\": [500, -5000.0], \"expected\": [-500, 5000.0], \"passed\": false}, {\"check\": \"regression put delivery direction 2\", \"actual\": [-300, 12750.0], \"expected\": [300, -12750.0], \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": [-50, 12500.0], \"expected\": [50, -12500.0], \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": [-399, 40398.75], \"expected\": [399, -40398.75], \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": [100, -5000.0], \"expected\": [100, -5000.0], \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": [0, 0.0], \"expected\": [0, 0.0], \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [266, -66500.0], \"expected\": [266, -66500.0], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [-50, 2125.0], \"expected\": [-50, 2125.0], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.345,"exit_code":0,"observations":[{"actual":[-500,5000.0],"check":"regression put delivery direction 1","expected":[-500,5000.0],"passed":true},{"actual":[300,-12750.0],"check":"regression put delivery direction 2","expected":[300,-12750.0],"passed":true},{"actual":[50,-12500.0],"check":"partial repair probe 1","expected":[50,-12500.0],"passed":true},{"actual":[399,-40398.75],"check":"partial repair probe 2","expected":[399,-40398.75],"passed":true},{"actual":[100,-5000.0],"check":"boundary control 1","expected":[100,-5000.0],"passed":true},{"actual":[0,0.0],"check":"boundary control 2","expected":[0,0.0],"passed":true},{"actual":[266,-66500.0],"check":"normal control 1","expected":[266,-66500.0],"passed":true},{"actual":[-50,2125.0],"check":"normal control 2","expected":[-50,2125.0],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression put delivery direction 1\", \"actual\": [-500, 5000.0], \"expected\": [-500, 5000.0], \"passed\": true}, {\"check\": \"regression put delivery direction 2\", \"actual\": [300, -12750.0], \"expected\": [300, -12750.0], \"passed\": true}, {\"check\": \"partial repair probe 1\", \"actual\": [50, -12500.0], \"expected\": [50, -12500.0], \"passed\": true}, {\"check\": \"partial repair probe 2\", \"actual\": [399, -40398.75], \"expected\": [399, -40398.75], \"passed\": true}, {\"check\": \"boundary control 1\", \"actual\": [100, -5000.0], \"expected\": [100, -5000.0], \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": [0, 0.0], \"expected\": [0, 0.0], \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [266, -66500.0], \"expected\": [266, -66500.0], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [-50, 2125.0], \"expected\": [-50, 2125.0], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}