{
  "approach": "Retains the base tick probes, sub-tick filter, marginal edge sizing, inventory financing and FIFO order retention. Accounting for all 101597 retail orders on base seeds 0-199 identifies one-tick-spread retail buys below 1 cent as the largest concentrated missed opportunity: base retail edge 7.349807376368711 versus competitor edge 21.092203112690115 per simulation. Instead of pulling its ask while waiting for the competitor's 2-cent ask to erode, the strategy queues a 2-cent ask behind it and uses the normal YES inventory target to support that ask. It captures residual large orders and keeps resting orders as competitor liquidity turns over. The base final-100-step behavior is retained. Full accounting by spread, true price, time remaining and settlement, including hindsight benchmark limitations, is in tried. No seed recognition or path replay.",
  "blocked": null,
  "python_version": "3.12.3",
  "base_mean_edge": 78.85441957511699,
  "score": {
    "mean_edge": 91.025582893137,
    "retail_edge": 121.41240018558817,
    "arb_edge": -30.386817292456332,
    "simulations": 600,
    "seed_start": 0,
    "failures": 0
  },
  "holdout": {
    "mean_edge": 87.91919308349567,
    "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        join_low = ask_t == 1 and H > P['H1'] and P['pre'] > 0\n        if join_low:\n            # Rest behind the 2c competitor instead of leaving no ask. Once its\n            # depth is consumed this order keeps its place in the FIFO queue.\n            ask_t = 2\n            qa = qask(ask_t)\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 or join_low)) 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": "5f1c695eb1871ffbac944382ac11647def52a553e855b9cf2749e398ff67be61",
  "tried": [
    "Accounting: local base seeds 0-199, 101597 individual retail orders logged with side, notional, fills (price, quantity, edge), true p, horizon, competitor quotes, inventory and hindsight best single-price quote. Instrumented and unmodified simulator per-seed scores match exactly. Entries below are dollar edge contributions per simulation (divide by all 200 runs, including settlement rows), not conditional means; counts are raw.",
    "Accounting benchmark: oracle is the best single surviving passive tick for each realized retail order, with unlimited size/collateral and optimistic priority ahead of equal-tick competitor liquidity; better-priced competitor depth is consumed first, other participant orders are omitted. This uses post-arbitrage true p and order size, is hindsight and not achievable simultaneously, and is not an upper bound on a multi-price book. Inside is unlimited depth one tick inside the post-arbitrage competitor best quote, clipped to nonnegative edge. Neither benchmark estimates adverse-selection costs. Competitor edge is further partitioned at each actual fill into no main participant quote, participant depth exhausted earlier in this same retail order, participant behind at the same tick, or participant quoting a worse tick; probes are excluded from main depth. The depth-exhausted category takes precedence over any remaining worse quote. Actual competitor edge is recorded directly on every fill, rather than inferred from residuals.",
    "Accounting all=all: {\"orders\":101597,\"base_filled_orders\":64593,\"oracle\":205.37296182073524,\"inside\":139.5550615263314,\"base\":105.18483657221817,\"competitor\":85.38768667579176,\"unspent_buy_notional\":92.24206138347161,\"no_main_quote\":59.62776185944255,\"base_depth_exhausted\":25.759924816348484,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":100.18812524851707}",
    "Accounting configured_spread=1: {\"orders\":27088,\"base_filled_orders\":13021,\"oracle\":56.565880303959794,\"inside\":32.43201766191602,\"base\":10.38948560079356,\"competitor\":44.65978073615043,\"unspent_buy_notional\":18.62614646498568,\"no_main_quote\":36.8524917621215,\"base_depth_exhausted\":7.807288974028918,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":46.17639470316624}",
    "Accounting configured_spread=2: {\"orders\":29170,\"base_filled_orders\":18304,\"oracle\":52.85974405936935,\"inside\":36.06790733095195,\"base\":30.333572594667004,\"competitor\":18.404153651462963,\"unspent_buy_notional\":37.5097883129945,\"no_main_quote\":10.860553555259887,\"base_depth_exhausted\":7.543600096202955,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":22.526171464702344}",
    "Accounting configured_spread=3: {\"orders\":25249,\"base_filled_orders\":17998,\"oracle\":44.06139493834673,\"inside\":31.266303697561852,\"base\":27.203551138322972,\"competitor\":13.022565488909265,\"unspent_buy_notional\":22.383203851837624,\"no_main_quote\":7.295626113189082,\"base_depth_exhausted\":5.7269393757201135,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":16.85784380002376}",
    "Accounting configured_spread=4: {\"orders\":20090,\"base_filled_orders\":15270,\"oracle\":51.885942519062255,\"inside\":39.788832835901545,\"base\":37.258227238434166,\"competitor\":9.30118679926856,\"unspent_buy_notional\":13.72292275365401,\"no_main_quote\":4.619090428872104,\"base_depth_exhausted\":4.682096370396464,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":14.627715280628088}",
    "Accounting retail_side=BUY: {\"orders\":50755,\"base_filled_orders\":32059,\"oracle\":146.9567361028618,\"inside\":112.46649049439895,\"base\":85.08149996143845,\"competitor\":54.39327098541674,\"unspent_buy_notional\":92.24206138347161,\"no_main_quote\":37.37977736056811,\"base_depth_exhausted\":17.013493624848703,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":61.87523614142336}",
    "Accounting retail_side=SELL: {\"orders\":50842,\"base_filled_orders\":32534,\"oracle\":58.41622571787654,\"inside\":27.08857103193235,\"base\":20.103336610779365,\"competitor\":30.99441569037425,\"unspent_buy_notional\":0.0,\"no_main_quote\":22.247984498874494,\"base_depth_exhausted\":8.746431191499806,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":38.31288910709718}",
    "Accounting settlement=0: {\"orders\":47342,\"base_filled_orders\":29172,\"oracle\":166.2018560763435,\"inside\":118.2739190124408,\"base\":90.16200472003615,\"competitor\":65.29258351435558,\"unspent_buy_notional\":0.18912189393574855,\"no_main_quote\":45.60088453969834,\"base_depth_exhausted\":19.691698974657097,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":76.03985135630734}",
    "Accounting settlement=1: {\"orders\":54255,\"base_filled_orders\":35421,\"oracle\":39.171105744395355,\"inside\":21.281142513890998,\"base\":15.022831852181946,\"competitor\":20.09510316143549,\"unspent_buy_notional\":92.05293948953589,\"no_main_quote\":14.026877319744122,\"base_depth_exhausted\":6.068225841691419,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":24.14827389221341}",
    "Accounting spread_price_side=1:[0,.01):BUY: {\"orders\":1388,\"base_filled_orders\":1263,\"oracle\":28.476415076719015,\"inside\":24.129777786925196,\"base\":7.349807376368711,\"competitor\":21.092203112690115,\"unspent_buy_notional\":0.0006740686280505295,\"no_main_quote\":17.986638312839695,\"base_depth_exhausted\":3.10556479985041,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":21.126607700350306}",
    "Accounting steps_remaining=1-100: {\"orders\":5028,\"base_filled_orders\":2500,\"oracle\":21.488240747814427,\"inside\":19.252225949015006,\"base\":14.832598666056194,\"competitor\":5.991113706346969,\"unspent_buy_notional\":23.64125784957425,\"no_main_quote\":2.9041712308369325,\"base_depth_exhausted\":3.0869424755100483,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":6.6556420817582325}",
    "Accounting steps_remaining=1001-2000: {\"orders\":50729,\"base_filled_orders\":33746,\"oracle\":59.36967289471824,\"inside\":30.095426839090962,\"base\":24.014998134108577,\"competitor\":29.112097040291538,\"unspent_buy_notional\":6.408528984881555,\"no_main_quote\":20.105293217118156,\"base_depth_exhausted\":9.00680382317343,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":35.35467476060967}",
    "Accounting steps_remaining=101-300: {\"orders\":10191,\"base_filled_orders\":5721,\"oracle\":37.797256208001556,\"inside\":31.861103573396157,\"base\":21.10202338726334,\"competitor\":15.241405031548133,\"unspent_buy_notional\":28.834221754141307,\"no_main_quote\":11.214196750878202,\"base_depth_exhausted\":4.027208280669938,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":16.695232820738216}",
    "Accounting steps_remaining=301-1000: {\"orders\":35649,\"base_filled_orders\":22626,\"oracle\":86.71779197020363,\"inside\":58.34630516482928,\"base\":45.23521638478953,\"competitor\":35.04307089760452,\"unspent_buy_notional\":33.35805279487476,\"no_main_quote\":25.404100660609473,\"base_depth_exhausted\":9.638970236995043,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":41.482575585414104}",
    "Accounting true_price=[.01,.05): {\"orders\":4407,\"base_filled_orders\":2963,\"oracle\":34.42946815134844,\"inside\":20.298702961910713,\"base\":20.191689573823986,\"competitor\":9.180553026478584,\"unspent_buy_notional\":0.0025281908828273763,\"no_main_quote\":5.767392045322687,\"base_depth_exhausted\":3.413160981155908,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":14.237778577524452}",
    "Accounting true_price=[.05,.20): {\"orders\":10984,\"base_filled_orders\":7091,\"oracle\":33.84454453098287,\"inside\":15.945181425592006,\"base\":11.737149201664288,\"competitor\":19.019143894654572,\"unspent_buy_notional\":0.01913139024833267,\"no_main_quote\":11.710385510875364,\"base_depth_exhausted\":7.308758383779214,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":22.107395329318585}",
    "Accounting true_price=[.20,.80): {\"orders\":54654,\"base_filled_orders\":35856,\"oracle\":51.47662920215705,\"inside\":27.741077166568026,\"base\":17.943570211480537,\"competitor\":29.328075841407077,\"unspent_buy_notional\":0.3512762445140052,\"no_main_quote\":22.063170338400838,\"base_depth_exhausted\":7.264905503006267,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":33.53305899067651}",
    "Accounting true_price=[.80,.95): {\"orders\":12234,\"base_filled_orders\":8429,\"oracle\":5.6258381806102715,\"inside\":2.909492522751746,\"base\":2.373183995831898,\"competitor\":2.577497672905795,\"unspent_buy_notional\":0.13450842376105776,\"no_main_quote\":1.5935975604438104,\"base_depth_exhausted\":0.9839001124619827,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":3.2526541847783736}",
    "Accounting true_price=[.95,.99): {\"orders\":4735,\"base_filled_orders\":3209,\"oracle\":1.764517259784809,\"inside\":0.8995477359960938,\"base\":0.8618255759378173,\"competitor\":0.6016209551418481,\"unspent_buy_notional\":4.835161068592751,\"no_main_quote\":0.3054179144364341,\"base_depth_exhausted\":0.29620304070541265,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":0.9026916838469916}",
    "Accounting true_price=[.99,1]: {\"orders\":7521,\"base_filled_orders\":3707,\"oracle\":2.6238859829538423,\"inside\":1.7558263168665909,\"base\":1.566739355256874,\"competitor\":0.3835509616097184,\"unspent_buy_notional\":86.89714600455629,\"no_main_quote\":0.08184743425631598,\"base_depth_exhausted\":0.3017035273534025,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":1.0571466276969683}",
    "Accounting true_price=[0,.01): {\"orders\":7062,\"base_filled_orders\":3338,\"oracle\":75.60807851290024,\"inside\":70.00523339664602,\"base\":50.51067865822233,\"competitor\":24.29724432359335,\"unspent_buy_notional\":0.002310060916544126,\"no_main_quote\":18.105951055707063,\"base_depth_exhausted\":6.191293267886269,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":25.097399854677903}",
    "Accounting visible_spread=1: {\"orders\":10,\"base_filled_orders\":0,\"oracle\":0.0028619356142437014,\"inside\":0.0,\"base\":0.0,\"competitor\":0.0028619356142437014,\"unspent_buy_notional\":6.392213356951698e-05,\"no_main_quote\":0.0028619356142437014,\"base_depth_exhausted\":0.0,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":0.0028619356142437014}",
    "Accounting visible_spread=2: {\"orders\":21938,\"base_filled_orders\":10721,\"oracle\":50.16975195224509,\"inside\":29.050072141451224,\"base\":10.012858549000377,\"competitor\":38.64883777652964,\"unspent_buy_notional\":18.386139635961175,\"no_main_quote\":31.544786602316847,\"base_depth_exhausted\":7.104051174212795,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":40.156893403244716}",
    "Accounting visible_spread=3: {\"orders\":29164,\"base_filled_orders\":18166,\"oracle\":52.5069613967415,\"inside\":35.04202790454517,\"base\":28.863149714069365,\"competitor\":19.761189686147755,\"unspent_buy_notional\":37.576804165288564,\"no_main_quote\":12.680195617651481,\"base_depth_exhausted\":7.080994068496145,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":23.643811682672137}",
    "Accounting visible_spread=4: {\"orders\":25198,\"base_filled_orders\":17555,\"oracle\":43.2330072026228,\"inside\":30.36055243944572,\"base\":25.853932033928654,\"competitor\":13.839771888759826,\"unspent_buy_notional\":22.433028418367144,\"no_main_quote\":8.149873949778417,\"base_depth_exhausted\":5.689897938981357,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":17.379075168694147}",
    "Accounting visible_spread=5+: {\"orders\":25287,\"base_filled_orders\":18151,\"oracle\":59.460379333514595,\"inside\":45.10240904088927,\"base\":40.4548962752195,\"competitor\":13.135025388739853,\"unspent_buy_notional\":13.84602524172136,\"no_main_quote\":7.250043754081611,\"base_depth_exhausted\":5.884981634658163,\"base_behind_same_tick\":0.0,\"base_at_worse_tick\":0.0,\"oracle_minus_base\":19.0054830582951}",
    "Accounting conditional settlement=0: runs=94, {\"oracle\":353.62097037519897,\"inside\":251.64663619668255,\"base\":191.8340525958216,\"competitor\":138.92039045607572}",
    "Accounting conditional settlement=1: runs=106, {\"oracle\":73.9077466875384,\"inside\":40.153099082813206,\"base\":28.34496575883386,\"competitor\":37.91528898384055}",
    "Reproduction: unmodified public simulator commit b244530ee2a6247b5f930830eeca9dd950da0e7e, Python 3.12.3, seeds 0-199: {\"mean_edge\":78.85441957511699,\"retail_edge\":105.184836572219,\"arb_edge\":-26.330416997007,\"simulations\":200,\"seed_start\":0,\"failures\":0}. Both instrumented versions reproduce every per-seed result field exactly. Scoring uses the unmodified simulator; instrumented copies only produce diagnostics.",
    "Baseline full seeds 0-599: {\"mean_edge\":87.41650726068066,\"retail_edge\":116.13125849331949,\"arb_edge\":-28.714751232636335,\"simulations\":600,\"seed_start\":0,\"failures\":0}. All searches used seeds 0-599 only; no strategy or parameter change followed the holdout run. --workers 4 worked on this machine.",
    "Frozen strategy versus base, paired on seeds 0-599: mean total-edge difference=3.6090756324563333, paired standard error=0.6937810512645214. These are training estimates; holdout is evaluated once without a base holdout or further tuning.",
    "Sandbox check: frozen final file and examples/starter_strategy.py both fail all 20 simulations on seeds 0-19 before strategy loading: ImportError: Import of 'ntpath' is not allowed in sandbox mode (Python 3.12 pathlib). Unsandboxed final training and holdout runs have zero failed simulations. The simulator sandbox was not patched for scoring.",
    "Rejected endgame extension: retain the 2-cent join even in the last 100 steps; seeds 0-199: {\"mean_edge\":82.0660444329085,\"retail_edge\":110.84551570763449,\"arb_edge\":-28.7794712746395,\"simulations\":200,\"seed_start\":0,\"failures\":0}. It lost -1.1983334590974977 versus retaining the base endgame.",
    "Queue behind the 2-cent competitor, preserve the base ammunition target in the join state; seeds 0-199: {\"mean_edge\":82.3717433486295,\"retail_edge\":109.9980590812515,\"arb_edge\":-27.6263157325275,\"simulations\":200,\"seed_start\":0,\"failures\":0}. This leaves the other spread regimes exactly unchanged in those runs.",
    "Best: queue at 2 cents with the normal inventory target, retaining the base final-100-step rule; seeds 0-199: {\"mean_edge\":83.264377892006,\"retail_edge\":111.9665581370885,\"arb_edge\":-28.702180244994,\"simulations\":200,\"seed_start\":0,\"failures\":0}; frozen seeds 0-599: {\"mean_edge\":91.025582893137,\"retail_edge\":121.41240018558817,\"arb_edge\":-30.386817292456332,\"simulations\":600,\"seed_start\":0,\"failures\":0}; untouched holdout seeds 20000-20599: {\"mean_edge\":87.91919308349567,\"retail_edge\":120.35575709567216,\"arb_edge\":-32.436564012183666,\"simulations\":600,\"seed_start\":20000,\"failures\":0}. One localized quoting-policy change, no constant sweep."
  ],
  "next": "The remaining one-tick-spread opportunity outside the near-zero regime sits mostly behind competitor queue depth. Try estimating competitor depth from observed erosion, then sizing a join at the competitor tick using residual retail-size tails instead of unconditional size tails. Keep inventory and adverse-selection costs in the objective. Use a fresh holdout; seeds 20000-20599 are now evaluation data, and were not used for tuning here."
}
