{"abstract":"Up-and-out puts and down-and-in calls monitor the wrong side of the barrier.","category":"Options payoff and settlement","checks":8,"contract":"Inputs kind (up/down, in/out, call/put), observed path including initial and final price, strike, barrier and rebate. The barrier is hit if any observation is >= barrier (up) or <= barrier (down). Knock-out: rebate if hit else vanilla on the final price. Knock-in: vanilla if hit else rebate. Round to 6.","contract_signature":"kind, path, strike, barrier, rebate","evaluation_group":"w2-options_payoff_and_settlement-discrete-barrier","failed_approach":"Inferring direction from the barrier relative to the initial price fails when the barrier is already breached at inception.","family":"w2-options_payoff_and_settlement-discrete-barrier-barrier-direction","id":"FA-61456","implementations":{"attempt":{"sha256":"87732b73612f0f60af7e7ab574881b706f68b23ab53a522937a96922663a4f5e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(kind, path, strike, barrier, rebate):\n    up = barrier > path[0]\n    hit = any(p >= barrier for p in path) if up else any(p <= barrier for p in path)\n    final = path[-1]\n    vanilla = max(final - strike, 0) if kind.endswith('call') else max(strike - final, 0)\n    if '-out-' in kind:\n        pay = rebate if hit else vanilla\n    else:\n        pay = vanilla if hit else rebate\n    return round(pay, 6)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression barrier direction 1', ['down-in-call', [100.0, 110.0, 121.0, 112.53, 106.9, 96.21, 101.02, 109.1], 100, 90.0, 0.0], 0.0], ['regression barrier direction 2', ['up-out-put', [100.0, 100.0, 93.0, 93.0, 88.35, 95.42, 100.19], 105, 120.0, 1.5], 4.81], ['partial repair probe 1', ['up-in-call', [100.0, 100.0, 100.0], 105, 95.0, 3.0], 0], ['partial repair probe 2', ['up-out-call', [100.0, 110.0, 102.3, 112.53, 112.53, 118.16, 124.07, 117.87], 100, 95.0, 0.0], 0.0], ['boundary control 1', ['up-out-call', [100.0, 110.0, 105.0], 100, 110.0, 2.0], 2.0], ['boundary control 2', ['down-in-put', [100.0, 95.0], 100, 90.0, 1.0], 1.0], ['normal control 1', ['down-out-put', [100.0, 93.0, 83.7], 100, 85.0, 1.5], 1.5], ['normal control 2', ['down-out-put', [100.0, 93.0, 93.0, 83.7, 92.07, 85.63, 81.35, 73.22], 105, 90.0, 3.0], 3.0]], [['regression barrier direction 1', ['up-out-put', [100.0, 93.0, 93.0, 97.65, 107.42, 107.42], 100, 120.0, 1.5], 0], ['regression barrier direction 2', ['down-in-call', [100.0, 108.0, 116.64, 125.97, 132.27, 123.01, 129.16, 116.24], 100, 90.0, 0.0], 0.0], ['partial repair probe 1', ['up-in-call', [100.0, 108.0, 116.64, 122.47, 113.9], 105, 95.0, 1.5], 8.9], ['partial repair probe 2', ['up-out-call', [100.0, 108.0, 116.64, 128.3, 134.72, 125.29, 131.55], 100, 95.0, 3.0], 3.0], ['boundary control 1', ['up-out-call', [100.0, 110.0, 105.0], 100, 110.0, 2.0], 2.0], ['boundary control 2', ['down-in-put', [100.0, 95.0], 100, 90.0, 1.0], 1.0], ['normal control 1', ['up-in-call', [100.0, 100.0, 90.0, 81.0, 89.1, 84.64, 76.18, 82.27], 95, 115.0, 3.0], 3.0], ['normal control 2', ['down-out-put', [100.0, 100.0, 108.0, 118.8, 128.3], 100, 90.0, 1.5], 0]], [['regression barrier direction 1', ['down-in-call', [100.0, 93.0, 97.65, 107.42, 118.16, 118.16, 127.61], 100, 90.0, 3.0], 3.0], ['regression barrier direction 2', ['up-out-put', [100.0, 93.0, 93.0, 88.35, 95.42, 88.74], 100, 110.0, 0.0], 11.26], ['partial repair probe 1', ['down-out-put', [100.0, 93.0, 102.3], 100, 105.0, 1.5], 1.5], ['partial repair probe 2', ['down-out-put', [100.0, 90.0, 81.0], 95, 105.0, 1.5], 1.5], ['boundary control 1', ['down-in-put', [100.0, 95.0], 100, 90.0, 1.0], 1.0], ['boundary control 2', ['up-out-call', [100.0, 110.0, 105.0], 100, 110.0, 2.0], 2.0], ['normal control 1', ['up-out-put', [100.0, 108.0, 97.2], 95, 115.0, 0.0], 0], ['normal control 2', ['up-out-call', [100.0, 95.0, 104.5, 94.05, 101.57, 91.41], 95, 95.0, 3.0], 3.0]], [['regression barrier direction 1', ['up-out-put', [100.0, 100.0, 100.0], 95, 115.0, 3.0], 0], ['regression barrier direction 2', ['up-out-put', [100.0, 100.0, 110.0, 115.5, 103.95, 96.67, 96.67, 91.84], 100, 120.0, 3.0], 8.16], ['partial repair probe 1', ['up-in-call', [100.0, 108.0, 97.2, 106.92, 115.47, 115.47], 100, 95.0, 1.5], 15.47], ['partial repair probe 2', ['up-out-call', [100.0, 110.0, 110.0, 118.8, 106.92, 115.47], 95, 95.0, 0.0], 0.0], ['boundary control 1', ['up-out-call', [100.0, 110.0, 105.0], 100, 110.0, 2.0], 2.0], ['boundary control 2', ['down-in-put', [100.0, 95.0], 100, 90.0, 1.0], 1.0], ['normal control 1', ['down-in-put', [100.0, 100.0, 100.0, 95.0, 102.6, 112.86], 100, 85.0, 3.0], 3.0], ['normal control 2', ['down-out-put', [100.0, 110.0, 99.0, 108.9, 117.61, 129.37], 105, 80.0, 3.0], 0]], [['regression barrier direction 1', ['down-in-call', [100.0, 95.0, 104.5], 95, 85.0, 0.0], 0.0], ['regression barrier direction 2', ['down-in-call', [100.0, 105.0, 110.25, 99.23, 92.28, 96.89, 96.89, 106.58], 100, 90.0, 3.0], 3.0], ['partial repair probe 1', ['up-out-call', [100.0, 110.0, 115.5, 115.5, 121.28, 109.15], 105, 95.0, 3.0], 3.0], ['partial repair probe 2', ['down-in-put', [100.0, 93.0, 88.35, 95.42], 105, 105.0, 0.0], 9.58], ['boundary control 1', ['down-in-put', [100.0, 95.0], 100, 90.0, 1.0], 1.0], ['boundary control 2', ['up-out-call', [100.0, 110.0, 105.0], 100, 110.0, 2.0], 2.0], ['normal control 1', ['up-out-put', [100.0, 110.0, 115.5, 124.74, 116.01, 104.41, 109.63, 104.15], 105, 115.5, 3.0], 3.0], ['normal control 2', ['up-in-call', [100.0, 108.0, 116.64, 104.98, 113.38, 119.05], 105, 104.98, 1.5], 14.05]]]\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":"9f44ea1a4a9ea7fde27e1951854030aa5ba8f4fb28eca4978240c11fd51dda36","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(kind, path, strike, barrier, rebate):\n    up = kind.endswith('call')\n    hit = any(p >= barrier for p in path) if up else any(p <= barrier for p in path)\n    final = path[-1]\n    vanilla = max(final - strike, 0) if kind.endswith('call') else max(strike - final, 0)\n    if '-out-' in kind:\n        pay = rebate if hit else vanilla\n    else:\n        pay = vanilla if hit else rebate\n    return round(pay, 6)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression barrier direction 1', ['down-in-call', [100.0, 110.0, 121.0, 112.53, 106.9, 96.21, 101.02, 109.1], 100, 90.0, 0.0], 0.0], ['regression barrier direction 2', ['up-out-put', [100.0, 100.0, 93.0, 93.0, 88.35, 95.42, 100.19], 105, 120.0, 1.5], 4.81], ['partial repair probe 1', ['up-in-call', [100.0, 100.0, 100.0], 105, 95.0, 3.0], 0], ['partial repair probe 2', ['up-out-call', [100.0, 110.0, 102.3, 112.53, 112.53, 118.16, 124.07, 117.87], 100, 95.0, 0.0], 0.0], ['boundary control 1', ['up-out-call', [100.0, 110.0, 105.0], 100, 110.0, 2.0], 2.0], ['boundary control 2', ['down-in-put', [100.0, 95.0], 100, 90.0, 1.0], 1.0], ['normal control 1', ['down-out-put', [100.0, 93.0, 83.7], 100, 85.0, 1.5], 1.5], ['normal control 2', ['down-out-put', [100.0, 93.0, 93.0, 83.7, 92.07, 85.63, 81.35, 73.22], 105, 90.0, 3.0], 3.0]], [['regression barrier direction 1', ['up-out-put', [100.0, 93.0, 93.0, 97.65, 107.42, 107.42], 100, 120.0, 1.5], 0], ['regression barrier direction 2', ['down-in-call', [100.0, 108.0, 116.64, 125.97, 132.27, 123.01, 129.16, 116.24], 100, 90.0, 0.0], 0.0], ['partial repair probe 1', ['up-in-call', [100.0, 108.0, 116.64, 122.47, 113.9], 105, 95.0, 1.5], 8.9], ['partial repair probe 2', ['up-out-call', [100.0, 108.0, 116.64, 128.3, 134.72, 125.29, 131.55], 100, 95.0, 3.0], 3.0], ['boundary control 1', ['up-out-call', [100.0, 110.0, 105.0], 100, 110.0, 2.0], 2.0], ['boundary control 2', ['down-in-put', [100.0, 95.0], 100, 90.0, 1.0], 1.0], ['normal control 1', ['up-in-call', [100.0, 100.0, 90.0, 81.0, 89.1, 84.64, 76.18, 82.27], 95, 115.0, 3.0], 3.0], ['normal control 2', ['down-out-put', [100.0, 100.0, 108.0, 118.8, 128.3], 100, 90.0, 1.5], 0]], [['regression barrier direction 1', ['down-in-call', [100.0, 93.0, 97.65, 107.42, 118.16, 118.16, 127.61], 100, 90.0, 3.0], 3.0], ['regression barrier direction 2', ['up-out-put', [100.0, 93.0, 93.0, 88.35, 95.42, 88.74], 100, 110.0, 0.0], 11.26], ['partial repair probe 1', ['down-out-put', [100.0, 93.0, 102.3], 100, 105.0, 1.5], 1.5], ['partial repair probe 2', ['down-out-put', [100.0, 90.0, 81.0], 95, 105.0, 1.5], 1.5], ['boundary control 1', ['down-in-put', [100.0, 95.0], 100, 90.0, 1.0], 1.0], ['boundary control 2', ['up-out-call', [100.0, 110.0, 105.0], 100, 110.0, 2.0], 2.0], ['normal control 1', ['up-out-put', [100.0, 108.0, 97.2], 95, 115.0, 0.0], 0], ['normal control 2', ['up-out-call', [100.0, 95.0, 104.5, 94.05, 101.57, 91.41], 95, 95.0, 3.0], 3.0]], [['regression barrier direction 1', ['up-out-put', [100.0, 100.0, 100.0], 95, 115.0, 3.0], 0], ['regression barrier direction 2', ['up-out-put', [100.0, 100.0, 110.0, 115.5, 103.95, 96.67, 96.67, 91.84], 100, 120.0, 3.0], 8.16], ['partial repair probe 1', ['up-in-call', [100.0, 108.0, 97.2, 106.92, 115.47, 115.47], 100, 95.0, 1.5], 15.47], ['partial repair probe 2', ['up-out-call', [100.0, 110.0, 110.0, 118.8, 106.92, 115.47], 95, 95.0, 0.0], 0.0], ['boundary control 1', ['up-out-call', [100.0, 110.0, 105.0], 100, 110.0, 2.0], 2.0], ['boundary control 2', ['down-in-put', [100.0, 95.0], 100, 90.0, 1.0], 1.0], ['normal control 1', ['down-in-put', [100.0, 100.0, 100.0, 95.0, 102.6, 112.86], 100, 85.0, 3.0], 3.0], ['normal control 2', ['down-out-put', [100.0, 110.0, 99.0, 108.9, 117.61, 129.37], 105, 80.0, 3.0], 0]], [['regression barrier direction 1', ['down-in-call', [100.0, 95.0, 104.5], 95, 85.0, 0.0], 0.0], ['regression barrier direction 2', ['down-in-call', [100.0, 105.0, 110.25, 99.23, 92.28, 96.89, 96.89, 106.58], 100, 90.0, 3.0], 3.0], ['partial repair probe 1', ['up-out-call', [100.0, 110.0, 115.5, 115.5, 121.28, 109.15], 105, 95.0, 3.0], 3.0], ['partial repair probe 2', ['down-in-put', [100.0, 93.0, 88.35, 95.42], 105, 105.0, 0.0], 9.58], ['boundary control 1', ['down-in-put', [100.0, 95.0], 100, 90.0, 1.0], 1.0], ['boundary control 2', ['up-out-call', [100.0, 110.0, 105.0], 100, 110.0, 2.0], 2.0], ['normal control 1', ['up-out-put', [100.0, 110.0, 115.5, 124.74, 116.01, 104.41, 109.63, 104.15], 105, 115.5, 3.0], 3.0], ['normal control 2', ['up-in-call', [100.0, 108.0, 116.64, 104.98, 113.38, 119.05], 105, 104.98, 1.5], 14.05]]]\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-discrete-barrier-barrier-direction","generated_at":"2026-09-29T14:46:55.495752+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.","root_cause":"The direction flag is derived from call/put instead of the up/down prefix.","sha256":"bd401f305a1c085a2a6b7e369465fea98c10354f911e82194be14e03d7ae8908","title":"Discretely monitored barrier option payoff: barrier direction is inferred from the option type · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":41.12,"exit_code":1,"observations":[{"actual":0.0,"check":"regression barrier direction 1","expected":0.0,"passed":true},{"actual":4.81,"check":"regression barrier direction 2","expected":4.81,"passed":true},{"actual":3.0,"check":"partial repair probe 1","expected":0,"passed":false},{"actual":17.87,"check":"partial repair probe 2","expected":0.0,"passed":false},{"actual":2.0,"check":"boundary control 1","expected":2.0,"passed":true},{"actual":1.0,"check":"boundary control 2","expected":1.0,"passed":true},{"actual":1.5,"check":"normal control 1","expected":1.5,"passed":true},{"actual":3.0,"check":"normal control 2","expected":3.0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression barrier direction 1\", \"actual\": 0.0, \"expected\": 0.0, \"passed\": true}, {\"check\": \"regression barrier direction 2\", \"actual\": 4.81, \"expected\": 4.81, \"passed\": true}, {\"check\": \"partial repair probe 1\", \"actual\": 3.0, \"expected\": 0, \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": 17.87, \"expected\": 0.0, \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": 2.0, \"expected\": 2.0, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": 1.0, \"expected\": 1.0, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 1.5, \"expected\": 1.5, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 3.0, \"expected\": 3.0, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.391,"exit_code":1,"observations":[{"actual":9.1,"check":"regression barrier direction 1","expected":0.0,"passed":false},{"actual":1.5,"check":"regression barrier direction 2","expected":4.81,"passed":false},{"actual":0,"check":"partial repair probe 1","expected":0,"passed":true},{"actual":0.0,"check":"partial repair probe 2","expected":0.0,"passed":true},{"actual":2.0,"check":"boundary control 1","expected":2.0,"passed":true},{"actual":1.0,"check":"boundary control 2","expected":1.0,"passed":true},{"actual":1.5,"check":"normal control 1","expected":1.5,"passed":true},{"actual":3.0,"check":"normal control 2","expected":3.0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression barrier direction 1\", \"actual\": 9.1, \"expected\": 0.0, \"passed\": false}, {\"check\": \"regression barrier direction 2\", \"actual\": 1.5, \"expected\": 4.81, \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"partial repair probe 2\", \"actual\": 0.0, \"expected\": 0.0, \"passed\": true}, {\"check\": \"boundary control 1\", \"actual\": 2.0, \"expected\": 2.0, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": 1.0, \"expected\": 1.0, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 1.5, \"expected\": 1.5, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 3.0, \"expected\": 3.0, \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}