{
 "what_if": "No cheat: autopsy of the base's 200 richest runs, plus a phantom-depth ceiling (unlimited depth at the base's own best price for retail orders while p<0.05)",
 "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": 6.1430107364775814,
  "standard_error": 0.35304196679864086,
  "simulations": 4000,
  "seed_start": 50000,
  "retail": 6.1430107364775814,
  "arb": 0.0
 },
 "by_spread": [
  {
   "spread": 1,
   "runs": 1016,
   "diff": 10.890405256355507,
   "standard_error": 1.0733858286874989
  },
  {
   "spread": 2,
   "runs": 998,
   "diff": 6.081996359305553,
   "standard_error": 0.5865846879239448
  },
  {
   "spread": 3,
   "runs": 1017,
   "diff": 3.82928115306932,
   "standard_error": 0.4386795601474673
  },
  {
   "spread": 4,
   "runs": 969,
   "diff": 3.6565324109336315,
   "standard_error": 0.49520920325999784
  }
 ],
 "how": "Scratch copy of SimulationEngine.run (.cache/autopsy.py) that imports the unmodified simulator at commit b244530 and reproduces every one of the 4000 base edges on seeds 50000-53999 exactly. It records, for every retail order arriving while the true probability p<0.05, its notional, what the base filled, and why the rest was not filled, using a record-only copy of the base that logs its intended quote ticks/sizes and any cash/stock clipping of the step. What-if: phantom depth. When p<0.05, the part of a retail order the real book did not fill is credited to the base as a fill at the base's own best price that step (its best resting order or its intended quote tick, whichever is better, and only if it is on the right side of p), as if that quote had unlimited size. No credit if the competitor's price was strictly better; competitor size resting at the same tick is served first. The credit is pure accounting: book, cash, inventory, arbitrage and the base's later decisions are untouched, so the run-by-run difference equals the credited edge. diff.mean is the per-run mean over all 4000 seeds. The brief also asks for the edge the base misses in its best 200 runs: 27.114326125510075 per run (standard error 3.0316859184254654); in its worst 200 it is 4.10601631541351.",
 "clean": "Clean in the sense that nothing else changes: the base's real fills, cash, inventory and decisions are identical, so the diff is all retail edge, with no arbitrage term. It is generous in one way: phantom size never rests in the book, so it never pays the arbitrageur on up-jumps, and that cost is exactly why the base's marginal size rule caps size. It is stingy in one way: when the base had no order at its best tick because of stock or cash, the credit uses the tick it intended that step, but there is no credit for retail flow the competitor took at a strictly better price. Below 1 cent no bid has positive edge, so retail sells there cannot be credited by any rule (labelled 'competitor price' below). Same-tick competitor size is treated as always ahead in the queue, which slightly understates the credit.",
 "realizable": "Very little. In its best 200 runs the base already fills 721.2183900000001 of the 779.2904318567215 dollars of retail buy notional that arrive below 5 cents (92.5%), and earns 576.2874002669555 edge from them. Edge per dollar is 1-p/x at ask price x, and the base already quotes one tick inside the competitor, so what is left of that gap comes from the tick grid and the competitor's price, not from the base. The phantom unfilled notional is mostly its own size rule (39.31920904824521 dollars per best run), then stock/collateral clipping of uncovered asks (11.03472193539606, concentrated in the last 200 steps, where the reserve and Hu throttles bind: [0.0, 0.1, 0.2, 1.0, 1.0, 1.2, 1.1, 0.0, 0.4, 6.0] per 200-step block). Hard cash exhaustion never bound (0.0). Retail sells below 5 cents (756.0456673552414 dollars) are mostly unfillable: 635.245004619251 arrive when no tick below p beats the competitor, which mostly means p<1 cent. The way to capture the size part is bigger low-price asks, and the cost is arbitrage on up-jumps. Lowering kL (low-price ask loss weight) from 0.15 to 0.08 gained 0.89 retail but lost 2.53 to the arbitrageur on seeds 4000-4999 (net -1.64). Raising the share cap qmax from 3000 to 6000 is the only free piece: +0.13 on tuning and +0.18 on the holdout. Paradigm's second-place entry earning about 1,390 in its best run against about 1,000 for this network's is not explained by fills missed in rich runs. Here the base's richest run (seed 51854) earns 1282.7521690291 and its phantom ceiling is only 47.68447676402892. A bigger best run must come from runs with more retail flow below 5 cents, or from reaching low-price mode sooner, not from filling more of the flow this design sees.",
 "attempt": {
  "change": "qmax 3000 -> 6000 (P['qmax']=6000.0), nothing else; chosen on seeds 4000-4999 among kL=0.08, kL=0.04 and qmax=6000",
  "mean": 0.17881432068125003,
  "standard_error": 0.07912630296231266,
  "simulations": 4000,
  "seed_start": 50000,
  "retail": 0.5253612814771742,
  "arb": -0.3465469607960223,
  "by_spread": [
   {
    "spread": 1,
    "runs": 1016,
    "diff": 0.17670129895679135,
    "standard_error": 0.24358889664733
   },
   {
    "spread": 2,
    "runs": 998,
    "diff": 0.3615746852945893,
    "standard_error": 0.11681920475565925
   },
   {
    "spread": 3,
    "runs": 1017,
    "diff": 0.15542166971278268,
    "standard_error": 0.08966995210530375
   },
   {
    "spread": 4,
    "runs": 969,
    "diff": 0.017351278599587256,
    "standard_error": 0.13468550636627175
   }
  ],
  "failures": 0
 },
 "tried": [
  "Scorer check: base on seeds 1000-1599 = 109.27254289017199 (author 109.27254289017199); on 50000-53999 = 98.28063388702982, retail 126.01907227628422, arb -27.73843838925235, 0 failures.",
  "Instrumented engine copy reproduces all 4000 base edges on 50000-53999 exactly (asserted run by run).",
  "Best 200 runs: edge 619.070549738159 (retail 671.7889806196746, arb -52.718430881413); settled YES 0.0; spread counts 1/2/3/4 = [11, 38, 70, 81]; steps with p<0.05 1079.335; expected retail notional per run (rate*mean*2000) 2853.0583585934905; jumps 4.165; start p 0.39306373039921966",
  "Worst 200 runs: edge -88.694186466974 (retail 50.627270581775, arb -139.3214570487405); settled YES 0.395; spread counts 1/2/3/4 = [114, 40, 24, 22]; steps with p<0.05 173.67; expected retail notional per run (rate*mean*2000) 2044.5597375803297; jumps 4.225; start p 0.457933040284627",
  "All 4000 runs: edge 98.28063388702982 (retail 126.01907227628422, arb -27.73843838925235); settled YES 0.5; spread counts 1/2/3/4 = [1016, 998, 1017, 969]; steps with p<0.05 237.43225; expected retail notional per run (rate*mean*2000) 2276.9163798813647; jumps 3.825; start p 0.4975041326718575",
  "Separation: best runs all settle NO and spend about 1079 of 2000 steps below 5 cents (worst: 174). They are mostly wide competitor spreads (spread 3-4: 151 of 200) with higher retail rate and size. Worst runs are mostly spread 1 (114 of 200) and lose 139 to the arbitrageur. Jump counts barely differ (4.17 vs 4.23).",
  "Best 200, below 5 cents, per run: retail buy notional arrived 779.2904318567215, base filled 721.2183900000001, edge 576.2874002669555; retail sell notional arrived 756.0456673552414, base filled 105.42832309604637, edge 12.697680710816671.",
  "Best 200, unfilled buy notional below 5c by cause, per run: competitor price/priority 7.559638787640947, base size rule 39.31920904824521, stock/collateral clip 11.03472193539606, cash exhausted 0.0, no quote intended 0.15847208543939817. Sells: competitor/no tick below p 635.245004619251, size 14.936738200090854, cash 0.0.",
  "Best 200, per 200-step block, steps below 5c [0.1, 6.2, 20.6, 47.4, 95.4, 141.2, 178.9, 191.9, 198.3, 199.2]; buy notional arrived [0.1, 4.0, 16.6, 31.9, 63.6, 98.4, 126.9, 139.1, 144.8, 153.7]; filled [0.1, 3.6, 14.0, 28.6, 57.7, 91.1, 115.8, 131.7, 139.6, 139.0]; size-rule shortfall [0.0, 0.3, 1.7, 1.5, 3.4, 4.2, 8.9, 6.4, 4.6, 8.5]; stock clip [0.0, 0.1, 0.2, 1.0, 1.0, 1.2, 1.1, 0.0, 0.4, 6.0]; competitor [0.0, 0.1, 0.8, 0.9, 1.4, 1.9, 1.2, 1.0, 0.2, 0.3]; phantom edge [0.0, 0.0, 0.4, 0.5, 0.8, 1.5, 3.2, 3.6, 3.8, 12.5].",
  "Phantom-depth ceiling, all 4000: 6.1430107364775814 (se 0.35304196679864086); buys 5.9123972557985836, sells 0.2306134806789973. Best 200: 27.114326125510075 (se 3.0316859184254654). Spread 1/2/3/4: 10.890405256355507, 6.081996359305553, 3.82928115306932, 3.6565324109336315.",
  "Richest base runs (seed, edge, phantom): 51352 1065.1345459412 40.74642076218867; 51878 1080.3829800892 7.149089672816198; 51426 1145.4074216431 0.9182755286899341; 52161 1154.1313072469 4.844542856668317; 51854 1282.7521690291 47.68447676402892",
  "Seeds 4000-4999 tuning, paired vs base 101.9454731952229: kL 0.15->0.08 diff -1.6383658534249999 (se 0.556, retail +0.893, arb -2.532); kL->0.04 diff -2.4787076554181997 (se 0.761, retail +1.191, arb -3.669); qmax 3000->6000 diff 0.13267734703919992 (se 0.121).",
  "Holdout 50000-53999, qmax 6000: diff 0.17881432068125003 (se 0.07912630296231266), 0 failures.",
  "Paradigm leaderboard per-run figures (about 1,390 vs about 1,000) are from the brief; Paradigm's seeds are not public, so they could not be checked here."
 ],
 "next": "Do not build on deeper low-price quoting: the full no-stock/no-cash/no-size-cap ceiling is about 6.1 a run, but only about 0.2 of it survives the arbitrage cost (qmax 6000, +0.18\u00b10.08 on the holdout, safe to fold in). Most of the ceiling is the size rule's deliberate trade against up-jump arbitrage, and pricing that trade better needs jump foresight (worth 8.8 per the goal). A build seat should first measure how fast the base enters low-price mode: the retail edge it earns between 5 and 15 cents and in the steps right after p crosses 5 cents, against a perfect-p entry. Best runs are decided by how long p sits below 5 cents and how much retail flow arrives there, not by fills missed while it is there."
}