{"abstract":"Long calls look profitable at every price.","category":"Options payoff and settlement","checks":8,"contract":"Inputs legs [kind C/P/S, strike (purchase price for stock S), signed qty, premium] and a multiplier. Expiry value V(S) = multiplier * sum(q*(intrinsic - premium)) for options and q*(S - price) for stock, in exact fractions. Breakpoints are 0 and every strike. Tail slope = V(top+1)-V(top). Max gain is None if the slope > 0 else the max over breakpoints; max loss is None if slope < 0 else the min. Breakevens are zeros at breakpoints and linear-interpolated sign changes between them and in the tail. Return [gain, loss, breakevens] rounded to 4.","evaluation_group":"w2-options_payoff_and_settlement-strategy-risk-profile","failed_approach":"Netting the premium inside the max floors the loss at zero.","family":"w2-options_payoff_and_settlement-strategy-risk-profile-call-premium-sign","id":"FA-61496","implementations":{"attempt":{"sha256":"9ebeeffef77603403b264f1a143c5f6fd9c9e30dc6d9982b7bb70c1dcdc6e6d8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(legs, multiplier):\n    def value(S):\n        t = Fraction(0)\n        for kind, k, q, prem in legs:\n            p = Fraction(str(prem))\n            if kind == 'C':\n                t += q * max(S - k - p, 0)\n            elif kind == 'P':\n                t += q * (max(k - S, 0) - p)\n            else:\n                t += q * (S - k)\n        return t * multiplier\n    pts = sorted(set([0] + [leg[1] for leg in legs]))\n    top = pts[-1]\n    slope = value(top + 1) - value(top)\n    vals = [value(p) for p in pts]\n    gain = None if slope > 0 else max(vals)\n    loss = None if slope < 0 else min(vals)\n    bes = []\n    for a, b in zip(pts, pts[1:]):\n        va, vb = value(a), value(b)\n        if va == 0:\n            bes.append(Fraction(a))\n        elif va * vb < 0:\n            bes.append(a - va * (b - a) / (vb - va))\n    vt = value(top)\n    if vt == 0:\n        bes.append(Fraction(top))\n    elif vt * slope < 0:\n        bes.append(top - vt / slope)\n    def r4(x):\n        return None if x is None else float(round(x, 4))\n    return [r4(gain), r4(loss), [r4(x) for x in sorted(set(bes))]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression call premium sign 1', [[['S', 85, 1, 0.0], ['C', 100, -2, 2.0], ['C', 90, -1, 0.5], ['C', 110, -2, 3.4]], 1], [16.3, None, [73.7, 108.15]]], ['regression call premium sign 2', [[['P', 95, -2, 3.4], ['C', 80, 1, 5.1]], 1], [None, -188.3, [89.4333]]], ['partial repair probe 1', [[['C', 120, -2, 7.75], ['P', 100, -2, 3.4], ['C', 105, 2, 7.75], ['P', 120, -2, 5.1]], 1], [47.0, -423.0, [108.25]]], ['boundary control 1', [[['P', 100, 1, 2.0]], 1], [98.0, -2.0, [98.0]]], ['normal control 1', [[['S', 105, -1, 0.0], ['P', 80, 1, 3.4]], 100], [18160.0, None, [101.6]]], ['normal control 2', [[['P', 80, -1, 1.25], ['S', 85, 2, 0.0]], 100], [None, -24875.0, [84.375]]], ['normal control 3', [[['P', 95, 1, 1.25], ['S', 90, 2, 0.0], ['P', 80, -2, 5.1]], 1], [None, -236.05, [78.6833]]], ['normal control 4', [[['P', 95, 2, 5.1], ['P', 90, 1, 0.5], ['P', 105, 2, 2.0]], 100], [47530.0, -1470.0, [97.65]]]], [['regression call premium sign 1', [[['S', 80, -2, 0.0], ['C', 85, -1, 1.25], ['P', 100, 2, 0.5], ['C', 90, 1, 5.1]], 100], [35515.0, None, [88.03]]], ['regression call premium sign 2', [[['P', 85, -1, 0.5], ['C', 85, 2, 0.5]], 1], [None, -85.5, [85.25]]], ['partial repair probe 1', [[['P', 115, -2, 1.25], ['P', 80, -2, 3.4], ['C', 105, -2, 5.1], ['C', 95, 2, 5.1]], 1], [29.3, -380.7, [102.675]]], ['partial repair probe 2', [[['C', 105, -1, 5.1], ['P', 95, 1, 5.1], ['C', 85, 1, 5.1], ['P', 100, 1, 1.25]], 100], [18865.0, 865.0, []]], ['boundary control 1', [[['P', 100, 1, 2.0]], 1], [98.0, -2.0, [98.0]]], ['normal control 1', [[['P', 110, -1, 5.1], ['S', 85, 2, 0.0], ['S', 110, 2, 0.0]], 100], [None, -49490.0, [98.98]]], ['normal control 2', [[['P', 80, -1, 7.75]], 100], [775.0, -7225.0, [72.25]]], ['normal control 3', [[['P', 90, 2, 3.4]], 1], [173.2, -6.8, [86.6]]]], [['regression call premium sign 1', [[['C', 80, 2, 2.0], ['P', 105, 1, 2.0], ['P', 100, -1, 1.25], ['P', 110, 1, 0.5]], 1], [None, 29.75, []]], ['regression call premium sign 2', [[['C', 85, 1, 0.5], ['C', 105, -1, 1.25], ['S', 100, -2, 0.0], ['P', 105, 2, 0.5]], 1], [409.75, None, [109.875]]], ['partial repair probe 1', [[['P', 95, -2, 5.1], ['P', 90, 1, 2.0], ['C', 100, 1, 5.1], ['C', 120, -1, 5.1]], 100], [2820.0, -9180.0, [90.9]]], ['partial repair probe 2', [[['P', 80, 1, 7.75], ['P', 115, 1, 5.1], ['C', 80, -1, 0.5], ['C', 120, 1, 0.5]], 100], [18215.0, -5285.0, [91.075]]], ['boundary control 1', [[['P', 100, 1, 2.0]], 1], [98.0, -2.0, [98.0]]], ['normal control 1', [[['S', 85, -1, 0.0], ['P', 120, -2, 2.0], ['S', 95, -2, 0.0], ['P', 80, 1, 2.0]], 1], [117.0, None, [58.5]]], ['normal control 2', [[['S', 115, -2, 0.0]], 100], [23000.0, None, [115.0]]], ['normal control 3', [[['P', 85, -2, 1.25]], 1], [2.5, -167.5, [83.75]]]], [['regression call premium sign 1', [[['C', 80, 1, 3.4]], 100], [None, -340.0, [83.4]]], ['regression call premium sign 2', [[['C', 115, -1, 1.25], ['P', 105, -1, 0.5], ['P', 100, -1, 5.1]], 100], [685.0, None, [99.075, 121.85]]], ['partial repair probe 1', [[['C', 115, -1, 3.4], ['C', 80, 1, 3.4], ['S', 115, 1, 0.0]], 100], [None, -11500.0, [97.5]]], ['partial repair probe 2', [[['C', 105, 1, 0.5], ['S', 85, 1, 0.0], ['C', 90, -1, 0.5], ['S', 120, 1, 0.0]], 1], [None, -205.0, [110.0]]], ['boundary control 1', [[['P', 100, 1, 2.0]], 1], [98.0, -2.0, [98.0]]], ['normal control 1', [[['P', 105, -2, 1.25]], 100], [250.0, -20750.0, [103.75]]], ['normal control 2', [[['P', 110, -1, 1.25], ['P', 95, -1, 0.5], ['S', 110, 2, 0.0], ['P', 100, 2, 0.5]], 100], [None, -22425.0, [109.75]]], ['normal control 3', [[['S', 90, 1, 0.0]], 100], [None, -9000.0, [90.0]]]], [['regression call premium sign 1', [[['S', 100, 1, 0.0], ['C', 105, -2, 1.25], ['P', 110, 2, 0.5]], 1], [121.5, None, [111.5]]], ['regression call premium sign 2', [[['P', 100, -2, 0.5], ['C', 120, -2, 3.4], ['C', 90, 2, 5.1], ['S', 85, 1, 0.0]], 1], [None, -287.4, [93.48]]], ['partial repair probe 1', [[['C', 120, -1, 5.1], ['P', 110, 2, 0.5], ['C', 110, 1, 5.1]], 1], [219.0, -1.0, [109.5, 111.0]]], ['partial repair probe 2', [[['S', 120, -1, 0.0], ['C', 110, 1, 7.75], ['P', 110, 1, 5.1], ['C', 90, -1, 7.75]], 1], [224.9, None, [104.9667]]], ['boundary control 1', [[['P', 100, 1, 2.0]], 1], [98.0, -2.0, [98.0]]], ['normal control 1', [[['P', 120, -2, 5.1]], 1], [10.2, -229.8, [114.9]]], ['normal control 2', [[['P', 105, 1, 2.0]], 100], [10300.0, -200.0, [103.0]]], ['normal control 3', [[['P', 100, -1, 0.5], ['S', 110, 1, 0.0], ['P', 115, -2, 5.1]], 100], [None, -42930.0, [109.7667]]]]]\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":"7c2a9d30129ce51d298e7dc0d5d59293f4a7f595b22332c1060fc36fb5a15523","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(legs, multiplier):\n    def value(S):\n        t = Fraction(0)\n        for kind, k, q, prem in legs:\n            p = Fraction(str(prem))\n            if kind == 'C':\n                t += q * (max(S - k, 0) + p)\n            elif kind == 'P':\n                t += q * (max(k - S, 0) - p)\n            else:\n                t += q * (S - k)\n        return t * multiplier\n    pts = sorted(set([0] + [leg[1] for leg in legs]))\n    top = pts[-1]\n    slope = value(top + 1) - value(top)\n    vals = [value(p) for p in pts]\n    gain = None if slope > 0 else max(vals)\n    loss = None if slope < 0 else min(vals)\n    bes = []\n    for a, b in zip(pts, pts[1:]):\n        va, vb = value(a), value(b)\n        if va == 0:\n            bes.append(Fraction(a))\n        elif va * vb < 0:\n            bes.append(a - va * (b - a) / (vb - va))\n    vt = value(top)\n    if vt == 0:\n        bes.append(Fraction(top))\n    elif vt * slope < 0:\n        bes.append(top - vt / slope)\n    def r4(x):\n        return None if x is None else float(round(x, 4))\n    return [r4(gain), r4(loss), [r4(x) for x in sorted(set(bes))]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression call premium sign 1', [[['S', 85, 1, 0.0], ['C', 100, -2, 2.0], ['C', 90, -1, 0.5], ['C', 110, -2, 3.4]], 1], [16.3, None, [73.7, 108.15]]], ['regression call premium sign 2', [[['P', 95, -2, 3.4], ['C', 80, 1, 5.1]], 1], [None, -188.3, [89.4333]]], ['partial repair probe 1', [[['C', 120, -2, 7.75], ['P', 100, -2, 3.4], ['C', 105, 2, 7.75], ['P', 120, -2, 5.1]], 1], [47.0, -423.0, [108.25]]], ['boundary control 1', [[['P', 100, 1, 2.0]], 1], [98.0, -2.0, [98.0]]], ['normal control 1', [[['S', 105, -1, 0.0], ['P', 80, 1, 3.4]], 100], [18160.0, None, [101.6]]], ['normal control 2', [[['P', 80, -1, 1.25], ['S', 85, 2, 0.0]], 100], [None, -24875.0, [84.375]]], ['normal control 3', [[['P', 95, 1, 1.25], ['S', 90, 2, 0.0], ['P', 80, -2, 5.1]], 1], [None, -236.05, [78.6833]]], ['normal control 4', [[['P', 95, 2, 5.1], ['P', 90, 1, 0.5], ['P', 105, 2, 2.0]], 100], [47530.0, -1470.0, [97.65]]]], [['regression call premium sign 1', [[['S', 80, -2, 0.0], ['C', 85, -1, 1.25], ['P', 100, 2, 0.5], ['C', 90, 1, 5.1]], 100], [35515.0, None, [88.03]]], ['regression call premium sign 2', [[['P', 85, -1, 0.5], ['C', 85, 2, 0.5]], 1], [None, -85.5, [85.25]]], ['partial repair probe 1', [[['P', 115, -2, 1.25], ['P', 80, -2, 3.4], ['C', 105, -2, 5.1], ['C', 95, 2, 5.1]], 1], [29.3, -380.7, [102.675]]], ['partial repair probe 2', [[['C', 105, -1, 5.1], ['P', 95, 1, 5.1], ['C', 85, 1, 5.1], ['P', 100, 1, 1.25]], 100], [18865.0, 865.0, []]], ['boundary control 1', [[['P', 100, 1, 2.0]], 1], [98.0, -2.0, [98.0]]], ['normal control 1', [[['P', 110, -1, 5.1], ['S', 85, 2, 0.0], ['S', 110, 2, 0.0]], 100], [None, -49490.0, [98.98]]], ['normal control 2', [[['P', 80, -1, 7.75]], 100], [775.0, -7225.0, [72.25]]], ['normal control 3', [[['P', 90, 2, 3.4]], 1], [173.2, -6.8, [86.6]]]], [['regression call premium sign 1', [[['C', 80, 2, 2.0], ['P', 105, 1, 2.0], ['P', 100, -1, 1.25], ['P', 110, 1, 0.5]], 1], [None, 29.75, []]], ['regression call premium sign 2', [[['C', 85, 1, 0.5], ['C', 105, -1, 1.25], ['S', 100, -2, 0.0], ['P', 105, 2, 0.5]], 1], [409.75, None, [109.875]]], ['partial repair probe 1', [[['P', 95, -2, 5.1], ['P', 90, 1, 2.0], ['C', 100, 1, 5.1], ['C', 120, -1, 5.1]], 100], [2820.0, -9180.0, [90.9]]], ['partial repair probe 2', [[['P', 80, 1, 7.75], ['P', 115, 1, 5.1], ['C', 80, -1, 0.5], ['C', 120, 1, 0.5]], 100], [18215.0, -5285.0, [91.075]]], ['boundary control 1', [[['P', 100, 1, 2.0]], 1], [98.0, -2.0, [98.0]]], ['normal control 1', [[['S', 85, -1, 0.0], ['P', 120, -2, 2.0], ['S', 95, -2, 0.0], ['P', 80, 1, 2.0]], 1], [117.0, None, [58.5]]], ['normal control 2', [[['S', 115, -2, 0.0]], 100], [23000.0, None, [115.0]]], ['normal control 3', [[['P', 85, -2, 1.25]], 1], [2.5, -167.5, [83.75]]]], [['regression call premium sign 1', [[['C', 80, 1, 3.4]], 100], [None, -340.0, [83.4]]], ['regression call premium sign 2', [[['C', 115, -1, 1.25], ['P', 105, -1, 0.5], ['P', 100, -1, 5.1]], 100], [685.0, None, [99.075, 121.85]]], ['partial repair probe 1', [[['C', 115, -1, 3.4], ['C', 80, 1, 3.4], ['S', 115, 1, 0.0]], 100], [None, -11500.0, [97.5]]], ['partial repair probe 2', [[['C', 105, 1, 0.5], ['S', 85, 1, 0.0], ['C', 90, -1, 0.5], ['S', 120, 1, 0.0]], 1], [None, -205.0, [110.0]]], ['boundary control 1', [[['P', 100, 1, 2.0]], 1], [98.0, -2.0, [98.0]]], ['normal control 1', [[['P', 105, -2, 1.25]], 100], [250.0, -20750.0, [103.75]]], ['normal control 2', [[['P', 110, -1, 1.25], ['P', 95, -1, 0.5], ['S', 110, 2, 0.0], ['P', 100, 2, 0.5]], 100], [None, -22425.0, [109.75]]], ['normal control 3', [[['S', 90, 1, 0.0]], 100], [None, -9000.0, [90.0]]]], [['regression call premium sign 1', [[['S', 100, 1, 0.0], ['C', 105, -2, 1.25], ['P', 110, 2, 0.5]], 1], [121.5, None, [111.5]]], ['regression call premium sign 2', [[['P', 100, -2, 0.5], ['C', 120, -2, 3.4], ['C', 90, 2, 5.1], ['S', 85, 1, 0.0]], 1], [None, -287.4, [93.48]]], ['partial repair probe 1', [[['C', 120, -1, 5.1], ['P', 110, 2, 0.5], ['C', 110, 1, 5.1]], 1], [219.0, -1.0, [109.5, 111.0]]], ['partial repair probe 2', [[['S', 120, -1, 0.0], ['C', 110, 1, 7.75], ['P', 110, 1, 5.1], ['C', 90, -1, 7.75]], 1], [224.9, None, [104.9667]]], ['boundary control 1', [[['P', 100, 1, 2.0]], 1], [98.0, -2.0, [98.0]]], ['normal control 1', [[['P', 120, -2, 5.1]], 1], [10.2, -229.8, [114.9]]], ['normal control 2', [[['P', 105, 1, 2.0]], 100], [10300.0, -200.0, [103.0]]], ['normal control 3', [[['P', 100, -1, 0.5], ['S', 110, 1, 0.0], ['P', 115, -2, 5.1]], 100], [None, -42930.0, [109.7667]]]]]\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":"a2ff2a5534e7ba2242d0a27739f5ee5fe030ed1d4d3c3352aff0b19570bde1c0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(legs, multiplier):\n    def value(S):\n        t = Fraction(0)\n        for kind, k, q, prem in legs:\n            p = Fraction(str(prem))\n            if kind == 'C':\n                t += q * (max(S - k, 0) - p)\n            elif kind == 'P':\n                t += q * (max(k - S, 0) - p)\n            else:\n                t += q * (S - k)\n        return t * multiplier\n    pts = sorted(set([0] + [leg[1] for leg in legs]))\n    top = pts[-1]\n    slope = value(top + 1) - value(top)\n    vals = [value(p) for p in pts]\n    gain = None if slope > 0 else max(vals)\n    loss = None if slope < 0 else min(vals)\n    bes = []\n    for a, b in zip(pts, pts[1:]):\n        va, vb = value(a), value(b)\n        if va == 0:\n            bes.append(Fraction(a))\n        elif va * vb < 0:\n            bes.append(a - va * (b - a) / (vb - va))\n    vt = value(top)\n    if vt == 0:\n        bes.append(Fraction(top))\n    elif vt * slope < 0:\n        bes.append(top - vt / slope)\n    def r4(x):\n        return None if x is None else float(round(x, 4))\n    return [r4(gain), r4(loss), [r4(x) for x in sorted(set(bes))]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression call premium sign 1', [[['S', 85, 1, 0.0], ['C', 100, -2, 2.0], ['C', 90, -1, 0.5], ['C', 110, -2, 3.4]], 1], [16.3, None, [73.7, 108.15]]], ['regression call premium sign 2', [[['P', 95, -2, 3.4], ['C', 80, 1, 5.1]], 1], [None, -188.3, [89.4333]]], ['partial repair probe 1', [[['C', 120, -2, 7.75], ['P', 100, -2, 3.4], ['C', 105, 2, 7.75], ['P', 120, -2, 5.1]], 1], [47.0, -423.0, [108.25]]], ['boundary control 1', [[['P', 100, 1, 2.0]], 1], [98.0, -2.0, [98.0]]], ['normal control 1', [[['S', 105, -1, 0.0], ['P', 80, 1, 3.4]], 100], [18160.0, None, [101.6]]], ['normal control 2', [[['P', 80, -1, 1.25], ['S', 85, 2, 0.0]], 100], [None, -24875.0, [84.375]]], ['normal control 3', [[['P', 95, 1, 1.25], ['S', 90, 2, 0.0], ['P', 80, -2, 5.1]], 1], [None, -236.05, [78.6833]]], ['normal control 4', [[['P', 95, 2, 5.1], ['P', 90, 1, 0.5], ['P', 105, 2, 2.0]], 100], [47530.0, -1470.0, [97.65]]]], [['regression call premium sign 1', [[['S', 80, -2, 0.0], ['C', 85, -1, 1.25], ['P', 100, 2, 0.5], ['C', 90, 1, 5.1]], 100], [35515.0, None, [88.03]]], ['regression call premium sign 2', [[['P', 85, -1, 0.5], ['C', 85, 2, 0.5]], 1], [None, -85.5, [85.25]]], ['partial repair probe 1', [[['P', 115, -2, 1.25], ['P', 80, -2, 3.4], ['C', 105, -2, 5.1], ['C', 95, 2, 5.1]], 1], [29.3, -380.7, [102.675]]], ['partial repair probe 2', [[['C', 105, -1, 5.1], ['P', 95, 1, 5.1], ['C', 85, 1, 5.1], ['P', 100, 1, 1.25]], 100], [18865.0, 865.0, []]], ['boundary control 1', [[['P', 100, 1, 2.0]], 1], [98.0, -2.0, [98.0]]], ['normal control 1', [[['P', 110, -1, 5.1], ['S', 85, 2, 0.0], ['S', 110, 2, 0.0]], 100], [None, -49490.0, [98.98]]], ['normal control 2', [[['P', 80, -1, 7.75]], 100], [775.0, -7225.0, [72.25]]], ['normal control 3', [[['P', 90, 2, 3.4]], 1], [173.2, -6.8, [86.6]]]], [['regression call premium sign 1', [[['C', 80, 2, 2.0], ['P', 105, 1, 2.0], ['P', 100, -1, 1.25], ['P', 110, 1, 0.5]], 1], [None, 29.75, []]], ['regression call premium sign 2', [[['C', 85, 1, 0.5], ['C', 105, -1, 1.25], ['S', 100, -2, 0.0], ['P', 105, 2, 0.5]], 1], [409.75, None, [109.875]]], ['partial repair probe 1', [[['P', 95, -2, 5.1], ['P', 90, 1, 2.0], ['C', 100, 1, 5.1], ['C', 120, -1, 5.1]], 100], [2820.0, -9180.0, [90.9]]], ['partial repair probe 2', [[['P', 80, 1, 7.75], ['P', 115, 1, 5.1], ['C', 80, -1, 0.5], ['C', 120, 1, 0.5]], 100], [18215.0, -5285.0, [91.075]]], ['boundary control 1', [[['P', 100, 1, 2.0]], 1], [98.0, -2.0, [98.0]]], ['normal control 1', [[['S', 85, -1, 0.0], ['P', 120, -2, 2.0], ['S', 95, -2, 0.0], ['P', 80, 1, 2.0]], 1], [117.0, None, [58.5]]], ['normal control 2', [[['S', 115, -2, 0.0]], 100], [23000.0, None, [115.0]]], ['normal control 3', [[['P', 85, -2, 1.25]], 1], [2.5, -167.5, [83.75]]]], [['regression call premium sign 1', [[['C', 80, 1, 3.4]], 100], [None, -340.0, [83.4]]], ['regression call premium sign 2', [[['C', 115, -1, 1.25], ['P', 105, -1, 0.5], ['P', 100, -1, 5.1]], 100], [685.0, None, [99.075, 121.85]]], ['partial repair probe 1', [[['C', 115, -1, 3.4], ['C', 80, 1, 3.4], ['S', 115, 1, 0.0]], 100], [None, -11500.0, [97.5]]], ['partial repair probe 2', [[['C', 105, 1, 0.5], ['S', 85, 1, 0.0], ['C', 90, -1, 0.5], ['S', 120, 1, 0.0]], 1], [None, -205.0, [110.0]]], ['boundary control 1', [[['P', 100, 1, 2.0]], 1], [98.0, -2.0, [98.0]]], ['normal control 1', [[['P', 105, -2, 1.25]], 100], [250.0, -20750.0, [103.75]]], ['normal control 2', [[['P', 110, -1, 1.25], ['P', 95, -1, 0.5], ['S', 110, 2, 0.0], ['P', 100, 2, 0.5]], 100], [None, -22425.0, [109.75]]], ['normal control 3', [[['S', 90, 1, 0.0]], 100], [None, -9000.0, [90.0]]]], [['regression call premium sign 1', [[['S', 100, 1, 0.0], ['C', 105, -2, 1.25], ['P', 110, 2, 0.5]], 1], [121.5, None, [111.5]]], ['regression call premium sign 2', [[['P', 100, -2, 0.5], ['C', 120, -2, 3.4], ['C', 90, 2, 5.1], ['S', 85, 1, 0.0]], 1], [None, -287.4, [93.48]]], ['partial repair probe 1', [[['C', 120, -1, 5.1], ['P', 110, 2, 0.5], ['C', 110, 1, 5.1]], 1], [219.0, -1.0, [109.5, 111.0]]], ['partial repair probe 2', [[['S', 120, -1, 0.0], ['C', 110, 1, 7.75], ['P', 110, 1, 5.1], ['C', 90, -1, 7.75]], 1], [224.9, None, [104.9667]]], ['boundary control 1', [[['P', 100, 1, 2.0]], 1], [98.0, -2.0, [98.0]]], ['normal control 1', [[['P', 120, -2, 5.1]], 1], [10.2, -229.8, [114.9]]], ['normal control 2', [[['P', 105, 1, 2.0]], 100], [10300.0, -200.0, [103.0]]], ['normal control 3', [[['P', 100, -1, 0.5], ['S', 110, 1, 0.0], ['P', 115, -2, 5.1]], 100], [None, -42930.0, [109.7667]]]]]\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-strategy-risk-profile-call-premium-sign","generated_at":"2026-09-29T14:46:55.756218+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":"Subtract the premium paid from the call intrinsic value.","root_cause":"The call leg adds the premium instead of subtracting it.","sha256":"ede540acf3ce8794db77b661dc8df83b8d6d8a8d9b6c87d03901403afa4bd71e","title":"Option strategy max gain, max loss and breakevens: call premium is added to the call value · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":44.514,"exit_code":1,"observations":[{"actual":[5.5,null,[85.0,103.4375]],"check":"regression call premium sign 1","expected":[16.3,null,[73.7,108.15]],"passed":false},{"actual":[null,-183.2,[88.7218]],"check":"regression call premium sign 2","expected":[null,-188.3,[89.4333]],"passed":false},{"actual":[null,-423.0,[109.382]],"check":"partial repair probe 1","expected":[47.0,-423.0,[108.25]],"passed":false},{"actual":[98.0,-2.0,[98.0]],"check":"boundary control 1","expected":[98.0,-2.0,[98.0]],"passed":true},{"actual":[18160.0,null,[101.6]],"check":"normal control 1","expected":[18160.0,null,[101.6]],"passed":true},{"actual":[null,-24875.0,[84.375]],"check":"normal control 2","expected":[null,-24875.0,[84.375]],"passed":true},{"actual":[null,-236.05,[78.6833]],"check":"normal control 3","expected":[null,-236.05,[78.6833]],"passed":true},{"actual":[47530.0,-1470.0,[97.65]],"check":"normal control 4","expected":[47530.0,-1470.0,[97.65]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression call premium sign 1\", \"actual\": [5.5, null, [85.0, 103.4375]], \"expected\": [16.3, null, [73.7, 108.15]], \"passed\": false}, {\"check\": \"regression call premium sign 2\", \"actual\": [null, -183.2, [88.7218]], \"expected\": [null, -188.3, [89.4333]], \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": [null, -423.0, [109.382]], \"expected\": [47.0, -423.0, [108.25]], \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": [98.0, -2.0, [98.0]], \"expected\": [98.0, -2.0, [98.0]], \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [18160.0, null, [101.6]], \"expected\": [18160.0, null, [101.6]], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [null, -24875.0, [84.375]], \"expected\": [null, -24875.0, [84.375]], \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": [null, -236.05, [78.6833]], \"expected\": [null, -236.05, [78.6833]], \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": [47530.0, -1470.0, [97.65]], \"expected\": [47530.0, -1470.0, [97.65]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":46.221,"exit_code":1,"observations":[{"actual":[-6.3,null,[]],"check":"regression call premium sign 1","expected":[16.3,null,[73.7,108.15]],"passed":false},{"actual":[null,-178.1,[86.0333]],"check":"regression call premium sign 2","expected":[null,-188.3,[89.4333]],"passed":false},{"actual":[47.0,-423.0,[108.25]],"check":"partial repair probe 1","expected":[47.0,-423.0,[108.25]],"passed":true},{"actual":[98.0,-2.0,[98.0]],"check":"boundary control 1","expected":[98.0,-2.0,[98.0]],"passed":true},{"actual":[18160.0,null,[101.6]],"check":"normal control 1","expected":[18160.0,null,[101.6]],"passed":true},{"actual":[null,-24875.0,[84.375]],"check":"normal control 2","expected":[null,-24875.0,[84.375]],"passed":true},{"actual":[null,-236.05,[78.6833]],"check":"normal control 3","expected":[null,-236.05,[78.6833]],"passed":true},{"actual":[47530.0,-1470.0,[97.65]],"check":"normal control 4","expected":[47530.0,-1470.0,[97.65]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression call premium sign 1\", \"actual\": [-6.3, null, []], \"expected\": [16.3, null, [73.7, 108.15]], \"passed\": false}, {\"check\": \"regression call premium sign 2\", \"actual\": [null, -178.1, [86.0333]], \"expected\": [null, -188.3, [89.4333]], \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": [47.0, -423.0, [108.25]], \"expected\": [47.0, -423.0, [108.25]], \"passed\": true}, {\"check\": \"boundary control 1\", \"actual\": [98.0, -2.0, [98.0]], \"expected\": [98.0, -2.0, [98.0]], \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [18160.0, null, [101.6]], \"expected\": [18160.0, null, [101.6]], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [null, -24875.0, [84.375]], \"expected\": [null, -24875.0, [84.375]], \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": [null, -236.05, [78.6833]], \"expected\": [null, -236.05, [78.6833]], \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": [47530.0, -1470.0, [97.65]], \"expected\": [47530.0, -1470.0, [97.65]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":45.586,"exit_code":0,"observations":[{"actual":[16.3,null,[73.7,108.15]],"check":"regression call premium sign 1","expected":[16.3,null,[73.7,108.15]],"passed":true},{"actual":[null,-188.3,[89.4333]],"check":"regression call premium sign 2","expected":[null,-188.3,[89.4333]],"passed":true},{"actual":[47.0,-423.0,[108.25]],"check":"partial repair probe 1","expected":[47.0,-423.0,[108.25]],"passed":true},{"actual":[98.0,-2.0,[98.0]],"check":"boundary control 1","expected":[98.0,-2.0,[98.0]],"passed":true},{"actual":[18160.0,null,[101.6]],"check":"normal control 1","expected":[18160.0,null,[101.6]],"passed":true},{"actual":[null,-24875.0,[84.375]],"check":"normal control 2","expected":[null,-24875.0,[84.375]],"passed":true},{"actual":[null,-236.05,[78.6833]],"check":"normal control 3","expected":[null,-236.05,[78.6833]],"passed":true},{"actual":[47530.0,-1470.0,[97.65]],"check":"normal control 4","expected":[47530.0,-1470.0,[97.65]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression call premium sign 1\", \"actual\": [16.3, null, [73.7, 108.15]], \"expected\": [16.3, null, [73.7, 108.15]], \"passed\": true}, {\"check\": \"regression call premium sign 2\", \"actual\": [null, -188.3, [89.4333]], \"expected\": [null, -188.3, [89.4333]], \"passed\": true}, {\"check\": \"partial repair probe 1\", \"actual\": [47.0, -423.0, [108.25]], \"expected\": [47.0, -423.0, [108.25]], \"passed\": true}, {\"check\": \"boundary control 1\", \"actual\": [98.0, -2.0, [98.0]], \"expected\": [98.0, -2.0, [98.0]], \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [18160.0, null, [101.6]], \"expected\": [18160.0, null, [101.6]], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [null, -24875.0, [84.375]], \"expected\": [null, -24875.0, [84.375]], \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": [null, -236.05, [78.6833]], \"expected\": [null, -236.05, [78.6833]], \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": [47530.0, -1470.0, [97.65]], \"expected\": [47530.0, -1470.0, [97.65]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}