{"approach": "Starts from the supplied base and changes its tick-2 ask on markets inferred to have a one-tick competitor spread. While the competitor's best ask is 3, an ask already at the base's 3000-share marginal-size cap is expanded to the covered YES stock, leaving 0.1 share as a safety margin. Once the competitor joins tick 2, an existing front order keeps its remaining quantity while the original marginal model still wants a positive ask there. Before the competitor joins, normal resizing remains available when the marginal model falls below its cap. This combines a large initial commitment with retention only where replacing it would lose FIFO priority. Unconditional stock sizing worsened arbitrage loss; splitting orders and expiry controls did not beat this rule on tuning seeds. The code was selected without viewing holdout results.", "blocked": null, "python_version": "3.12.3", "base_mean_edge": 102.33197908899267, "score": {"mean_edge": 108.30384238668634, "retail_edge": 136.78007252256066, "arb_edge": -28.476230135887167, "simulations": 600, "seed_start": 1000, "failures": 0}, "holdout": {"mean_edge": 96.33203752220284, "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)\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, 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        # Queue retention matters most once the competitor has joined tick 2;\n        # before then the quote can still be resized ahead of the competitor.\n        if self.s == 1 and ask_t == 2:\n            front = sum(o.remaining_quantity for o in asks if o.price_ticks == 2 and o.order_id in self.ahead)\n            if ca == 2 and front > 0 and (qa > 0):\n                qa = max(qa, front)\n            elif ca > 2 and qa >= P['qmax']:\n                qa = max(qa, max(0.0, state.yes_inventory - 0.1))\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": "b5892b13d24a9a71074fb015bcd5b1f3f60be0d52c3b7c42372234029a92408a", "tried": ["Scorer reproduction at repository commit b244530ee2a6247b5f930830eeca9dd950da0e7e: seeds 0-599 base mean 102.33197908899267, failures 0; expected 102.33197908899267.", "Tuning base seeds 1000-1599: mean 107.2442092237515; one-tick-spread subset n=144, mean 53.46773110396458, retail 84.5601619194, arb -31.09243081541111.", "all_low (full stock at both tick 1 and tick 2 below 1.5c): tuning one-tick subset of seeds 1000-1099, n=17, mean 15.875667083905883, retail 87.13991548413529, arb -71.26424840005882, failures 0.", "q25_all (25% of covered YES stock as a tick-2 ask floor, no price guard): tuning one-tick subset of seeds 1000-1099, n=17, mean 28.6257622106, retail 81.63580896011764, arb -53.01004674926471, failures 0.", "front_only (full stock when first strictly inside competitor; normal sizing after competitor arrival): tuning one-tick subset of seeds 1000-1099, n=17, mean 40.62990856121765, retail 78.27305868911175, arb -37.64315012771176, failures 0.", "floor3000 (covered-stock ask floor capped at 3000 shares): tuning one-tick subset of seeds 1000-1599, n=144, mean 41.092919710486804, retail 83.00212583344583, arb -41.909206122933334, failures 0.", "q50_all (50% of covered YES stock as a tick-2 ask floor, no price guard): tuning one-tick subset of seeds 1000-1099, n=17, mean 41.54674060638235, retail 82.95285843841177, arb -41.40611783182941, failures 0.", "floor10000 (covered-stock ask floor capped at 10000 shares): tuning one-tick subset of seeds 1000-1599, n=144, mean 42.90888687757987, retail 83.91780212603125, arb -41.00891524842917, failures 0.", "down_full (full stock only when fair-value estimate is not increasing by more than 0.01c): tuning one-tick subset of seeds 1000-1599, n=144, mean 44.794001564230555, retail 81.92478859929582, arb -37.13078703505417, failures 0.", "momentum_full (full stock only if fair-value plus its positive last-step change stays below 1.8c): tuning one-tick subset of seeds 1000-1599, n=144, mean 45.005858807452775, retail 83.03053042517014, arb -38.02467161769236, failures 0.", "q75_all (75% of covered YES stock as a tick-2 ask floor, no price guard): tuning one-tick subset of seeds 1000-1099, n=17, mean 46.78802581764118, retail 85.50411136064704, arb -38.71608554285294, failures 0.", "init200h500 (full stock at initial fair-value ceiling and minimum H encoded in name; preserve existing front orders below 2c): tuning one-tick subset of seeds 1000-1099, n=17, mean 47.05918742108823, retail 89.09201965475881, arb -42.03283223344118, failures 0.", "init180h500 (full stock at initial fair-value ceiling and minimum H encoded in name; preserve existing front orders below 2c): tuning one-tick subset of seeds 1000-1099, n=17, mean 47.06365746425294, retail 89.28392043891765, arb -42.22026297443529, failures 0.", "init150h0 (full stock at initial fair-value ceiling and minimum H encoded in name; preserve existing front orders below 2c): tuning one-tick subset of seeds 1000-1099, n=17, mean 47.567053998664704, retail 90.24227905662941, arb -42.67522505775294, failures 0.", "init150h200 (full stock at initial fair-value ceiling and minimum H encoded in name; preserve existing front orders below 2c): tuning one-tick subset of seeds 1000-1099, n=17, mean 47.567053998664704, retail 90.24227905662941, arb -42.67522505775294, failures 0.", "init150h500 (full stock at initial fair-value ceiling and minimum H encoded in name; preserve existing front orders below 2c): tuning one-tick subset of seeds 1000-1099, n=17, mean 47.67665772641765, retail 89.39597890834706, arb -41.719321181699996, failures 0.", "front_preserve (full stock on entry; preserve existing front quantity after competitor arrival): tuning one-tick subset of seeds 1000-1099, n=17, mean 47.98518424031765, retail 85.9608601624, arb -37.975675921941175, failures 0.", "q100_all (100% of covered YES stock as a tick-2 ask floor, no price guard): tuning one-tick subset of seeds 1000-1099, n=17, mean 47.98518424031765, retail 85.9608601624, arb -37.975675921941175, failures 0.", "q25_safe (25% of covered YES stock as a tick-2 ask floor, fair-value estimate <=1.5c): tuning one-tick subset of seeds 1000-1099, n=17, mean 48.18212161625294, retail 86.5053156585353, arb -38.32319404210588, failures 0.", "guard100 (full covered stock only at fair-value estimate <=0.01, including already-front orders): tuning one-tick subset of seeds 1000-1099, n=17, mean 48.50216731902353, retail 86.01486355702353, arb -37.512696237805876, failures 0.", "guard50 (full covered stock only at fair-value estimate <=0.005, including already-front orders): tuning one-tick subset of seeds 1000-1099, n=17, mean 48.50216731902353, retail 86.01486355702353, arb -37.512696237805876, failures 0.", "guard20 (full covered stock only at fair-value estimate <=0.002, including already-front orders): tuning one-tick subset of seeds 1000-1099, n=17, mean 48.7168195021, retail 86.22951574009413, arb -37.512696237805876, failures 0.", "positive200 (full stock only when original marginal ask quantity >200): tuning one-tick subset of seeds 1000-1599, n=144, mean 49.09226421993611, retail 87.19229857718125, arb -38.10003435721737, failures 0.", "first0 (full stock on first quote only, preserve its remaining size while original marginal ask >0): tuning one-tick subset of seeds 1000-1599, n=144, mean 49.241197731297916, retail 87.34902515813681, arb -38.1078274268118, failures 0.", "positive0 (full stock only when original marginal ask quantity >0): tuning one-tick subset of seeds 1000-1599, n=144, mean 49.241197731297916, retail 87.34902515813681, arb -38.1078274268118, failures 0.", "positive50 (full stock only when original marginal ask quantity >50): tuning one-tick subset of seeds 1000-1599, n=144, mean 49.241197731297916, retail 87.34902515813681, arb -38.1078274268118, failures 0.", "confidence5 (full stock only when fair-value plus 0.5 one-step standard deviations is below 2c): tuning one-tick subset of seeds 1000-1599, n=144, mean 49.250118536943056, retail 87.34902515813681, arb -38.09890662116666, failures 0.", "guard180 (full covered stock only at fair-value estimate <=0.018, including already-front orders): tuning one-tick subset of seeds 1000-1599, n=144, mean 49.25459287058055, retail 87.36357063027778, arb -38.10897775966389, failures 0.", "init200h200 (full stock at initial fair-value ceiling and minimum H encoded in name; preserve existing front orders below 2c): tuning one-tick subset of seeds 1000-1099, n=17, mean 49.310622055447055, retail 86.52790170552352, arb -37.21727964994706, failures 0.", "init180h200 (full stock at initial fair-value ceiling and minimum H encoded in name; preserve existing front orders below 2c): tuning one-tick subset of seeds 1000-1099, n=17, mean 49.37174497511765, retail 86.72017700501176, arb -37.348432029758825, failures 0.", "demand200 (stock floor capped by 2.0 times expected remaining retail demand): tuning one-tick subset of seeds 1000-1599, n=144, mean 49.61427122493125, retail 87.00523386813333, arb -37.390962643175, failures 0.", "init200h0 (full stock at initial fair-value ceiling and minimum H encoded in name; preserve existing front orders below 2c): tuning one-tick subset of seeds 1000-1099, n=17, mean 49.707781785899996, retail 87.16582197159411, arb -37.45804018554117, failures 0.", "init180h0 (full stock at initial fair-value ceiling and minimum H encoded in name; preserve existing front orders below 2c): tuning one-tick subset of seeds 1000-1099, n=17, mean 49.768904687052945, retail 87.35809771624704, arb -37.58919302903529, failures 0.", "demand100 (stock floor capped by 1.0 times expected remaining retail demand): tuning one-tick subset of seeds 1000-1599, n=144, mean 50.23847567088681, retail 86.30110729495279, arb -36.06263162404653, failures 0.", "confidence10 (full stock only when fair-value plus 1.0 one-step standard deviations is below 2c): tuning one-tick subset of seeds 1000-1599, n=144, mean 51.226876216015974, retail 87.76439762439931, arb -36.53752140835139, failures 0.", "positive500 (full stock only when original marginal ask quantity >500): tuning one-tick subset of seeds 1000-1599, n=144, mean 51.22939555066458, retail 87.41280630028402, arb -36.183410749586805, failures 0.", "first500 (full stock on first quote only, preserve its remaining size while original marginal ask >500): tuning one-tick subset of seeds 1000-1599, n=144, mean 51.30532841307152, retail 87.4563798201868, arb -36.15105140708472, failures 0.", "down_demand (quarter-demand stock floor only when fair-value is not increasing by more than 0.01c): tuning one-tick subset of seeds 1000-1599, n=144, mean 51.48093117669514, retail 83.35336165260763, arb -31.87243047589653, failures 0.", "positive1000 (full stock only when original marginal ask quantity >1000): tuning one-tick subset of seeds 1000-1599, n=144, mean 52.182401668666664, retail 87.75386021874584, arb -35.57145855004653, failures 0.", "demand50 (stock floor capped by 0.5 times expected remaining retail demand): tuning one-tick subset of seeds 1000-1599, n=144, mean 52.5461101837, retail 85.71793213722638, arb -33.17182195350556, failures 0.", "duration4 (stock floor capped by retail demand over min(H,4*(distance/one-step-sd)^2) steps): tuning one-tick subset of seeds 1000-1599, n=144, mean 52.575058948417364, retail 84.54686569804375, arb -31.971806749602777, failures 0.", "duration1 (stock floor capped by retail demand over min(H,1*(distance/one-step-sd)^2) steps): tuning one-tick subset of seeds 1000-1599, n=144, mean 52.57662614086806, retail 84.5468690647257, arb -31.970242923834025, failures 0.", "demand25 (stock floor capped by 0.25 times expected remaining retail demand): tuning one-tick subset of seeds 1000-1599, n=144, mean 52.74216388030833, retail 84.93163460769236, arb -32.1894707273618, failures 0.", "passage100 (stock floor capped by 1.0 times retail demand over Brownian truncated first-passage lifetime): tuning one-tick subset of seeds 1000-1599, n=144, mean 52.87351417096667, retail 84.16889927315624, arb -31.295385102165977, failures 0.", "passage25 (stock floor capped by 0.25 times retail demand over Brownian truncated first-passage lifetime): tuning one-tick subset of seeds 1000-1599, n=144, mean 52.93713527405208, retail 84.89366413307708, arb -31.956528858998613, failures 0.", "passage200 (stock floor capped by 2.0 times retail demand over Brownian truncated first-passage lifetime): tuning one-tick subset of seeds 1000-1599, n=144, mean 53.03668088501042, retail 84.9118697036118, arb -31.875188818578472, failures 0.", "uncapped (lift only the 3000-share cap using the original uncapped marginal sizing formula, limited by covered stock): tuning one-tick subset of seeds 1000-1599, n=144, mean 53.26619481412639, retail 84.06618618672847, arb -30.79999137257778, failures 0.", "front_preserve_safe (full stock only on entry below 1.5c; preserve existing front quantity below 2c): tuning one-tick subset of seeds 1000-1599, n=144, mean 53.27529212022708, retail 88.61943598421806, arb -35.34414386395625, failures 0.", "q100_safe (100% of covered YES stock as a tick-2 ask floor, fair-value estimate <=1.5c): tuning one-tick subset of seeds 1000-1599, n=144, mean 53.275322951286114, retail 88.61946681527778, arb -35.34414386395625, failures 0.", "base_chunks8 (base-sized tick-2 asks split into at most 8 equal pieces, minimum one share, without increasing initial size): tuning one-tick subset of seeds 1000-1599, n=144, mean 53.41898690554305, retail 84.51450131870556, arb -31.095514413141668, failures 0.", "preserve200h100 (retain existing tick-2 front orders, no initial-size boost; name specifies fair-value ceiling and minimum remaining H): tuning one-tick subset of seeds 1000-1599, n=144, mean 53.42115300669722, retail 84.52439481012013, arb -31.103241803400692, failures 0.", "base_chunks32 (base-sized tick-2 asks split into at most 32 equal pieces, minimum one share, without increasing initial size): tuning one-tick subset of seeds 1000-1599, n=144, mean 53.43175458678194, retail 84.52823543808333, arb -31.096480851281246, failures 0.", "base_binary (base sizing, split tick-2 FIFO orders into descending geometric pieces with minimum one share): tuning one-tick subset of seeds 1000-1599, n=144, mean 53.454001394052774, retail 84.54953085787847, arb -31.095529463804862, failures 0.", "duration64 (stock floor capped by retail demand over min(H,64*(distance/one-step-sd)^2) steps): tuning one-tick subset of seeds 1000-1599, n=144, mean 53.491045930139585, retail 86.65566430858888, arb -33.164618378427775, failures 0.", "preserve150h0 (retain existing tick-2 front orders, no initial-size boost; name specifies fair-value ceiling and minimum remaining H): tuning one-tick subset of seeds 1000-1599, n=144, mean 53.52410865414375, retail 84.63022329002084, arb -31.10611463585555, failures 0.", "preserve180h0 (retain existing tick-2 front orders, no initial-size boost; name specifies fair-value ceiling and minimum remaining H): tuning one-tick subset of seeds 1000-1599, n=144, mean 53.52410865414375, retail 84.63022329002084, arb -31.10611463585555, failures 0.", "preserve200h0 (retain existing tick-2 front orders, no initial-size boost; name specifies fair-value ceiling and minimum remaining H): tuning one-tick subset of seeds 1000-1599, n=144, mean 53.52410865414375, retail 84.63022329002084, arb -31.10611463585555, failures 0.", "duration16 (stock floor capped by retail demand over min(H,16*(distance/one-step-sd)^2) steps): tuning one-tick subset of seeds 1000-1599, n=144, mean 53.72253014369722, retail 84.83225052858958, arb -31.109720384861802, failures 0.", "uncapped_first (use the original uncapped marginal formula for first size, bounded by stock; retain while base sizing is capped): tuning one-tick subset of seeds 1000-1599, n=144, mean 53.933554650558335, retail 84.73334879990556, arb -30.799794149324995, failures 0.", "q75_safe (75% of covered YES stock as a tick-2 ask floor, fair-value estimate <=1.5c): tuning one-tick subset of seeds 1000-1599, n=144, mean 54.18899393197014, retail 88.17664519333819, arb -33.98765126134097, failures 0.", "q50_safe (50% of covered YES stock as a tick-2 ask floor, fair-value estimate <=1.5c): tuning one-tick subset of seeds 1000-1599, n=144, mean 54.25493863119653, retail 87.05087491904166, arb -32.79593628781598, failures 0.", "two_keepcap (full stock on entry if base sizing >2000; keep front quantity only while base sizing is capped): tuning one-tick subset of seeds 1000-1599, n=144, mean 54.28082587447014, retail 86.25788253040348, arb -31.977056655911806, failures 0.", "saturated_first (full stock on the first tick-2 quote only when the base marginal quantity reaches its 3000-share cap; retain while still capped): tuning one-tick subset of seeds 1000-1599, n=144, mean 54.39648812944445, retail 86.26069502223473, arb -31.864206892766667, failures 0.", "saturated_full (full stock whenever the base tick-2 marginal quantity reaches its 3000-share cap): tuning one-tick subset of seeds 1000-1599, n=144, mean 54.39648812944445, retail 86.26069502223473, arb -31.864206892766667, failures 0.", "confidence30 (full stock only when fair-value plus 3.0 one-step standard deviations is below 2c): tuning one-tick subset of seeds 1000-1599, n=144, mean 54.693813241971526, retail 86.67765545287779, arb -31.983842210881253, failures 0.", "joined_binary_mean (selected entry rule with geometric FIFO pieces; retain up to remaining retail demand (mean, mean+2 sd, or mean+4 sd per suffix), revert to base sizing for the final step): tuning one-tick subset of seeds 1000-1599, n=144, mean 56.390591813927784, retail 87.1476343408604, arb -30.75704252690764, failures 0.", "risk_keep2000 (full stock on entry only below the two-standard-deviation risk boundary; keep front quantity while base sizing >2000): tuning one-tick subset of seeds 1000-1599, n=144, mean 57.2431499316743, retail 88.1293165387125, arb -30.886166607011805, failures 0.", "confidence20 (full stock only when fair-value plus 2.0 one-step standard deviations is below 2c): tuning one-tick subset of seeds 1000-1599, n=144, mean 57.33592714559931, retail 88.51719469847708, arb -31.18126755284722, failures 0.", "first2000 (full stock on first quote only, preserve its remaining size while original marginal ask >2000): tuning one-tick subset of seeds 1000-1599, n=144, mean 57.389605437647916, retail 88.25781228529445, arb -30.868206847617362, failures 0.", "positive2000 (full stock only when original marginal ask quantity >2000): tuning one-tick subset of seeds 1000-1599, n=144, mean 57.389605437647916, retail 88.25781228529445, arb -30.868206847617362, failures 0.", "two_keep0 (full stock on entry if base sizing >2000; keep front quantity while base sizing >0): tuning one-tick subset of seeds 1000-1599, n=144, mean 57.397608008571524, retail 88.76423667632083, arb -31.366628667715972, failures 0.", "cap_keep2000_chunks16 (full stock on first entry only if base sizing is capped at 3000; keep front quantity while base sizing >2000; split large covered first orders into 16 equal FIFO pieces): tuning one-tick subset of seeds 1000-1599, n=144, mean 57.45815611929028, retail 88.21551174632361, arb -30.757355627002084, failures 0.", "cap_keep2000_chunks8 (full stock on first entry only if base sizing is capped at 3000; keep front quantity while base sizing >2000; split large covered first orders into 8 equal FIFO pieces): tuning one-tick subset of seeds 1000-1599, n=144, mean 57.472395403225, retail 88.22775248772638, arb -30.755357084472223, failures 0.", "cap_keep2000 (full stock on first entry only if base sizing is capped at 3000; keep front quantity while base sizing >2000): tuning one-tick subset of seeds 1000-1599, n=144, mean 57.50526769262222, retail 88.26062477712568, arb -30.755357084472223, failures 0.", "joined_keep2000 (full stock before competitor joins at tick 2 only when base sizing is capped; retain existing front quantity after it joins while base marginal size >2000): tuning one-tick subset of seeds 1000-1599, n=144, mean 57.50602094739444, retail 88.26062477712568, arb -30.754603829700002, failures 0.", "cap_keep0 (full stock on entry if base sizing is capped; keep front quantity while base sizing >0): tuning one-tick subset of seeds 1000-1599, n=144, mean 57.51327026354583, retail 88.76704916815208, arb -31.253778904570837, failures 0.", "cap_binary (entry at marginal cap and retention while base size >2000, split large covered entry orders into geometric pieces): tuning one-tick subset of seeds 1000-1599, n=144, mean 57.63329463621042, retail 88.38746151296041, arb -30.754166876720134, failures 0.", "smooth_binary (geometric entry pieces with retention target scaled linearly from original committed size by base marginal size/3000): tuning one-tick subset of seeds 1000-1599, n=144, mean 57.77715836834167, retail 88.5310634047875, arb -30.753905036413194, failures 0.", "smooth_chunks16_p10 (sixteen FIFO pieces with retained target scaled from original commitment by (base marginal quantity/3000) to the power encoded in name): tuning one-tick subset of seeds 1000-1599, n=144, mean 57.777158471428464, retail 88.5310634047875, arb -30.75390493332639, failures 0.", "smooth_chunks16_p20 (sixteen FIFO pieces with retained target scaled from original commitment by (base marginal quantity/3000) to the power encoded in name): tuning one-tick subset of seeds 1000-1599, n=144, mean 57.777158471428464, retail 88.5310634047875, arb -30.75390493332639, failures 0.", "smooth_chunks16_p5 (sixteen FIFO pieces with retained target scaled from original commitment by (base marginal quantity/3000) to the power encoded in name): tuning one-tick subset of seeds 1000-1599, n=144, mean 57.777158471428464, retail 88.5310634047875, arb -30.75390493332639, failures 0.", "joined_binary_tail4 (selected entry rule with geometric FIFO pieces; retain up to remaining retail demand (mean, mean+2 sd, or mean+4 sd per suffix), revert to base sizing for the final step): tuning one-tick subset of seeds 1000-1599, n=144, mean 57.79113800797222, retail 88.54791587687083, arb -30.756777868868053, failures 0.", "cap_keeprisk (full stock on entry if base sizing is capped; keep front quantity only while fair-value plus two standard deviations is below 2c): tuning one-tick subset of seeds 1000-1599, n=144, mean 57.79628781442986, retail 88.55096579521458, arb -30.754677980751392, failures 0.", "joined_keeprisk (full stock before competitor joins at tick 2 only when base sizing is capped; retain existing front quantity after it joins while fair-value plus two standard deviations is below 2c): tuning one-tick subset of seeds 1000-1599, n=144, mean 57.79981265915764, retail 88.55096579521458, arb -30.751153136024307, failures 0.", "joined_binary_tail2 (selected entry rule with geometric FIFO pieces; retain up to remaining retail demand (mean, mean+2 sd, or mean+4 sd per suffix), revert to base sizing for the final step): tuning one-tick subset of seeds 1000-1599, n=144, mean 57.80353483738889, retail 88.5603127062889, arb -30.756777868868053, failures 0.", "joined_h1 (selected entry/retention rule, but revert to base sizing for the final step): tuning one-tick subset of seeds 1000-1599, n=144, mean 57.847501227304164, retail 88.60152719581458, arb -30.754025968479166, failures 0.", "joined_binary (selected competitor-aware retention policy, split large covered entry orders into descending geometric pieces): tuning one-tick subset of seeds 1000-1599, n=144, mean 57.88011738247014, retail 88.63689525137015, arb -30.756777868868053, failures 0.", "joined_keep0_chunks16 (full stock before competitor joins at tick 2 only when base sizing is capped; retain existing front quantity after it joins while base marginal size >0; split large covered first orders into 16 equal FIFO pieces): tuning one-tick subset of seeds 1000-1599, n=144, mean 57.880117485556944, retail 88.63689525137015, arb -30.75677776578125, failures 0.", "joined_keep0 (full stock before competitor joins at tick 2 only when base sizing is capped; retain existing front quantity after it joins while base marginal size >0): tuning one-tick subset of seeds 1000-1599, n=144, mean 57.88286928285973, retail 88.63689525137015, arb -30.754025968479166, failures 0.", "joined_keep0_chunks8 (full stock before competitor joins at tick 2 only when base sizing is capped; retain existing front quantity after it joins while base marginal size >0; split large covered first orders into 8 equal FIFO pieces): tuning one-tick subset of seeds 1000-1599, n=144, mean 57.88286928285973, retail 88.63689525137015, arb -30.754025968479166, failures 0.", "stock100.json: all spreads, tuning seeds 1000-1099, n=100, mean 130.47636443249598, retail 160.10660950391602, arb -29.630245071491, failures 0; one-tick n=17 mean 40.62990856121765, retail 78.27305868911175, arb -37.64315012771176.", "stockkeep100.json: all spreads, tuning seeds 1000-1099, n=100, mean 131.726761297943, retail 161.413535754375, arb -29.68677445651, failures 0; one-tick n=17 mean 47.98518424031765, retail 85.9608601624, arb -37.975675921941175.", "stockkeep600.json: all spreads, tuning seeds 1000-1599, n=600, mean 105.93361014128433, retail 136.28082759436717, arb -30.347217453097002, failures 0; one-tick n=144 mean 48.00690159368472, retail 86.55670805056388, arb -38.549806456853474.", "Unchanged-base holdout control, run only after final code was frozen: seeds 30000-30599 n=600, base mean 96.0405203261775, retail 124.3725985363135, arb -28.332078210128167, failures 0. Candidate paired mean delta 0.29151719602533344, paired standard error 0.2504543285981268; one-tick n=159, base mean 38.18072532361132, candidate mean 39.280790214272955. Control and holdout results did not change the strategy. Candidate holdout retail 124.86556112357401, arb -28.533523601362667.", "Terminal-risk diagnostic, tuning one-tick states only, n=144: the final-step guard changes 6 positions. Model-exact conditional terminal probability gives expected avoided arbitrage loss 0.0001147604550405576 per one-tick run; unbounded retail notional gives an upper bound 0.030009975915267446 on its retail cost. Realized tuning score favors retaining the orders; no terminal guard selected. Diagnostic trajectories exactly matched the official engine. Latent probabilities are used only in this offline diagnostic, never by the submitted strategy.", "--sandbox sandbox-final.json: 20/20 failures before strategy loading, Python 3.12 pathlib imports ntpath, rejected by the runner's import allowlist; same failure for starter_strategy.py. Not counted as a strategy failure in normal-mode scoring.", "--sandbox sandbox-starter.json: 20/20 failures before strategy loading, Python 3.12 pathlib imports ntpath, rejected by the runner's import allowlist; same failure for starter_strategy.py. Not counted as a strategy failure in normal-mode scoring.", "Frozen candidate tuning paired mean delta 1.0596331629348332, paired standard error 0.7340559687492212; 9/600 runs change by more than 1e-6 edge; the largest two positive deltas contribute 0.9223777740403333 to overall mean. Multiple variants were compared on tuning seeds; this is not independent evidence of a true-mean gain.", "Frozen best tuning candidate joined_keep0: full 600 mean 108.30384238668634, one-tick n=144 mean 57.88286928285973; untouched holdout full 600 mean 96.33203752220284, one-tick n=159 mean 39.280790214272955. Zero normal-mode failures; candidate scored once on holdout after selection, with an unchanged-base paired control evaluated afterward; neither was used to change the code."], "next": "Replicate this rule on another untouched seed window before promoting it: its paired holdout gain is modest relative to the standard error. Then test combinations with independently developed improvements. Further work should model the useful lifetime of a front position; simple remaining-demand caps, order splitting, and expiry controls did not improve tuning here."}