{
 "what_if": "Cash and collateral never bind (start with 1,000,000 in cash)",
 "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": 2.022563212233975,
  "standard_error": 0.22571927384829718,
  "simulations": 4000,
  "seed_start": 50000,
  "retail": 1.347462757816975,
  "arb": 0.675100454419975
 },
 "by_spread": [
  {
   "spread": 1,
   "runs": 1016,
   "diff": 3.101001309556988,
   "standard_error": 0.6685558885373565
  },
  {
   "spread": 2,
   "runs": 998,
   "diff": 1.821206074168537,
   "standard_error": 0.37935795336104466
  },
  {
   "spread": 3,
   "runs": 1017,
   "diff": 1.846252291432252,
   "standard_error": 0.346600360479387
  },
  {
   "spread": 4,
   "runs": 969,
   "diff": 1.2842448668928794,
   "standard_error": 0.30093888093689947
  }
 ],
 "how": "One value changed: ChallengeConfig.starting_cash from 1000.0 to 1000000.0, base code untouched, simulator commit b244530. Bulk runs used a scratch copy of the simulator whose only other edit is a heap index for best-order lookup in market.py (speed, no rule change). That copy matched the stock simulator run by run on all 600 seeds 1000-1599, its 4000-seed base mean equals the seats' 98.28063388702982 to the last digit, and the what-if matched a stock copy with only the config line edited on 40 of 40 seeds 50000-50039. The other 3960 what-if runs were not repeated on the stock engine. Rule attribution variants are separate text edits of the base and are not part of diff.",
 "clean": "Clean as a what-if for the unchanged base: 0 failures, edge pays nothing on idle cash, order book, arbitrageur, retail and competitor are untouched, and 3321 of 4000 runs are bit-identical. The only other thing the cash does is scale the base's wealth-based rules (the capw bank cap, the fu budget), which is the what-if itself. One limit: it is not a full removal of the cash problem. The base's own ban on uncovered asks below 10 cents outside the last 500 steps (xu) is a fixed rule that ignores cash, so it still binds at 1,000,000. Lifting it too added 0.7155319327702502 (se 0.43777356452443805) over the what-if on seeds 50000-50399 only, a strategy change, so it is reported in tried and kept out of diff. The split of diff by rule is approximate: the asks-only variant lets uncovered shares drain the virtual cash the bids see, which starves bids, so its retail/arb mix differs from the real what-if; its control with neither side relieved came to -0.0020191529609750072, not exactly 0.",
 "realizable": "Very little. The gain is real but is bought with cash a real run does not have. Nearly all of it sits at true probability below 1 cent: in the 240 runs with the largest change (1.97 of the 2.02), that bucket gives +1.10 on retail buys hitting asks and +0.69 from less premium cover bought from the arbitrageur at tick 1. Those 240 runs end holding 3768 NO under the what-if against 992 really, so about 2777 more uncovered shares at about 98 cents collateral each, roughly 2700 dollars more collateral than the whole 1000 start, for about 33 of edge per run: about 1.2 cents per dollar. By that arithmetic the 205 of cash those runs have left at the end could buy about 2.5 per run, or about 0.15 on the mean (an estimate, not a measurement). A real strategy can only spend spare cash sooner: the mechanism tried is to open low uncovered asks earlier (Hu 500 to 800 steps, xu 0.10 to 0.05). Its cost is more arbitrage loss on those asks and NO that locks cash until settlement, because the simulator has no way to merge YES with NO. It failed: +0.2447 (se 0.0913) on tuning seeds became -0.1243 (se 0.1524) on unseen seeds, so nothing here is captured yet.",
 "attempt": {
  "mechanism": "Hu 500 to 800 and xu 0.10 to 0.05, nothing else; chosen on seeds 4000-4799 only.",
  "tuning": {
   "seed_start": 4000,
   "simulations": 800,
   "mean": 0.24473691398012515,
   "standard_error": 0.09130586446173367
  },
  "diff": {
   "mean": -0.12430093107790009,
   "standard_error": 0.15238069514380506,
   "simulations": 4000,
   "seed_start": 50000,
   "retail": 0.16879385569384991,
   "arb": -0.29309478677035
  },
  "by_spread": [
   {
    "spread": 1,
    "runs": 1016,
    "diff": -0.04823419877155495,
    "standard_error": 0.10474347122660471
   },
   {
    "spread": 2,
    "runs": 998,
    "diff": -0.27376021709809656,
    "standard_error": 0.4268453142297155
   },
   {
    "spread": 3,
    "runs": 1017,
    "diff": -0.16556542163903645,
    "standard_error": 0.36140882478860875
   },
   {
    "spread": 4,
    "runs": 969,
    "diff": -0.006816354890505774,
    "standard_error": 0.21613750383200947
   }
  ],
  "mean_edge": 98.15633295595192
 },
 "tried": [
  "Scorer check: seeds 1000-1599 gave 109.27254289017199 on the stock simulator; seeds 50000-53999 gave 98.28063388702982. Both match.",
  "1,000,000 cash on seeds 1000-1599: mean 110.9543, change +1.6818 se 0.5687; 498 of 600 runs identical.",
  "1,000,000 cash on seeds 50000-53999: 679 of 4000 runs change, 460 up and 219 down; ups sum to 2.2567871998779503 and downs to -0.23422398764397495 on the mean. Without the largest run 1.941819156428975; without the largest ten 1.5462648698762.",
  "The changed runs almost all end at NO: settlement outcome 1 in 5.6% of them, against p0 0.45 on average.",
  "Method for rule removals at real cash: run only the 679 changed seeds, since a rule that never bound cannot change a run in which cash never mattered; figures are the change summed and divided by 4000.",
  "Remove the 200 reserve at real cash: -0.2104778649453499 (it is worth keeping).",
  "Remove the 2.0 free-cash buffer at real cash: 0.0020720815094250242.",
  "Bid budget fraction fb 0.9 to 1.0 at real cash: 0.0025992300842999313.",
  "Uncovered budget fu 0.25 to 1.0 at real cash: 0.004305170182100065.",
  "Remove the wealth cap capw on the cover bank at real cash: 0.007076915916599997.",
  "So no single cash rule explains it: each removal is within 0.01 of zero except the reserve, which loses. The limit is the 1000 itself, not a rule.",
  "Split at 1,000,000 on the 679 seeds: relief for uncovered asks only (reserve, fu and Hu budgets see real cash; bids, bank, capw see cash less 999000) 2.006530027598025; relief for bids and bank only 0.010602914795324951; neither (control) -0.0020191529609750072.",
  "Engine collateral check: never tripped, 0 failures in all 4000 real runs, because the base clips every order first.",
  "1,000,000 cash plus xu 0: 0.7155319327702502 se 0.43777356452443805 over the what-if, 2.9002618590495 se 0.7716381932491239 over the real base, seeds 50000-50399 only. Lifting every cash rule as well gave the same figures on those seeds.",
  "Candidates below ran at real cash on the 257 of seeds 4000-4799 with outcome 0 and final cash under 850, figures are change divided by 800, so changes outside that subset are not counted:",
  "Endgame pacing ub = free*min(1,K/H): K=10 -0.0462211176976251, K=40 -0.0015856002657500246, K=120 -0.009904777437750045.",
  "Hu 800: 0.014724614293250136. xu 0.05: 0.016966366395500313. xu 0.20: -0.42836501802987487. xu 0.30: -0.6692986524564998.",
  "Premium cover only when free cash is under 300: -0.023861671054999815; under 100: -0.9725921228129998.",
  "Cover bank ydf and ydf1 0.9: -0.19676169135174923; 0.4: -2.1753612593116247.",
  "Endgame uncovered asks only at tick 2 and above: -0.0171586068615.",
  "Attempt (Hu 800 with xu 0.05) on all of seeds 4000-4799: 0.24473691398012515 se 0.09130586446173367. On seeds 50000-53999: -0.12430093107790009 se 0.15238069514380506.",
  "Not done: no parameter sweep beyond the above, no search over combined settings, and tuning used 800 of the allowed seeds 4000-7999 for time."
 ],
 "next": "Treat this as a ceiling at the bar but not a build direction. It reads 2.02 with se 0.23, so it barely meets the over-two line, and it needs about 3.7 times the starting cash to collect. Do not build more cash rules: every single rule is worth under 0.01 or negative, and the one attempt (Hu 800 with xu 0.05) lost its tuning gain, at -0.12430093107790009 on unseen seeds, so do not fold it in. The room left near zero is cover, not cash: a cover share costs about 1 cent of cash against 98 for an uncovered one, so what to measure first is the crossing cost of a bank sized to retail demand."
}