{
  "approach": "Retains the base's tick probes, sub-tick belief, competitive passive quotes and cheap tick-1 inventory crossing. It disables secondary inventory purchases, increases low-price bid aversion when stock already covers near-term demand (kLf=0.3), and doubles ask loss aversion above 5%. The 18-per-run mean arbitrage-loss budget is allocated to ordinary bids, ordinary asks, tick-1 stock, other stock and probes, with each cut evaluated for its retail cost; the policy was selected by the best 600-seed tuning edge meeting both 18-loss and above-127-retail targets when feasible, otherwise by the best edge preserving the retail floor, with the unmet loss target reported explicitly. Loss control uses calibrated quote sizes and stock eligibility; it is an average-loss target. The 18-loss / above-127-retail targets were not jointly met on tuning. Both targets were not jointly met on the untouched holdout.",
  "blocked": null,
  "python_version": "3.12.3",
  "base_mean_edge": 102.33197908899267,
  "score": {
    "mean_edge": 108.34220065942017,
    "retail_edge": 131.02646185504466,
    "arb_edge": -22.684261195613665,
    "simulations": 600,
    "seed_start": 1000,
    "failures": 0
  },
  "holdout": {
    "mean_edge": 97.47824853761233,
    "simulations": 600,
    "seed_start": 30000,
    "failures": 0
  },
  "code": "\"\"\"Stale-quote defence with tick probes, a sub-tick belief and cheap YES stock.\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.  Near p=0 a\nretail buy pays almost its whole notional as edge, so YES is held to cover low\nasks.  That YES is bought when it is cheap: a large bid rests at tick 1 while p\nis above it, so the arbitrageur fills it on the crossing for about 0.1 tick a\nshare instead of nearly a full tick once p is near zero, and smaller bids sit on\nwhichever tick p is within 0.15 of.  Below tick 1 the estimate of p decays with\nthe time spent there, since no probe can see it.\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.7, 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=0.0, H1=100.0,\n         ydf=0.6, Wf=2000.0, g_hi=0.15, g_lo=0.15, qf=400.0, pmaxf=0.05, pre_gap=1.0,\n         ydf1=0.6, g1=5.0, f1=0.6, a1=100.0, nb1=0.0, gs=1.0, p1t=1.0, m1=1.0, zd=1.0, pfl=0.0005)\nP.update(ammo=0.0,kLf=0.3)\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        self.tb = 0\n        self.s = None          # competitor spread parameter\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        if self.s is None:\n            self.s = max(1, (ca - cb + 1) // 2)\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 eb and (sb or min(eb) <= P['p1t']):\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        self.tb = self.tb + 1 if hi <= 1 else 0\n        if self.tb > 0 and P['zd'] > 0:\n            # below the last tick there is no probe: the score keeps walking away from it\n            phat = min(phat, max(P['pfl'], cdf(inv(0.01) - P['zd'] * 0.02 * math.sqrt(self.tb) / sd)))\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 P['nb1'] > 0 and self.s == 1 and t == 1 and ptk < 1.0:\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 * (2.0 if phat > 0.05 else 1.0), 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 = qa if Y >= P['a1'] > 0 else 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 < max(P['ammo_pmax'], P['pmaxf']):\n            wealth = state.cash + Y * phat\n            x = max(ask_t, ptick + 1) / 100.0\n            capw = P['fy'] * wealth / max(phat, 0.005)\n            target = min(P['ydem'] * min(H, P['W']) / x, capw)\n            full = min(P['ydf'] * min(H, P['Wf']) / x, capw) if phat < P['pmaxf'] else 0.0\n            t = max(1, min(99, int(math.ceil(ptick + 1e-9))))\n            g = t - ptick\n            if Y < full and g <= P['g_hi'] and bid_t <= t < ask_t:\n                amt, qam = t, min(P['qf'], full - Y)     # a tick p has just crossed: nearly free\n            elif Y < target and phat < P['ammo_pmax'] and bid_t <= t < ask_t and t / 100.0 - phat < P['ammo_maxpay']:\n                amt, qam = t, min(P['ammo_q'], target - Y)\n            elif Y < full and t >= 2 and 1.0 - g <= P['g_lo']:\n                amt, qam = t - 1, min(P['qf'], full - Y)  # rest just under p: filled only on the crossing, or by retail\n\n        if P['pre'] > 0 and ca == 2 and phat < 0.01 and H > P['H1'] and Y < P['pre'] and not qam and 1.0 - ptick < P['pre_gap']:\n            amt, qam = 1, min(P['ammo_q'], P['pre'] - Y)\n        q1 = 0.0\n        if P['ydf1'] > 0 and P['m1'] < ptick < P['g1'] + 1.0 and amt != 1:\n            q1 = max(0.0, P['ydf1'] * min(H, P['Wf']) / (self.s / 100.0) - 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        q1 = min(q1, P['f1'] * max(budget - cost, 0.0) * 100.0)\n        if q1 >= 0.01:\n            out.append(PlaceOrder(side=Side.BUY, price_ticks=1, quantity=fl(q1)))\n            free -= fl(q1) / 100.0 + 1e-6\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": "f6ae5c05d29000238e025d6e35f7ee1ee0b5ade2afd6d8ceb5af6880efdf0240",
  "tried": [
    "Simulator revision b244530ee2a6247b5f930830eeca9dd950da0e7e; source URLs pin this revision. Scorer check: supplied base code on 0-599, mean 102.33197908899267; author reference 102.33197908899267; difference 0.0.",
    "Matched base on 1000-1599: mean 107.2442092237515, retail 135.80165652288784, arb -28.557447299150834; 600 successes.",
    "Exploratory attribution, seeds 1000-1099, actual mean [edge,retail,arb,failures] [131.851139292446, 161.459207202583, -29.608067910207, 0]. Categories: {'ask': [135.08640863028324, -12.180159455576474], 'bid': [25.86432433873813, -8.518952863272336], 'probe': [0.025878827945106084, -0.4851943471401336], 'stock': [0.4181079506123382, -3.9366232555345557], 'stock1': [0.06448745503739664, -4.487137988440542]}. Tiny placements <=0.01 classified as probes; other placements classified by main bid/ask client IDs or stock tick. Large-move axis means absolute probability change >0.025, not observed latent jump count.",
    "Exact tagged stock-source attribution on 1000-1099, unchanged mean edge: {'ammo1': [0.05947250947687151, -1.1614550721005885], 'ammo2': [0.15690088304958444, -0.7019644320511885], 'ammo3': [0.1499169422084552, -0.9881617180459078], 'ammo4': [0.10757493172978502, -0.8514382589765406], 'ammo5': [0.003715193624513565, -1.3950588464609177], 'ask': [135.08640863028324, -12.180159455576474], 'bid': [25.86432433873813, -8.518952863272336], 'crossing': [0.0050149455605251305, -3.325682916339953], 'probe': [0.025878827945106084, -0.4851943471401336]}. Crossing is the large tick-1 order; ammo1 through ammo5 are secondary inventory purchases at those ticks. These are direct fill edges, not counterfactual retail costs; retail costs of cuts are measured below.",
    "1000-1099 forecast audit: summed unconditional AB loss by category {'probe': 0.4690544033155387, 'ask': 34.67306367018958, 'bid': 8.893201380971076, 'stock1': 15.385466029772846, 'stock': 3.943423684339541} versus actual category losses above; a forecast-dollar cap is not an actual-loss guarantee.",
    "1000-1079, n=80: 18 nonprobe inferred budget, squared feedback and hard stops; mean 82.967719144105, retail 105.82858900038875, arb -22.86086985623625, failures 0; retail cost 63.514362600478734, arb saved 6.110545329263751 versus matched base.",
    "1000-1079, n=80: Hard inferred-loss quotas b=4,a=8,secondary stock=2,crossing stock=4, plus probes; mean 90.432038337215, retail 111.10978840737626, arb -20.677750070069997, failures 0; retail cost 58.23316319349122, arb saved 8.293665115430002 versus matched base.",
    "1000-1079, n=80: Hard inferred-loss quotas b=5,a=11,secondary=2,crossing=6, plus probes; mean 91.16789417946875, retail 113.63325904572, arb -22.465364866175, failures 0; retail cost 55.709692555147484, arb saved 6.5060503193249986 versus matched base.",
    "1000-1079, n=80: Disable both supplementary inventory mechanisms (ammo=0, ydf1=0); mean 109.74482727863749, retail 131.63886623157876, arb -21.89403895299875, failures 0; retail cost 37.70408536928872, arb saved 7.077376232501251 versus matched base.",
    "1000-1079, n=80: Cap ordinary asks at 500 shares; mean 124.21241924368876, retail 148.73112331945498, arb -24.51870407581375, failures 0; retail cost 20.6118282814125, arb saved 4.452711109686248 versus matched base.",
    "1000-1079, n=80: Remove tick-1 crossing stock bid only; mean 126.8559643101325, retail 160.86395543534374, arb -34.007991125272504, failures 0; retail cost 8.47899616552374, arb saved -5.036575939772504 versus matched base.",
    "1000-1079, n=80: Quadruple bid loss weight above probability 0.05; mean 127.28092799341, retail 155.55987806757375, arb -28.27895007417875, failures 0; retail cost 13.78307353329373, arb saved 0.6924651113212512 versus matched base.",
    "1000-1079, n=80: Restrict crossing stock bid to p in (1c,1.2c); mean 129.35075040270624, retail 167.94799695531125, arb -38.597246552675, failures 0; retail cost 1.3949546455562256, arb saved -9.625831367175003 versus matched base.",
    "1000-1079, n=80: Crossing-stock demand coefficient ydf1=0.2; mean 130.51251455798499, retail 164.34025353026374, arb -33.8277389723425, failures 0; retail cost 5.002698070603742, arb saved -4.856323786842502 versus matched base.",
    "1000-1079, n=80: Restrict crossing bid to (1c,1.5c); mean 131.34510562770498, retail 168.81308105104875, arb -37.46797542340375, failures 0; retail cost 0.5298705498187246, arb saved -8.49656023790375 versus matched base.",
    "1000-1079, n=80: Cap ordinary asks at 1000 shares; mean 133.8327856175925, retail 161.09999875520626, arb -27.26721313768375, failures 0; retail cost 8.242952845661222, arb saved 1.7042020478162492 versus matched base.",
    "1000-1079, n=80: Halve crossing target ydf1 to 0.3 and purchase chunks to qf=200, ammo_q=30; mean 134.54025625891, retail 164.4531457681925, arb -29.9128895093275, failures 0; retail cost 4.889805832674966, arb saved -0.9414743238274994 versus matched base.",
    "1000-1079, n=80: Jump-risk mixture weight x4.0; mean 134.6542971480875, retail 155.57145219028126, arb -20.9171550421825, failures 0; retail cost 13.771499410586216, arb saved 8.0542601433175 versus matched base.",
    "1000-1079, n=80: All ordinary-quote loss aversion x2.4; mean 135.71049947997375, retail 157.22308793421752, arb -21.512588454211247, failures 0; retail cost 12.119863666649962, arb saved 7.458826731288752 versus matched base.",
    "1000-1079, n=80: Double bid loss weight above probability 0.05; mean 136.0421429190425, retail 163.263440928315, arb -27.22129800928, failures 0; retail cost 6.0795106725524874, arb saved 1.750117176219998 versus matched base.",
    "1000-1079, n=80: Jump-risk mixture weight x3.0; mean 136.20402429756876, retail 159.2039812932775, arb -22.99995699568375, failures 0; retail cost 10.138970307589972, arb saved 5.97145818981625 versus matched base.",
    "1000-1079, n=80: Crossing-stock demand coefficient ydf1=1.0; mean 136.8368092240225, retail 169.60749308434873, arb -32.770683860409996, failures 0; retail cost -0.2645414834812527, arb saved -3.799268674909996 versus matched base.",
    "1000-1079, n=80: Same 18 nonprobe inferred budget, soft pricing rather than hard stops; mean 136.94678928864874, retail 164.498887960965, arb -27.552098672267498, failures 0; retail cost 4.844063639902487, arb saved 1.419316513232502 versus matched base.",
    "1000-1079, n=80: Double all ordinary bid loss weight; mean 137.39078151128874, retail 162.85250723279626, arb -25.46172572151125, failures 0; retail cost 6.490444368071223, arb saved 3.5096894639887495 versus matched base.",
    "1000-1079, n=80: Crossing-stock demand coefficient ydf1=0.4; mean 137.430117139245, retail 168.057123946205, arb -30.62700680703, failures 0; retail cost 1.2858276546624836, arb saved -1.6555916215300002 versus matched base.",
    "1000-1079, n=80: late4; mean 138.46635643963, retail 166.06591401782126, arb -27.599557578280002, failures 0; retail cost 3.277037583046223, arb saved 1.3718576072199973 versus matched base.",
    "1000-1079, n=80: Jump-risk mixture weight x2.0; mean 138.53088022727874, retail 163.53779787904, arb -25.00691765177875, failures 0; retail cost 5.80515372182748, arb saved 3.96449753372125 versus matched base.",
    "1000-1079, n=80: Crossing-stock demand coefficient ydf1=0.8; mean 138.7971251235075, retail 169.6734704117975, arb -30.876345288371247, failures 0; retail cost -0.3305188109300161, arb saved -1.9049301028712478 versus matched base.",
    "1000-1079, n=80: Cap ordinary bids at 500 shares; mean 138.94315254974126, retail 167.984349129485, arb -29.04119657981625, failures 0; retail cost 1.3586024713824827, arb saved -0.06978139431625152 versus matched base.",
    "1000-1079, n=80: Infer censored retail demand; rescale stock targets with 50-step prior; mean 138.97353150543876, retail 169.4889578543675, arb -30.5154263489975, failures 0; retail cost -0.14600625350001906, arb saved -1.5440111634975011 versus matched base.",
    "1000-1079, n=80: Cap ordinary bids at 200 shares; mean 139.14823635772, retail 166.20273915252875, arb -27.0545027948675, failures 0; retail cost 3.1402124483387297, arb saved 1.9169123906325005 versus matched base.",
    "1000-1079, n=80: late2; mean 139.3244340533875, retail 167.61375709811375, arb -28.289323044806252, failures 0; retail cost 1.729194502753728, arb saved 0.6820921406937472 versus matched base.",
    "1000-1079, n=80: Require 0.5 tick margin; mean 139.32877680013377, retail 163.16718789452125, arb -23.83841109447625, failures 0; retail cost 6.175763706346231, arb saved 5.13300409102375 versus matched base.",
    "1000-1079, n=80: Infer censored demand; rescale targets with 200-step prior; mean 139.550282488925, retail 169.45228597213625, arb -29.902003483280005, failures 0; retail cost -0.10933437126877266, arb saved -0.9305882977800053 versus matched base.",
    "1000-1079, n=80: Secondary stock purchase chunk 100 shares; mean 139.68598881253624, retail 169.39910140213377, arb -29.71311258967625, failures 0; retail cost -0.05614980126628666, arb saved -0.7416974041762501 versus matched base.",
    "1000-1079, n=80: Online diffusion-scale EM, rate 0.02; mean 139.73645937552126, retail 172.60200910051125, arb -32.8655497250075, failures 0; retail cost -3.259057499643774, arb saved -3.8941345395074975 versus matched base.",
    "1000-1079, n=80: Online diffusion-scale EM, rate 0.05; mean 139.937032971255, retail 172.99026088595625, arb -33.053227914745, failures 0; retail cost -3.6473092850887667, arb saved -4.0818127292450015 versus matched base.",
    "1000-1079, n=80: Quadruple ask loss weight above probability 0.05; mean 139.99067180974, retail 162.64311843595127, arb -22.65244662620625, failures 0; retail cost 6.699833164916214, arb saved 6.318968559293751 versus matched base.",
    "1000-1079, n=80: Reduce minimum probe radius from 2 ticks to 1; mean 140.0932953875025, retail 169.29280941688376, arb -29.19951402944875, failures 0; retail cost 0.0501421839837235, arb saved -0.22809884394875013 versus matched base.",
    "1000-1079, n=80: Infer censored demand; rescale targets with 500-step prior; mean 140.1080344690775, retail 169.35359087226374, arb -29.245556403257503, failures 0; retail cost -0.010639271396257755, arb saved -0.2741412177575029 versus matched base.",
    "1000-1079, n=80: Double ordinary risk weight when estimated probability is 0.05-0.95; mean 140.11309442645626, retail 163.51009833164, arb -23.397003905137502, failures 0; retail cost 5.832853269227485, arb saved 5.574411280362497 versus matched base.",
    "1000-1079, n=80: Limit inside orders to recomputed target; preserve competitor-price queue tolerance; mean 140.21175450975124, retail 168.9438873919575, arb -28.7321328822725, failures 0; retail cost 0.3990642089099765, arb saved 0.2392823032275011 versus matched base.",
    "1000-1079, n=80: Secondary stock purchase chunk 250 shares; mean 140.23477897289249, retail 169.6512729611825, arb -29.4164939883775, failures 0; retail cost -0.3083213603150341, arb saved -0.4450788028775001 versus matched base.",
    "1000-1079, n=80: Limit inside order overhang to 10%; preserve competitor-price tolerance; mean 140.24409862577, retail 169.063558698265, arb -28.819460072555, failures 0; retail cost 0.2793929026024671, arb saved 0.15195511294500008 versus matched base.",
    "1000-1079, n=80: Restrict crossing bid to (1c,2c); mean 140.30662566667624, retail 169.222022509215, arb -28.915396842615003, failures 0; retail cost 0.12092909165247079, arb saved 0.05601834288499674 versus matched base.",
    "1000-1079, n=80: Double ordinary risk weight above estimated probability 0.8; mean 140.361670974275, retail 168.96347475172124, arb -28.601803777489998, failures 0; retail cost 0.37947684914624347, arb saved 0.3696114080100017 versus matched base.",
    "1000-1079, n=80: Restrict crossing bid to (1c,3c); mean 140.37582964124252, retail 169.3431775543925, arb -28.967347913225, failures 0; retail cost -0.0002259535250175304, arb saved 0.004067272274998146 versus matched base.",
    "1000-1079, n=80: Require 0.1 tick estimated margin; mean 140.43054811811876, retail 169.33594120380127, arb -28.90539308575875, failures 0; retail cost 0.0070103970662103166, arb saved 0.06602209974125017 versus matched base.",
    "1000-1079, n=80: Online diffusion-scale EM, learning rate 0.005; mean 140.43571705812127, retail 171.57356589954125, arb -31.137848841472497, failures 0; retail cost -2.230614298673771, arb saved -2.1664336559724973 versus matched base.",
    "1000-1079, n=80: Jump-risk mixture weight x1.5; mean 140.452644228745, retail 165.92502835893123, arb -25.47238413015625, failures 0; retail cost 3.4179232419362506, arb saved 3.4990310553437496 versus matched base.",
    "1000-1079, n=80: Quadruple ask loss weight above probability 0.5; mean 140.56924940878, retail 168.51043611507126, arb -27.94118670634625, failures 0; retail cost 0.8325154857962218, arb saved 1.0302284791537488 versus matched base.",
    "1000-1079, n=80: Raise surplus-inventory kLf to 2; mean 140.72143729076498, retail 167.86404860612998, arb -27.14261131545, failures 0; retail cost 1.4789029947374956, arb saved 1.828803870049999 versus matched base.",
    "1000-1079, n=80: Double ask loss weight below probability 0.05; mean 140.8865181055975, retail 166.92660340267625, arb -26.040085297144998, failures 0; retail cost 2.41634819819123, arb saved 2.931329888355002 versus matched base.",
    "1000-1079, n=80: Reduce minimum probe radius to 1 and radius volatility multiplier from 2 to 1; mean 140.91383176981873, retail 169.35534822248874, arb -28.441516452690003, failures 0; retail cost -0.012396621621263648, arb saved 0.5298987328099969 versus matched base.",
    "1000-1079, n=80: Replace six jump nodes with 17-node normal-CDF bins; mean 141.00428855096249, retail 170.49313541264127, arb -29.488846861702502, failures 0; retail cost -1.1501838117737861, arb saved -0.5174316762025022 versus matched base.",
    "1000-1079, n=80: All ordinary-quote loss aversion x1.6; mean 141.00720334602, retail 162.34420715284, arb -21.3370038068025, failures 0; retail cost 6.99874444802748, arb saved 7.6344113786975 versus matched base.",
    "1000-1079, n=80: Double all ordinary ask loss weight; mean 141.037697704135, retail 164.5599753163625, arb -23.5222776121925, failures 0; retail cost 4.782976284504969, arb saved 5.4491375733075 versus matched base.",
    "1000-1079, n=80: Strict inside size target plus global ordinary risk x1.2; mean 141.21999773923625, retail 166.43639007075998, arb -25.2163923315475, failures 0; retail cost 2.9065615301074956, arb saved 3.7550228539525 versus matched base.",
    "1000-1079, n=80: Invert compound-Poisson terminal probability and price one-step risk with that mixture; mean 141.50675215119, retail 169.20246144365623, arb -27.69570929252875, failures 0; retail cost 0.14049015721124647, arb saved 1.2757058929712493 versus matched base.",
    "1000-1079, n=80: Double ask loss weight above probability 0.05; mean 141.51119873944373, retail 166.45756633512127, arb -24.94636759565875, failures 0; retail cost 2.8853852657462085, arb saved 4.02504758984125 versus matched base.",
    "1000-1079, n=80: Low-price ask capacity 6000 shares; ordinary risk x1; mean 141.63915147773, retail 170.751350140385, arb -29.1121986627325, failures 0; retail cost -1.4083985395175205, arb saved -0.14078347723249962 versus matched base.",
    "1000-1079, n=80: Low-price ask capacity 10000 shares; ordinary risk x1; mean 141.6627043781875, retail 170.77490304084125, arb -29.1121986627325, failures 0; retail cost -1.4319514399737727, arb saved -0.14078347723249962 versus matched base.",
    "1000-1079, n=80: Raise surplus-inventory kLf to 0.7; mean 141.684749403415, retail 168.19292475577373, arb -26.508175352454998, failures 0; retail cost 1.1500268450937483, arb saved 2.4632398330450016 versus matched base.",
    "1000-1079, n=80: No secondary stock; kLf=0.3; all ordinary loss weights x1.6; mean 141.70249281841, retail 159.13846912721874, arb -17.43597630876875, failures 0; retail cost 10.204482473648739, arb saved 11.535438876731249 versus matched base.",
    "1000-1079, n=80: Replace six jump nodes with 10-node Gaussian quadrature; mean 141.76980115701002, retail 171.00123299010875, arb -29.231431833111248, failures 0; retail cost -1.6582813892412673, arb saved -0.26001664761124843 versus matched base.",
    "1000-1079, n=80: Require 0.25 tick margin; mean 141.9151957066975, retail 169.020207688665, arb -27.105011982054997, failures 0; retail cost 0.3227439122024691, arb saved 1.866403203445003 versus matched base.",
    "1000-1079, n=80: Raise surplus-inventory low-bid risk kLf from 0.08 to 0.3; mean 141.94960653202125, retail 168.493000850285, arb -26.54339431833875, failures 0; retail cost 0.8499507505824795, arb saved 2.4280208671612513 versus matched base.",
    "1000-1079, n=80: All ordinary-quote loss aversion x1.2; mean 142.01507961011626, retail 167.27379099224123, arb -25.25871138214125, failures 0; retail cost 2.069160608626248, arb saved 3.7127038033587496 versus matched base.",
    "1000-1079, n=80: Low-price ask capacity 6000 shares; ordinary risk x1.6; mean 142.03309758143, retail 163.3804307216975, arb -21.34733314025, failures 0; retail cost 5.962520879169972, arb saved 7.624082045249999 versus matched base.",
    "1000-1079, n=80: Low-price ask capacity 10000 shares; ordinary risk x1.6; mean 142.03363857859625, retail 163.3804307216975, arb -21.34679214308375, failures 0; retail cost 5.962520879169972, arb saved 7.62462304241625 versus matched base.",
    "1000-1079, n=80: Compound-Poisson inversion and 10-node jump quadrature; mean 142.5470129391375, retail 171.60716864138, arb -29.060155702315, failures 0; retail cost -2.264217040512534, arb saved -0.08874051681500106 versus matched base.",
    "1000-1079, n=80: Low-price ask capacity 6000 shares; ordinary risk x1.2; mean 142.963670623235, retail 168.21241208840874, arb -25.24874146518625, failures 0; retail cost 1.1305395124587392, arb saved 3.7226737203137503 versus matched base.",
    "1000-1079, n=80: Double bid loss weight below probability 0.05; mean 142.96984633172502, retail 168.91467974187748, arb -25.94483341023625, failures 0; retail cost 0.4282718589900014, arb saved 3.0265817752637503 versus matched base.",
    "1000-1079, n=80: No secondary stock; kLf=0.3 on surplus inventory; mean 143.54774640339875, retail 165.66492403128, arb -22.117177627931248, failures 0; retail cost 3.6780275695874707, arb saved 6.8542375575687515 versus matched base.",
    "1000-1079, n=80: Disable secondary stock purchases; retain tick-1 crossing bid; mean 143.91249942799374, retail 166.97163013752123, arb -23.0591307095775, failures 0; retail cost 2.3713214633462485, arb saved 5.912284475922501 versus matched base.",
    "1000-1079, n=80: Compound-Poisson inversion and 17-node jump quadrature; mean 144.16062349393127, retail 172.14984082769374, arb -27.9892173338475, failures 0; retail cost -2.8068892268262573, arb saved 0.9821978516525007 versus matched base.",
    "1000-1079, n=80: Allow secondary stock only below 1c, target capped at 50 steps of demand; mean 144.2237482935025, retail 167.82719767510375, arb -23.60344938165, failures 0; retail cost 1.5157539257637325, arb saved 5.367965803849998 versus matched base.",
    "1000-1079, n=80: Allow secondary stock only below 1c, target capped at 200 steps of demand; mean 144.3256451481325, retail 167.84803790658376, arb -23.52239275850875, failures 0; retail cost 1.4949136942837242, arb saved 5.449022426991249 versus matched base.",
    "1000-1079, n=80: No secondary stock; kLf=0.3; mid-price ask loss weight x3; mean 144.7723674860825, retail 162.4213054728275, arb -17.64893798668125, failures 0; retail cost 6.921646128039981, arb saved 11.32247719881875 versus matched base.",
    "1000-1079, n=80: No secondary stock; mid-price ask loss weight x2; mean 145.1765005225875, retail 165.04325258281875, arb -19.86675206020125, failures 0; retail cost 4.299699018048727, arb saved 9.10466312529875 versus matched base.",
    "1000-1079, n=80: No secondary stock; kLf=0.3; all ordinary loss weights x1.2; mean 145.21683379926125, retail 164.31435059537125, arb -19.09751679610625, failures 0; retail cost 5.028601005496228, arb saved 9.873898389393748 versus matched base.",
    "1000-1079, n=80: No secondary stock; kLf=0.3; mid-price ask loss weight x2; mean 145.541274661855, retail 164.375578552055, arb -18.83430389014375, failures 0; retail cost 4.967373048812476, arb saved 10.137111295356249 versus matched base.",
    "Full tuning 1000-1599 n=600: All ordinary-quote loss aversion x1.6; mean 105.51718809426, retail 130.633334429085, arb -25.11614633483333, failures 0; retail cost 5.1683220938028285, arb saved 3.4413009643175023; paired edge delta -1.7270211294915, standard error 0.9157130759479769. completed after freeze; not used for selection; tuning seeds only. Selection preceded viewing holdout.",
    "Full tuning 1000-1599 n=600: Compound-Poisson/17-node risk, no secondary stock, kLf=0.3, mid-price ask risk x2; mean 105.75225988096234, retail 132.69457812944634, arb -26.9423182484765, failures 0; retail cost 3.1070783934414976, arb saved 1.6151290506743337; paired edge delta -1.491949342789167, standard error 2.5534131989986566. available before freeze; tuning seeds only. Selection preceded viewing holdout.",
    "Full tuning 1000-1599 n=600: Budget_plus3 with low-price ask loss weight doubled as well; mean 107.03780885166533, retail 128.42474507898632, arb -21.3869362273355, failures 0; retail cost 7.37691144390152, arb saved 7.1705110718153335; paired edge delta -0.20640037208616718, standard error 1.0173674709754699. available before freeze; tuning seeds only. Selection preceded viewing holdout.",
    "Full tuning 1000-1599 n=600: All ordinary-quote loss aversion x1.2; mean 107.49934763628333, retail 133.87193217357665, arb -26.37258453729133, failures 0; retail cost 1.9297243493111864, arb saved 2.1848627618595025; paired edge delta 0.25513841253183267, standard error 0.4330361437332292. completed after freeze; not used for selection; tuning seeds only. Selection preceded viewing holdout.",
    "Full tuning 1000-1599 n=600: No secondary stock; kLf=0.3; mid-price ask loss weight x3; mean 107.56570488363283, retail 129.28937603873317, arb -21.723671155102, failures 0; retail cost 6.512280484154672, arb saved 6.833776144048834; paired edge delta 0.3214956598813328, standard error 0.7154141139890974. available before freeze; tuning seeds only. Selection preceded viewing holdout.",
    "Full tuning 1000-1599 n=600: Double ask loss weight above probability 0.05; mean 107.59945706604934, retail 133.53676770281083, arb -25.93731063675133, failures 0; retail cost 2.2648888200770045, arb saved 2.620136662399503; paired edge delta 0.355247842297833, standard error 0.3522795201063087. completed after freeze; not used for selection; tuning seeds only. Selection preceded viewing holdout.",
    "Full tuning 1000-1599 n=600: No secondary stock; low-price bid risk x2; mid-price ask risk x3; low-price ask cap 6000; mean 107.71703110495584, retail 129.2226776491302, arb -21.5056465441795, failures 0; retail cost 6.578978873757649, arb saved 7.051800754971335; paired edge delta 0.47282188120433355, standard error 0.8749467197850155. available before freeze; tuning seeds only. Selection preceded viewing holdout.",
    "Full tuning 1000-1599 n=600: Disable secondary stock purchases; retain tick-1 crossing bid; mean 108.23052839965034, retail 133.56467411974282, arb -25.334145720107166, failures 0; retail cost 2.2369824031450207, arb saved 3.2233015790436674; paired edge delta 0.986319175898833, standard error 0.5424440496150541. available before freeze; tuning seeds only. Selection preceded viewing holdout.",
    "Full tuning 1000-1599 n=600: No secondary stock; low-price bid risk x2; mid-price ask risk x2; low-price ask cap 6000; mean 108.30799926184967, retail 130.81063444390517, arb -22.502635182048166, failures 0; retail cost 4.991022078982667, arb saved 6.054812117102667; paired edge delta 1.0637900380981664, standard error 0.8731232091018264. available before freeze; tuning seeds only. Selection preceded viewing holdout.",
    "Full tuning 1000-1599 n=600: No secondary stock; kLf=0.3; mid-price ask loss weight x2; mean 108.34220065942017, retail 131.02646185504466, arb -22.684261195613665, failures 0; retail cost 4.775194667843181, arb saved 5.873186103537169; paired edge delta 1.0979914356686664, standard error 0.6756927816223945. available before freeze; tuning seeds only. Selection preceded viewing holdout.",
    "Frozen-policy attribution on 1000-1599: {'ask': [107.65538747390906, -8.818167880022012], 'bid': [23.278161561688044, -6.839799507040346], 'probe': [0.025711890980225367, -0.4794454098346399], 'stock1': [0.06720092846618798, -6.5468483987207335]}. Pairs are retail edge and arb edge. Budget plan: {'bid': 5.5, 'ask': 7.0, 'stock1': 5.0, 'stock': 0.0, 'probe': 0.5} (positive loss amounts; total 18). Attribution is an offline measurement, not information supplied to the policy.",
    "Disjoint exact causal split on the same 600 tuning runs: {'diffusion_main': [130.3539707453672, -7.22020612443645], 'jump_main': [0.24874362356316615, -8.434846762625929], 'probe': [0.025711890980225367, -0.4794454098346399], 'stock1': [0.06720092846618798, -6.5468483987207335], 'terminal_main': [0.33083466666666667, -0.0029145]}. Main-order jumps use the simulator Poisson draw; terminal_main is the last step; diffusion_main contains other non-jump main fills including horizon effects. Stock is bucketed by tick; tiny anonymous orders are probes. No latent state is passed into the strategy.",
    "Sandbox starter, 20 simulations on 1000-1019: 20 failures; [\"ImportError: Import of 'ntpath' is not allowed in sandbox mode.\"]. Starter also fails, so this runner error is not counted as a candidate simulation failure.",
    "Sandbox final, 20 simulations on 1000-1019: 20 failures; [\"ImportError: Import of 'ntpath' is not allowed in sandbox mode.\"]. Starter also fails, so this runner error is not counted as a candidate simulation failure.",
    "Frozen final budget_combo: fresh 1000-1599 mean 108.34220065942017, retail 131.02646185504466, arb -22.684261195613665, failures 0; retail cost 4.775194667843181, arb saved 5.873186103537169. Training 18/127 targets jointly met: False. Untouched holdout 30000-30599 run once after freeze: mean 97.47824853761233, retail 119.517920457476, arb -22.0396719198325, failures 0; holdout targets jointly met: False. No code or parameter changes were made after viewing holdout."
  ],
  "next": "The joint target remains unmet. The largest tuning allocation overrun was ask (loss 8.818167880022012, budget 7.0). Graft the below-1c emergency-stock fallback onto this policy and measure its incremental retail gain and arb cost: a 50-200-step buffer improved the isolated 80-seed screen, but was not validated in this combination. Investigate expected occupation time below 1c for the crossing-stock target, and validate on a new holdout rather than retuning on 30000-30599."
}
