{
  "approach": "Measurement-only seat: return the original strategy unchanged, with its tick probes, sub-tick filter, marginal retail-versus-arbitrage sizing, queue preservation and cheap YES inventory. No strategy improvements or tuning were attempted. Reproduce seeds 0-199, freeze on 0-599 and 20000-20599, estimate the base expected edge on 4,000 additional seeds, split by settlement, configured competitor spread and starting probability, and estimate pair-specific test sizes with a fixed diagnostic parameter perturbation. Detailed measurements and sample-size formulas are in tried. The 4,000-run mean is 85.95924845104246 with standard error 2.334517677862521; no simulation failed.",
  "blocked": null,
  "python_version": "3.14.4",
  "base_mean_edge": 78.85441957511699,
  "score": {
    "mean_edge": 87.41650726068066,
    "retail_edge": 116.13125849331949,
    "arb_edge": -28.714751232636335,
    "simulations": 600,
    "seed_start": 0,
    "failures": 0
  },
  "holdout": {
    "mean_edge": 85.46780344973116,
    "simulations": 600,
    "seed_start": 20000,
    "failures": 0
  },
  "code": "\"\"\"Stale-quote defence with tick probes, a sub-tick belief and YES ammunition.\n\nEvery step the arbitrageur removes any order on the wrong side of p, so tiny\ntwo-sided probes around the estimate locate p to a tick; a grid filter narrows\nthat further.  Quotes sit one tick inside the competitor and are sized by the\nmarginal rule: one more share is worth quoting while the chance a retail order\nreaches it, times its edge, exceeds the expected arbitrage loss.  That rule pulls\nquotes by itself when a move would hurt most.  Near p=0 a retail buy pays almost\nits whole notional as edge, so YES is held to cover low asks.\n\"\"\"\nimport math\nfrom orderbook_pm_challenge.strategy import BaseStrategy\nfrom orderbook_pm_challenge.types import CancelOrder, PlaceOrder, Side\n\nP = dict(lam_r=0.25, m=5.0, sig_n=1.2, lam_j=0.0019, sig_j=0.35, sig=0.02,\n         qmax=3000.0, rmin=2, kA=0.7, kL=0.15, pL=0.05,\n         ammo=1.0, ydem=0.4, W=200.0, fy=0.6, ammo_q=60.0, ammo_pmax=0.05, ammo_maxpay=0.02,\n         fb=0.9, fu=0.5, xu=0.1, sticky=1.0, min_ahead=2.0, keep_hi=1.5, keep_lo=0.7, Hu=300.0, bins=8.0, filt=1.0, uni=0.01, jumpinfo=1.0, dmin=0.0, kLb=0.08, kLf=0.08, pinf=1.0, pre=1500.0, H1=100.0)\nSQ2 = math.sqrt(2.0)\nSQ2PI = math.sqrt(2.0 * math.pi)\ndef cdf(x): return 0.5 * (1.0 + math.erf(x / SQ2))\ndef pdf(x): return math.exp(-0.5 * x * x) / SQ2PI\ndef inv(p):\n    p = min(max(p, 1e-9), 1 - 1e-9)\n    t = math.sqrt(-2.0 * math.log(min(p, 1 - p)))\n    x = t - (2.515517 + 0.802853 * t + 0.010328 * t * t) / (1 + 1.432788 * t + 0.189269 * t * t + 0.001308 * t ** 3)\n    x = -x if p < 0.5 else x\n    for _ in range(2):\n        d = pdf(x)\n        if d < 1e-12:\n            break\n        x -= (cdf(x) - p) / d\n    return x\ndef lpm(k):\n    return pdf(k) + k * cdf(k)\ndef fl(q):\n    return math.floor(q * 100 + 1e-9) / 100\n\nNODES = [(-2.2, .06), (-1.3, .17), (-0.6, .27), (0.6, .27), (1.3, .17), (2.2, .06)]\nPROBE = 0.01\n\n\nclass Strategy(BaseStrategy):\n    def __init__(self):\n        self.n = 0\n        self.ahead = set()     # main orders placed strictly ahead of any competitor order at their tick\n        self.res = {}          # order id -> uncovered quantity at placement\n        self.bc = None         # belief: sub-tick grid centres (ticks)\n        self.bw = None         # belief: weights\n        self.st = 0.5          # last one-step sd in ticks\n        self.pcb = self.pca = None\n        self.pb = set()\n        self.pa = set()\n\n    def _oid(self, tag):\n        self.n += 1\n        return tag + str(self.n)\n\n    def on_step(self, state):\n        H = max(1, state.steps_remaining)\n        cb = state.competitor_best_bid_ticks or 0\n        ca = state.competitor_best_ask_ticks or 100\n        lo, hi = cb, ca\n        for o in state.own_orders:\n            if o.side is Side.BUY:\n                lo = max(lo, o.price_ticks)\n            else:\n                hi = min(hi, o.price_ticks)\n        if P['pinf'] > 0:\n            sb = {o.price_ticks for o in state.own_orders if o.side is Side.BUY and o.remaining_quantity <= PROBE + 1e-9}\n            sa = {o.price_ticks for o in state.own_orders if o.side is Side.SELL and o.remaining_quantity <= PROBE + 1e-9}\n            ea = self.pa - sa\n            eb = self.pb - sb\n            if sa and ea:\n                lo = max(lo, min(max(ea), hi))\n            if sb and eb:\n                hi = min(hi, max(min(eb), lo))\n        if P['jumpinfo'] > 0 and self.pcb is not None:\n            if ca > self.pca + 1:\n                lo = max(lo, ca - 1)\n            if cb < self.pcb - 1:\n                hi = min(hi, cb + 1)\n        self.pcb, self.pca = cb, ca\n        if lo > hi:\n            lo, hi = hi, lo\n        # sub-tick belief over p_(t-1): predict with one-step noise, truncate to [lo, hi]\n        wid = max(hi - lo, 1e-6)\n        nb = max(2, min(48, int(round(wid * P['bins']))))\n        cs = [lo + (i + 0.5) * wid / nb for i in range(nb)]\n        if self.bc is None or P['filt'] <= 0:\n            ws = [1.0 / nb] * nb\n        else:\n            sg = max(self.st, 0.6 * wid / nb)\n            k = -0.5 / (sg * sg)\n            ws = []\n            uni = P['uni'] * sg\n            for c in cs:\n                t = uni\n                for ci, wi in zip(self.bc, self.bw):\n                    d = c - ci\n                    d2 = d * d * k\n                    if d2 > -12.5:\n                        t += wi * math.exp(d2)\n                ws.append(t)\n            tot = sum(ws)\n            ws = [w / tot for w in ws]\n        self.bc, self.bw = cs, ws\n        mean_t = sum(c * w for c, w in zip(cs, ws))\n        var_t = max(sum(c * c * w for c, w in zip(cs, ws)) - mean_t * mean_t, 0.0)\n        phat = min(max(mean_t / 100.0, 0.002), 0.998)\n        var = P['sig'] ** 2 + P['lam_j'] * P['sig_j'] ** 2\n        sd = math.sqrt(H * var)\n        z = inv(phat)\n        Z = z * sd\n        sp = pdf(z) / sd * P['sig']\n        self.st = sp * 100.0\n        s = math.sqrt(sp * sp + var_t / 1e4 + 1e-8)\n        sd1 = math.sqrt(max(1.0, H - 1.0) * var)\n        jp = [(cdf((Z + n * P['sig_j']) / sd1), w) for n, w in NODES]\n        lj = P['lam_j']\n\n        def AB(x):\n            k = (x - phat) / s\n            a = s * lpm(k)\n            b = a - (x - phat)\n            ja = sum(w * max(0.0, x - p) for p, w in jp)\n            jb = sum(w * max(0.0, p - x) for p, w in jp)\n            return (1 - lj) * a + lj * ja, (1 - lj) * b + lj * jb\n\n        if H == 1:\n            def AB(x):\n                return (1 - phat) * x, phat * (1 - x)\n        rho = P['lam_r'] * 0.5\n        mu = math.log(P['m']) - 0.5 * P['sig_n'] ** 2\n        kA = P['kL'] if phat < P['pL'] else P['kA']\n\n        def qsize(loss, gain, px):\n            loss *= kA\n            if gain <= 0:\n                return 0.0\n            tail = loss / (rho * gain)\n            if tail >= 1.0:\n                return 0.0\n            return min(P['qmax'], math.exp(mu + P['sig_n'] * inv(1 - max(tail, 1e-6))) / px)\n\n        ptk = phat * 100\n        def qbid(t):\n            if not 1 <= t <= 99:\n                return 0.0\n            a, b = AB(t / 100.0)\n            if phat * 100 - t < P['dmin']:\n                return 0.0\n            if phat < P['pL']:\n                ytg = P['ydem'] * min(H, P['W']) / max(ca - 1, ptk + 1) * 100.0\n                a *= (P['kLb'] if state.yes_inventory < ytg else P['kLf']) / P['kL']\n            return qsize(a, b, max(phat, 0.05))\n\n        def qask(t):\n            if not 1 <= t <= 99:\n                return 0.0\n            a, b = AB(t / 100.0)\n            if t - phat * 100 < P['dmin']:\n                return 0.0\n            return qsize(b, a, t / 100.0)\n\n        bids = [o for o in state.own_orders if o.side is Side.BUY and o.remaining_quantity > PROBE + 1e-9]\n        asks = [o for o in state.own_orders if o.side is Side.SELL and o.remaining_quantity > PROBE + 1e-9]\n        sticky = P['sticky'] > 0\n        def top(orders, comp, step):\n            if sticky and sum(o.remaining_quantity for o in orders if o.price_ticks == comp and o.order_id in self.ahead) >= P['min_ahead']:\n                return comp\n            return comp + step\n        bid_t = top(bids, cb, 1)\n        ask_t = top(asks, ca, -1)\n        qb = qbid(bid_t)\n        qa = qask(ask_t)\n\n        Y = state.yes_inventory\n        if ask_t == 1 and H > P['H1'] and P['pre'] > 0:\n            qa = 0.0          # let the competitor's 2-tick ask erode instead of fronting it for nothing\n        # ammunition: hold YES so that low asks are covered\n        ptick = phat * 100\n        amt = 0\n        qam = 0.0\n        if P['ammo'] > 0 and ask_t >= 2 and phat < P['ammo_pmax']:\n            wealth = state.cash + Y * phat\n            x = max(ask_t, ptick + 1) / 100.0\n            target = min(P['ydem'] * min(H, P['W']) / x, P['fy'] * wealth / max(phat, 0.005))\n            if Y < target:\n                t = max(1, min(99, int(math.ceil(ptick + 1e-9))))\n                if bid_t <= t < ask_t and t / 100.0 - phat < P['ammo_maxpay']:\n                    amt = t\n                    qam = min(P['ammo_q'], target - Y)\n\n        if P['pre'] > 0 and ca == 2 and phat < 0.01 and H > P['H1'] and Y < P['pre'] and not qam:\n            amt, qam = 1, min(P['ammo_q'], P['pre'] - Y)\n        # order management\n        actions = []\n        free = state.free_cash - 2.0\n        keep_ask = 0.0\n        new_b = []\n        new_a = []\n        def cancel(o):\n            nonlocal free\n            actions.append(CancelOrder(o.order_id))\n            x = o.price_ticks / 100.0\n            if o.side is Side.BUY:\n                free += x * o.remaining_quantity\n            else:\n                free += (1 - x) * min(self.res.get(o.order_id, 0.0), o.remaining_quantity)\n            self.ahead.discard(o.order_id)\n            self.res.pop(o.order_id, None)\n        for o in state.own_orders:\n            if o.remaining_quantity <= PROBE + 1e-9:\n                cancel(o)\n        kept_ids = set()\n        def manage(orders, t, q, comp):\n            kept = 0.0\n            for o in orders:\n                if o.price_ticks == t and q > 0 and kept + o.remaining_quantity <= max(q * P['keep_hi'], 1.0):\n                    kept += o.remaining_quantity\n                    kept_ids.add(o.order_id)\n                else:\n                    cancel(o)\n            return kept\n        kb = manage(bids, bid_t, qb, cb)\n        ka = manage(asks, ask_t, qa, ca)\n        add_b = (qb - kb) if (kb < qb * P['keep_lo'] and bid_t != cb) else 0.0\n        add_a = (qa - ka) if (ka < qa * P['keep_lo'] and ask_t != ca) else 0.0\n\n        budget = P['fb'] * max(free, 0.0)\n        cost = add_b * bid_t / 100.0 + qam * amt / 100.0\n        if cost > budget:\n            f = budget / cost\n            add_b *= f\n            qam *= f\n            cost = budget\n        out = []\n        if amt and qam >= 0.01:\n            q = fl(qam)\n            out.append(PlaceOrder(side=Side.BUY, price_ticks=amt, quantity=q))\n            free -= q * amt / 100.0 + 1e-6\n        if bid_t >= 1 and add_b >= 0.01:\n            q = fl(add_b)\n            oid = self._oid('b')\n            out.append(PlaceOrder(side=Side.BUY, price_ticks=bid_t, quantity=q, client_order_id=oid))\n            free -= q * bid_t / 100.0 + 1e-6\n            if bid_t > cb:\n                self.ahead.add(oid)\n        if ask_t <= 99 and add_a >= 0.01:\n            x = ask_t / 100.0\n            covk = sum(o.remaining_quantity - min(self.res.get(o.order_id, 0.0), o.remaining_quantity)\n                       for o in asks if o.order_id in kept_ids)\n            cov = max(0.0, Y - covk - 0.1)\n            unc = max(0.0, add_a - cov)\n            if unc > 0:\n                ub = max(0.0, free - (1 - P['fu']) * max(state.cash, 0.0)) if x >= P['xu'] else 0.0\n                if H < P['Hu'] and phat < 0.05:\n                    ub = max(0.0, free * (1 - H / P['Hu']))\n                unc = min(unc, ub / (1 - x))\n            q = fl(min(add_a, cov + unc))\n            if q >= 0.01:\n                oid = self._oid('a')\n                out.append(PlaceOrder(side=Side.SELL, price_ticks=ask_t, quantity=q, client_order_id=oid))\n                r = max(0.0, q - cov)\n                self.res[oid] = r\n                free -= r * (1 - x) + 1e-6\n                if ask_t < ca:\n                    self.ahead.add(oid)\n\n        # probes: tiny orders that the arbitrageur removes when p crosses them\n        f = int(math.floor(ptick + 1e-9))\n        r = max(int(P['rmin']), int(math.ceil(2.0 * s * 100)))\n        self.pb = set()\n        self.pa = set()\n        if free > 1.0:\n            for t in range(f, f + r + 1):\n                if cb < t < ca and 1 <= t <= 99:\n                    out.append(PlaceOrder(side=Side.BUY, price_ticks=t, quantity=PROBE))\n                    self.pb.add(t)\n            for t in range(f + 1 - r, f + 2):\n                if cb < t < ca and 1 <= t <= 99:\n                    out.append(PlaceOrder(side=Side.SELL, price_ticks=t, quantity=PROBE))\n                    self.pa.add(t)\n        return actions + out\n",
  "code_sha256": "432d867b1459fdcae2aba14e8634d3aa8d181f3f81d16f8a8deed5252aab75c4",
  "tried": [
    "Scope: measurement only; original base code returned byte-for-byte. No constants searched, no winner selected, no seed recognition. Base source: https://api.imd.fun/artifacts/7236701c55bd1d2e0674854545ae0bbe4d4b54508c7f7a7c914261696b02e158 .",
    "Reproduction: seeds 0-199 from the first 200 rows of the unchanged 0-599 run. Python sums divided by successful count exactly as BatchResult; target 78.85441957511699; measured 78.85441957511699.",
    "Provenance: public simulator commit b244530ee2a6247b5f930830eeca9dd950da0e7e, unmodified, Python 3.14.4, default 2,000 steps and default variance. Commands: python3 -m orderbook_pm_challenge run ../base.py --simulations 200 --seed-start START --json; concatenated ascending contiguous 200-run chunks. Four independent serial processes; --workers 4 refused with PermissionError: [Errno 1] Operation not permitted in forkserver socket creation.",
    "Frozen train 0-599: {\"n\":600,\"mean_edge\":87.41650726068066,\"standard_deviation\":145.6327272454602,\"standard_error\":5.945431193354917,\"normal_95pct_ci\":[75.76367624914403,99.0693382722173],\"retail_edge\":116.13125849331949,\"arb_edge\":-28.714751232636335,\"retail_standard_error\":7.026946510486278,\"arb_standard_error\":1.9247719432855914,\"minimum\":-417.0307978151,\"maximum\":912.6355509771}",
    "Frozen holdout 20000-20599: {\"n\":600,\"mean_edge\":85.46780344973116,\"standard_deviation\":145.68021087578228,\"standard_error\":5.947369704445318,\"normal_95pct_ci\":[73.8111730262737,97.12443387318862],\"retail_edge\":116.733824436559,\"arb_edge\":-31.266020986832835,\"retail_standard_error\":6.881942955279391,\"arb_standard_error\":2.1021228777419894,\"minimum\":-480.4037693786,\"maximum\":894.9353154677}",
    "Sandbox base seeds 0-19: {\"simulations\":20,\"failures\":0,\"mean_edge\":90.48990905832001,\"errors\":[]}",
    "Sandbox starter seeds 0-19: {\"simulations\":20,\"failures\":0,\"mean_edge\":-4.3962377512,\"errors\":[]}",
    "Precision protocol fixed before measurement: 4,000 consecutive seeds 1000000-1003999, outside 0-599 and 20000-20599 and disjoint from the supplied known windows. No measurement seed was used for tuning. Treat seeds as draws from the simulator default randomization, not evidence of identical leaderboard sampling. Confidence intervals concern expected edge, not terminal wealth. All groups include every successful run; all 4,000 succeeded.",
    "TRUE MEAN primary measurement seeds 1000000-1003999: {\"n\":4000,\"mean_edge\":85.95924845104246,\"standard_deviation\":147.64786199945624,\"standard_error\":2.334517677862521,\"normal_95pct_ci\":[81.38367788115984,90.53481902092507],\"retail_edge\":114.69609963869685,\"arb_edge\":-28.7368511876667,\"retail_standard_error\":2.6756130586737745,\"arb_standard_error\":0.8176934382881643,\"minimum\":-689.9797614994,\"maximum\":1290.8015787426}",
    "Method: sample SD uses denominator n-1; standard error=SD/sqrt(n); reported marginal 95% intervals=mean +/- 1.959963984540054*SE (normal approximation). Conditional strata are descriptive, not causal or deployable signals. Split by configured competitor spread_ticks (not the changing visible gap); starting price is regime.initial_probability before step 0.",
    "Settlement 0: {\"n\":2022,\"mean_edge\":152.30342442719353,\"standard_deviation\":180.1562531883129,\"standard_error\":4.00644112721768,\"normal_95pct_ci\":[144.45094411166681,160.15590474272025],\"retail_edge\":197.7411773780354,\"arb_edge\":-45.437752950857266,\"retail_standard_error\":4.531878011442836,\"arb_standard_error\":1.2088582076709868,\"minimum\":-619.5873904809,\"maximum\":1290.8015787426}",
    "Settlement 1: {\"n\":1978,\"mean_edge\":18.139266740335945,\"standard_deviation\":42.58817271008592,\"standard_error\":0.9575817554623688,\"normal_95pct_ci\":[16.26244098737706,20.016092493294828],\"retail_edge\":29.803709755510514,\"arb_edge\":-11.66444301518372,\"retail_standard_error\":0.7812600754439702,\"arb_standard_error\":0.9572207061847071,\"minimum\":-689.9797614994,\"maximum\":350.9296980574}",
    "Competitor spread_ticks=1: {\"n\":1045,\"mean_edge\":12.948762686706411,\"standard_deviation\":36.68407160384549,\"standard_error\":1.134800157115575,\"normal_95pct_ci\":[10.72459524910949,15.172930124303333],\"retail_edge\":29.222931356870333,\"arb_edge\":-16.274168670166315,\"retail_standard_error\":1.4481833934907677,\"arb_standard_error\":0.9714050263265919,\"minimum\":-445.4374617483,\"maximum\":192.3332033724}",
    "Spread=1, settlement=0: {\"n\":515,\"mean_edge\":28.165404405440196,\"standard_deviation\":37.49823702925728,\"standard_error\":1.6523697488742881,\"normal_95pct_ci\":[24.926819208503098,31.403989602377294],\"retail_edge\":57.06385513229709,\"arb_edge\":-28.898450726855536,\"retail_standard_error\":2.374953590586358,\"arb_standard_error\":1.2081854123886158,\"minimum\":-143.130353377,\"maximum\":192.3332033724}",
    "Spread=1, settlement=1: {\"n\":530,\"mean_edge\":-1.837219360742453,\"standard_deviation\":29.071017381459868,\"standard_error\":1.2627643019388894,\"normal_95pct_ci\":[-4.312191913505538,0.6377531920206327],\"retail_edge\":2.169958254333019,\"arb_edge\":-4.007177615081509,\"retail_standard_error\":0.16783102371129427,\"arb_standard_error\":1.3101428167106135,\"minimum\":-445.4374617483,\"maximum\":12.8311530132}",
    "Competitor spread_ticks=2: {\"n\":976,\"mean_edge\":65.20864355334867,\"standard_deviation\":110.46198782348007,\"standard_error\":3.535802068025984,\"normal_95pct_ci\":[58.27859884355549,72.13868826314183],\"retail_edge\":100.03977995240379,\"arb_edge\":-34.83113639907029,\"retail_standard_error\":4.658476812184362,\"arb_standard_error\":2.002738143285185,\"minimum\":-689.9797614994,\"maximum\":595.1532706054}",
    "Spread=2, settlement=0: {\"n\":482,\"mean_edge\":122.85856379043777,\"standard_deviation\":129.18649614883475,\"standard_error\":5.884283657705677,\"normal_95pct_ci\":[111.32557974651702,134.3915478343585],\"retail_edge\":182.68802155749253,\"arb_edge\":-59.829457767068256,\"retail_standard_error\":7.768084931919018,\"arb_standard_error\":3.145690721367518,\"minimum\":-619.5873904809,\"maximum\":595.1532706054}",
    "Spread=2, settlement=1: {\"n\":494,\"mean_edge\":8.959126236998584,\"standard_deviation\":37.798695316326956,\"standard_error\":1.7006437026233043,\"normal_95pct_ci\":[5.625925829322061,12.292326644675107],\"retail_edge\":19.399187940960932,\"arb_edge\":-10.44006170397915,\"retail_standard_error\":0.8006883299737203,\"arb_standard_error\":1.9515749238655904,\"minimum\":-689.9797614994,\"maximum\":91.2158352008}",
    "Competitor spread_ticks=3: {\"n\":1031,\"mean_edge\":112.41730918361009,\"standard_deviation\":159.88727709426092,\"standard_error\":4.9794866668358395,\"normal_95pct_ci\":[102.65769465511444,122.17692371210573],\"retail_edge\":145.93103929271803,\"arb_edge\":-33.5137301091257,\"retail_standard_error\":5.6332528751149695,\"arb_standard_error\":1.8489452855136368,\"minimum\":-616.7495759251,\"maximum\":1078.164336998}",
    "Spread=3, settlement=0: {\"n\":528,\"mean_edge\":196.57108240752785,\"standard_deviation\":182.20905248140576,\"standard_error\":7.929631187467961,\"normal_95pct_ci\":[181.02929086940506,212.11287394565065],\"retail_edge\":245.4137597187983,\"arb_edge\":-48.842677311295645,\"retail_standard_error\":8.975695556642885,\"arb_standard_error\":2.4226010751004794,\"minimum\":-616.7495759251,\"maximum\":1078.164336998}",
    "Spread=3, settlement=1: {\"n\":503,\"mean_edge\":24.08094285711193,\"standard_deviation\":48.27912974243367,\"standard_error\":2.152659997995888,\"normal_95pct_ci\":[19.861806790079925,28.300078924143932],\"retail_edge\":41.50384966057018,\"arb_edge\":-17.42290680346819,\"retail_standard_error\":1.503609937492804,\"arb_standard_error\":2.6272645332205675,\"minimum\":-552.6557915861,\"maximum\":167.3909732135}",
    "Competitor spread_ticks=4: {\"n\":948,\"mean_edge\":159.02917185674187,\"standard_deviation\":194.35324440870681,\"standard_error\":6.312299928917038,\"normal_95pct_ci\":[146.65729133644973,171.401052377034],\"retail_edge\":190.03450268198262,\"arb_edge\":-31.00533082525506,\"retail_standard_error\":6.972516040769943,\"arb_standard_error\":1.4894751871583018,\"minimum\":-473.2761770304,\"maximum\":1290.8015787426}",
    "Spread=4, settlement=0: {\"n\":497,\"mean_edge\":262.46475184067987,\"standard_deviation\":219.636922229091,\"standard_error\":9.852062424519819,\"normal_95pct_ci\":[243.15506431518065,281.7744393661791],\"retail_edge\":307.4661644728726,\"arb_edge\":-45.001412632216905,\"retail_standard_error\":10.76033425628082,\"arb_standard_error\":2.3925698061169824,\"minimum\":-473.2761770304,\"maximum\":1290.8015787426}",
    "Spread=4, settlement=1: {\"n\":451,\"mean_edge\":45.043621408810196,\"standard_deviation\":38.496882030298636,\"standard_error\":1.8127473765307551,\"normal_95pct_ci\":[41.490701837740446,48.59654097987995],\"retail_edge\":60.625332149671394,\"arb_edge\":-15.581710740864745,\"retail_standard_error\":1.8524574502693045,\"arb_standard_error\":1.360999757114783,\"minimum\":-280.2542432479,\"maximum\":350.9296980574}",
    "Starting price [0,0.35): {\"n\":810,\"mean_edge\":148.508519561031,\"standard_deviation\":203.48299080734625,\"standard_error\":7.149663511714652,\"normal_95pct_ci\":[134.4954365764901,162.52160254557188],\"retail_edge\":193.45933396563075,\"arb_edge\":-44.95081440459914,\"retail_standard_error\":8.048794262417786,\"arb_standard_error\":2.3317827231295563,\"minimum\":-689.9797614994,\"maximum\":1290.8015787426}",
    "Starting price [0.35,0.45): {\"n\":814,\"mean_edge\":100.9008470678226,\"standard_deviation\":157.45169713762073,\"standard_error\":5.5186791287578965,\"normal_95pct_ci\":[90.08443473322424,111.71725940242095],\"retail_edge\":136.21105928325406,\"arb_edge\":-35.31021221543329,\"retail_standard_error\":6.3110891792924,\"arb_standard_error\":1.9331948965146677,\"minimum\":-492.7520316992,\"maximum\":959.0218846165}",
    "Starting price [0.45,0.55): {\"n\":755,\"mean_edge\":78.78035587576159,\"standard_deviation\":122.92023643552685,\"standard_error\":4.4735254369369155,\"normal_95pct_ci\":[70.01240713544142,87.54830461608175],\"retail_edge\":104.64347796980026,\"arb_edge\":-25.86312209403682,\"retail_standard_error\":5.2116613672374035,\"arb_standard_error\":1.3209346458001192,\"minimum\":-146.366543668,\"maximum\":801.3763148166}",
    "Starting price [0.55,0.65): {\"n\":846,\"mean_edge\":59.46509120327187,\"standard_deviation\":111.37812125129287,\"standard_error\":3.8292586875657166,\"normal_95pct_ci\":[51.95988208815595,66.97030031838779],\"retail_edge\":80.31908564689668,\"arb_edge\":-20.853994443677777,\"retail_standard_error\":4.462945429809809,\"arb_standard_error\":1.468685389263314,\"minimum\":-552.6557915861,\"maximum\":1069.2176716305}",
    "Starting price [0.65,1): {\"n\":775,\"mean_edge\":40.806667874011744,\"standard_deviation\":88.68404322417706,\"standard_error\":3.1856248736467765,\"normal_95pct_ci\":[34.5629578534091,47.050377894614385],\"retail_edge\":57.09775930526955,\"arb_edge\":-16.291091431264,\"retail_standard_error\":3.404746563707819,\"arb_standard_error\":1.6818906924579806,\"minimum\":-619.5873904809,\"maximum\":635.9180270401}",
    "Twenty disjoint 200-run block means: {\"seed_start\":1000000,\"block_size\":200,\"means\":[84.0156698640085,87.100287221278,87.309599977376,93.93737778211849,91.2218249981195,78.8693593018445,100.1752565831885,83.399990033786,79.94929952813649,80.10865496105299,87.2547096373965,78.1596700660215,79.486746733081,77.196554400173,86.4346692780555,95.8531681378625,94.4422767655905,86.31515560981101,90.40880663120201,77.5458915107465]}",
    "Nonparametric mean bootstrap check (2,000 resamples, analysis RNG seed 72791, percentile ranks 50 and 1950 of 2000): {\"ci_95pct\":[81.47231497838489,90.39707620375505]}",
    "Paired diagnostic was predeclared, not optimized: change only kA=0.7 to kA=0.8 by one literal replacement in base.py; kL and every other constant unchanged. 1,000 matching seeds 1000000-1000999; both strategies succeed 1000/1000. This diagnostic strategy is not submitted or selected. Independent latent and retail RNGs in engine.py preserve common exogenous paths. Matching regime and settlement verified for all pairs.",
    "Paired diagnostic kA0.8 minus base kA0.7: {\"n\":1000,\"mean_difference\":-0.2550416497707998,\"sd_difference\":2.83100829274481,\"se_difference\":0.08952434279898336,\"normal_95pct_ci\":[-0.43050613739642485,-0.07957716214517471],\"pearson_correlation\":0.9998230706133923,\"n_for_observed_3point_difference_to_exclude_zero_95pct\":4,\"n_for_true_3point_difference_80pct_power_5pct_two_sided\":7,\"base_mean\":88.7169519685801,\"diagnostic_mean\":88.4619103188093}",
    "Paired SD bootstrap sensitivity (2,000 resamples): {\"sd_percentile_95pct\":[2.1004202721508825,3.6098275038031806],\"n_80pct_power_from_sd_percentile_95pct\":[4,12]}",
    "Conservative planning comparisons: {\"unpaired_same_variance_runs_PER_VARIANT_80pct_power\":38024,\"paired_with_equal_marginal_SD_and_correlation\":{\"0\":38024,\"0.5\":19012,\"0.9\":3803,\"0.95\":1902,\"0.99\":381},\"paired_SD_scenarios\":{\"5\":{\"observed_3point_significant_n\":11,\"true_3point_80pct_power_n\":22},\"10\":{\"observed_3point_significant_n\":43,\"true_3point_80pct_power_n\":88},\"20\":{\"observed_3point_significant_n\":171,\"true_3point_80pct_power_n\":349},\"30\":{\"observed_3point_significant_n\":385,\"true_3point_80pct_power_n\":785},\"50\":{\"observed_3point_significant_n\":1068,\"true_3point_80pct_power_n\":2181}}}",
    "Empirical paired-test calibration, not a guarantee: {\"method\":\"10,000 bootstrap trials per n from the 1,000 centered observed paired differences; add 3 for alternative. Reject two-sided when abs(mean)/SE exceeds exact Student-t .975 critical with n-1 df. RNG seed 59437. Empirical-distribution sensitivity only; does not model unseen rare tails.\",\"paired_difference_min\":-32.703251917900005,\"paired_difference_max\":33.50262143119994,\"paired_difference_zero_count\":13,\"results\":[{\"n\":4,\"t_critical\":3.1824463052837064,\"empirical_null_rejection_rate\":0.0521,\"empirical_power_for_shift_3\":0.7726},{\"n\":7,\"t_critical\":2.446911851144967,\"empirical_null_rejection_rate\":0.071,\"empirical_power_for_shift_3\":0.8775},{\"n\":20,\"t_critical\":2.0930240544083114,\"empirical_null_rejection_rate\":0.085,\"empirical_power_for_shift_3\":0.9034},{\"n\":50,\"t_critical\":2.0095752371292344,\"empirical_null_rejection_rate\":0.0718,\"empirical_power_for_shift_3\":0.9961},{\"n\":100,\"t_critical\":1.9842169515864092,\"empirical_null_rejection_rate\":0.0689,\"empirical_power_for_shift_3\":1.0},{\"n\":200,\"t_critical\":1.9719565442517388,\"empirical_null_rejection_rate\":0.06,\"empirical_power_for_shift_3\":1.0},{\"n\":600,\"t_critical\":1.9639322489452815,\"empirical_null_rejection_rate\":0.0529,\"empirical_power_for_shift_3\":1.0}]}",
    "Practical recommendation: do NOT interpret the normal-theory counts 4 and 7 for this very close perturbation as a trustworthy tiny test. Bootstrap null rejection is 0.085 at n=20 and 0.0689 at n=100, versus nominal 0.05; at n=600 it is 0.0529 (Monte Carlo SE about 0.00224). Use at least 600 fresh paired seeds for this comparison. For another pair, run a 600-1000-pair pilot and choose max(600, the 80%-power formula using its paired SD), preferably also reviewing upper SD bootstrap sensitivity. This floor is a practical precaution supported by this empirical calibration, not a universal guarantee. A pair with SD=30 needs approximately 785 fresh pairs for 80% power at a true 3-point gap, whereas SD=50 needs 2181. The measured kA change itself loses 0.255 points on average, not gains 3; the power exercise shifts its centered residuals hypothetically.",
    "How many paired runs: define D_i=edge(B,seed_i)-edge(A,seed_i); estimate s_D from a fresh 600-1000-pair pilot. A measured +3 excludes zero approximately at two-sided 95% when n>=ceil((1.959963984540054*s_D/3)^2). To have 80% probability of detecting a true +3 at alpha=.05, plan n>=ceil(((1.959963984540054+0.8416212335729143)*s_D/3)^2); per variant n, hence 2n simulations. These normal-theory planning counts assume independent seed pairs, stable variance, one pre-specified comparison and no optional stopping. They are not guarantees or universal counts: a different pair can have very different s_D and rare-tail risk. Use a paired t interval for final small samples; no finite sample proves a difference with certainty. Adjust alpha for many comparisons or use a fresh final holdout; do not pick a winner by repeated 200-run peeks. Bootstrap SD sensitivity is descriptive, not a conservative upper bound.",
    "Returned unchanged base, final holdout score: {\"mean_edge\":85.46780344973116,\"simulations\":600,\"seed_start\":20000,\"failures\":0}"
  ],
  "next": "For each new candidate freeze code, run a fresh 600-1000-pair pilot against this exact base, and use the measured SD of within-seed differences to size one independent confirmation test for a 3-point effect with 80% power; use at least 600 fresh confirmation pairs and more when the power formula requires it. Review tail sensitivity and do not trust tiny normal-theory sample counts. Keep the 4,000 measurement seeds out of tuning. Focus diagnostics on settlement=0, spread=1 and low starting prices if their measured strata warrant it; do not infer a tradable settlement signal. The kA perturbation was a variance diagnostic only; retain the unchanged base from this result."
}