{
  "what_if": "No arbitrage against base on no-jump steps, except base bids at 5 cents and below",
  "blocked": null,
  "python_version": "3.12.3",
  "base_mean_edge": 109.27254289017199,
  "base_unseen": {
    "mean_edge": 98.28063388702982,
    "retail_edge": 126.01907227628422,
    "arb_edge": -27.73843838925235
  },
  "diff": {
    "mean": -28.3573790154357,
    "standard_error": 0.8875141718092743,
    "simulations": 4000,
    "seed_start": 50000,
    "retail": -23.892162488129298,
    "arb": -4.46521652731325
  },
  "by_spread": [
    {
      "spread": 1,
      "runs": 1016,
      "diff": -1.0846146521940945,
      "standard_error": 2.1757687143676554
    },
    {
      "spread": 2,
      "runs": 998,
      "diff": -21.205793930662526,
      "standard_error": 1.1057742786037525
    },
    {
      "spread": 3,
      "runs": 1017,
      "diff": -42.181926661469916,
      "standard_error": 1.5211330385911017
    },
    {
      "spread": 4,
      "runs": 969,
      "diff": -49.80923200990454,
      "standard_error": 1.6850725750615099
    }
  ],
  "how": "Simulator commit b244530ee2a6247b5f930830eeca9dd950da0e7e. Unchanged strategy extracted from the requested artifact JSON code field, SHA256 baef955ec10728839f7c3357016ec9eb0550e7ec689bbd5171b1cdd5c9e37273. Python standard library only; no sandbox. Scored from the clone with python3 -m orderbook_pm_challenge run base.py --simulations 600 --seed-start 1000 --workers 4 --json and then --simulations 4000 --seed-start 50000. In a separate scratch clone: (1) immediately after process.py samples jump_count, store self.last_jump_count = jump_count, consuming no additional RNG; no jump means sampled count == 0, not small price movement or net jump cancellation. (2) engine.py passes no_jump=process.last_jump_count == 0 to execute_arbitrage after process.step(). (3) On jump steps call the original execute_arbitrage unchanged. On no-jump steps, sweep asks then bids in price/time order, restricting eligibility to competitor orders or participant BUY orders with price_ticks <= 5. Eligible asks execute only below probability - EPSILON; eligible bids execute only above probability + EPSILON. Directly call the existing _fill_order on each eligible order's full remaining quantity. This bypasses protected participant quotes without allowing them to block competitor sweeps; competitor removal/replenishment and all fill accounting use existing code. Protected orders stay in the book for normal retail. Nothing else is changed; base.py is byte identical across both clones. The what-if uses the identical 4000 unseen seeds. Statistics pair total_edge, retail_edge and arb_edge by seed; means use sum/N, standard errors use sample stdev of paired total-edge differences divided by sqrt(N), overall and separately within each sampled competitor_spread_ticks group. Positive differences improve score. arb_edge is kept signed, so a positive arb difference means a smaller arbitrage loss. No failed runs are excluded: all batches are required to have zero failures.",
  "clean": "This net intervention is not a clean cost-only no-drift-loss ceiling for the unchanged base, because suppressing executions also changes its observations and later decisions. No other privileged signal, free stock, added capital, altered probabilities, altered retail flow, or changed competitor arbitration rule was introduced. Random process scores and RNG states were equal for 25 seeds x 2000 steps; 500 randomized books checked exact no-jump eligibility and unchanged jump sweeps. Five directed checks additionally covered the 5/6-cent boundary, competitor bypass, retail access, jump eligibility, and equality at fair value. The requested exception exposes ALL base bids <=5 cents, including probes, not only orders labeled stock purchases. Protection also removes no-jump arbitrage fills on protected probes and main orders: the unchanged strategy's fill-based probability filter consequently receives different information. Surviving orders also remain available to retail, occupy collateral, change inventory and future decisions; these are endogenous consequences, not extra independent cheats. Thus this is a clean implementation of the requested rule, but its net gain is not a rigorous upper bound on a redesigned strategy that could avoid drift losses while retaining the original probe information. In particular a small or negative gain alone cannot close that broader direction. A clean cost-only ceiling with the original probe information cannot be obtained under this exact rule while keeping the base unchanged. Restoring the original observations would require a second privileged change, which was not made.",
  "realizable": "A real strategy can reduce exposure to small diffusion moves by canceling/repricing or shrinking main quotes close to its predicted next-step fair value, while preserving tiny probes and cheap stock bids. It cannot selectively refuse only arbitrage fills after learning that no jump occurred: actions are fixed before the latent process advances, and retail arrives after the arbitrageur. Quote protection therefore costs retail price priority, fill probability and edge; pulling probes also worsens inference. Larger buffers additionally reduce jump exposure, so a real attempt's gain cannot be attributed purely to no-jump protection. Tested one feasible public-state mechanism: retain the original probability-estimation, sizing, probe and stock rules, but place main BUY ticks above 5 no higher than floor(100*(phat-k*sp)), and main SELL ticks no lower than ceil(100*(phat+k*sp)), where sp is the base's predicted one-step diffusion probability standard deviation. This is a predictive price buffer, not selective matching immunity. The buffer does not directly move main bids originally <=5. The separate stock-generation and probe code is unchanged, but changed main ticks, fills, estimates and inventory can alter its resulting stock/probe orders. All existing placement gates remain, so a buffered tick equal to the competitor can suppress new main liquidity rather than join that tick. Sizing is recomputed at the buffered tick by the original sizing functions.",
  "attempt": {
    "mechanism": "Predicted diffusion price buffer on main quotes, original simulator; probes and stock logic retained",
    "selected_k": 0.25,
    "code_sha256": "5439836b2510b78b7aae382e5ecab9b64102aba46175196ad05c8f88d76cb18f",
    "tuning": {
      "seed_start": 4000,
      "simulations": 400,
      "base_mean_edge": 112.614111601236,
      "candidates": {
        "025": {
          "mean": -0.026467903318000117,
          "standard_error": 0.011354735623496268,
          "retail": -0.1876536841970002,
          "arb": 0.16118578087475,
          "by_spread": [
            {
              "spread": 1,
              "runs": 110,
              "diff": -0.07715182295545495,
              "standard_error": 0.040251267823075115
            },
            {
              "spread": 2,
              "runs": 88,
              "diff": -0.01482159536363538,
              "standard_error": 0.008747637003481546
            },
            {
              "spread": 3,
              "runs": 89,
              "diff": -0.006840681888764621,
              "standard_error": 0.004449799883373249
            },
            {
              "spread": 4,
              "runs": 113,
              "diff": -0.0016578736460180208,
              "standard_error": 0.0009810745872853002
            }
          ],
          "mean_edge": 112.587643697918
        },
        "050": {
          "mean": -0.7914532128675,
          "standard_error": 0.06552019801050205,
          "retail": -0.17791155328699998,
          "arb": -0.6135416595879998,
          "by_spread": [
            {
              "spread": 1,
              "runs": 110,
              "diff": -1.2378714437990914,
              "standard_error": 0.16848005929663692
            },
            {
              "spread": 2,
              "runs": 88,
              "diff": -0.777497975835227,
              "standard_error": 0.12538934438715565
            },
            {
              "spread": 3,
              "runs": 89,
              "diff": -0.4654513977393268,
              "standard_error": 0.0748068818947584
            },
            {
              "spread": 4,
              "runs": 113,
              "diff": -0.6245170801486716,
              "standard_error": 0.10742698651534191
            }
          ],
          "mean_edge": 111.8226583883685
        }
      },
      "selection": "Larger paired tuning mean among k=0.25 and k=0.5; no unseen data used in selection. Only seeds 4000..4399 used, a subset of the allowed 4000..7999 tuning range."
    },
    "diff": {
      "mean": 0.06769675810909985,
      "standard_error": 0.06596692953580126,
      "simulations": 4000,
      "seed_start": 50000,
      "retail": -0.194814293930675,
      "arb": 0.262511052040325
    },
    "by_spread": [
      {
        "spread": 1,
        "runs": 1016,
        "diff": 0.29359225694803115,
        "standard_error": 0.2592405850446036
      },
      {
        "spread": 2,
        "runs": 998,
        "diff": -0.012346052803707543,
        "standard_error": 0.014428961577187096
      },
      {
        "spread": 3,
        "runs": 1017,
        "diff": -0.009128453602556564,
        "standard_error": 0.003671057578092879
      },
      {
        "spread": 4,
        "runs": 969,
        "diff": -0.006086380403405653,
        "standard_error": 0.0037203211049587587
      }
    ],
    "mean_edge": 98.34833064513892,
    "retail_edge": 125.82425798235354,
    "arb_edge": -27.475927337212028
  },
  "tried": [
    "Base reproduction: 600 seeds 1000..1599 mean_edge=109.27254289017199; supplied reference=109.27254289017199; failures=0.",
    "Base unseen: 4000 seeds 50000..53999 mean_edge=98.28063388702982; supplied reference=98.28063388702982; failures=0.",
    "No-jump protection: 4000 paired seeds; mean_edge=69.92325487159412; retail_edge=102.12690978815492; arb_edge=-32.2036549165656; diff=-28.3573790154357; standard_error=0.8875141718092743; retail_diff=-23.892162488129298; arb_diff=-4.46521652731325; failures=0.",
    "One-seed no-jump protection smoke, seed 1000: base=11.3584610847; what_if=1.6684541664; not used for tuning or the reported unseen estimate.",
    "Tuning baseline: 400 seeds 4000..4399 mean_edge=112.614111601236; failures=0.",
    "Buffer k=0.25: 400 tuning seeds 4000..4399 paired mean=-0.026467903318000117; standard_error=0.011354735623496268; failures=0.",
    "Buffer k=0.5: 400 tuning seeds 4000..4399 paired mean=-0.7914532128675; standard_error=0.06552019801050205; failures=0.",
    "Selected real buffer unseen: 4000 paired seeds; diff=0.06769675810909985; standard_error=0.06596692953580126; retail_diff=-0.194814293930675; arb_diff=0.262511052040325; failures=0.",
    "Boundary checks: 5 passed (5/6-cent exception, competitor bypass, protected retail access, jump exposure, equality at fair value).",
    "Isolation: 50000 process transitions preserved scores and final RNG states; 500 randomized books passed exposed/protected eligibility and original jump-sweep equivalence."
  ],
  "next": "Do not use this negative net intervention as a ceiling or close drift avoidance from it: the fill-based inference of the base assumes the very executions removed by the rule. First replay the original strategy and count original-path arbitrage edge separately for jump/no-jump steps, main quotes/tiny probes, and bids <=5 cents. This measures the direct cost before endogenous information and inventory changes. Only then consider targeted protection that leaves probes live; compare its retail-priority cost with execution savings. The tested real buffer is the initial implementable comparison. The buffer gained 0.06769675810909985 with standard error 0.06596692953580126 on unseen seeds, about one standard error; this does not establish a useful improvement."
}
