{"approach": "Spread 1 only: port the supplied demand file's censored compound-Poisson/lognormal likelihood over its 81 rate/mean hypotheses, using only surviving front asks, including zero-fill observations. Batch repeated likelihood bins and refresh posterior mean arrival rate and mean order size every 64 qualifying observations. Substitute these fitted parameters into the base's original lognormal quote-size formula; retain its spread-1 dmin=0.3/pfl=0.000001 rule, stock-target formulas, queue management, and spread-3 override. Bridge cover still uses the resulting ask size qa, as in the base. Use lazy spread-1 initialization and arithmetic-preserving inverse/filter optimizations to offset inference overhead. Keep the base quote parameters until the first 64-observation posterior refresh. Skip empty demand snapshots and compute jump-loss sums in a direct loop with the original arithmetic and summation order. Local measurements with simulator b244530ee2a6247b5f930830eeca9dd950da0e7e and default 2000-step configurations, no sandbox or external dependencies. The requested CLI scorer used 4000 simulations, seeds 4000-7999, workers=4. Tuning used spread-1 seeds in 8000-11999 (1027 runs), with independent validation in 12000-15999 (1009 runs). Code was frozen before candidate unseen evaluation; final SHA256 is b245e3b239660c29163a1719ac0a0ff70cad9e64715d1b44a1ed6c5510a260e2. Final scores and paired sample-standard-error differences use all 1969 spread-1 seeds in 60000-67999; signed arb improvement means less arbitrage loss. All 900 other-spread checks compare every SimulationResult field on the first 300 seeds of each spread 2/3/4 from 60000. Timing alternates strategy order on the same first 200 spread-1 tuning seeds from 8000 in one process; sums engine-construction/run wall time, excluding config sampling and module loading. These are local results; no Paradigm submission was made.", "blocked": null, "spread": 1, "base_mean_edge": 98.4694596619638, "base_unseen": {"mean_edge": 41.78494849744236, "retail_edge": 65.91107840022042, "arb_edge": -24.1261299027871}, "holdout": {"mean_edge": 42.13927493937537, "retail_edge": 65.49364969198369, "arb_edge": -23.354374752610664, "failures": 0}, "diff": {"mean": 0.35432644193301144, "standard_error": 0.14755293664508148, "retail": -0.41742870823671907, "arb": 0.7717551501764348}, "others_identical": {"runs": 900, "identical": true}, "seconds": {"base": 437.97944509633817, "yours": 430.7078699860722}, "code": "\"\"\"Spread-1 demand inference; preserve the supplied base at every other spread.\"\"\"\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_base(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 inv_fast(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 = math.exp(-0.5 * x * x) / SQ2PI\n        if d < 1e-12:\n            break\n        x -= (0.5 * (1.0 + math.erf(x / SQ2)) - p) / d\n    return x\n\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\n# Conditional compound-Poisson likelihood for front-ask retail demand.\n# Bins contain total BUY notional in one step, including multiple arrivals.\n# A surviving front ask excludes arbitrage. Conditioning on V < quoted\n# capacity, INCLUDING zero-fill steps, removes partial-fill selection bias.\n# CDF table generated offline by FFT convolution of LogNormal(-.72,1.2).\n# Quantities and numerical convolution are discretized, not exact inference.\nDEMAND_RATE = [0.0825, 0.0935, 0.1045, 0.11549999999999999, 0.1265, 0.1375, 0.1485, 0.15949999999999998, 0.17049999999999998]\nDEMAND_MEAN = [2.8453333333333335, 3.2560000000000002, 3.666666666666667, 4.077333333333334, 4.488, 4.898666666666667, 5.309333333333333, 5.720000000000001, 6.1306666666666665]\nDEMAND_BINS = [0.05, 0.1, 0.2, 0.4, 0.8, 1.6, 3.2, 6.4, 12.8, 25.6, 51.2, 102.4, 204.8]\nDEMAND_CDF = [[0.92105888795, 0.92196113275, 0.924969202738, 0.932357807565, 0.945624667991, 0.963044967501, 0.979774193119, 0.991444400227, 0.997284251979, 0.999362623017, 0.999889869489, 0.999986021068, 0.999998701659], [0.920990592034, 0.921680317133, 0.924116873963, 0.930474227014, 0.942608055188, 0.959538272415, 0.976821491766, 0.989663227695, 0.996524794859, 0.999134577171, 0.999841266784, 0.999978600843, 0.999997887215], [0.920945012846, 0.921485151702, 0.92348952474, 0.929003887314, 0.940110233753, 0.956459487114, 0.974070049074, 0.987897259483, 0.99572208432, 0.998877738246, 0.999783052142, 0.999969162137, 0.99999678734], [0.920913751033, 0.921344787913, 0.923015908505, 0.927834183187, 0.938016424137, 0.953740992626, 0.971509510561, 0.986161548487, 0.994887167467, 0.998595033334, 0.999715353125, 0.999957581514, 0.999995364165], [0.920892286499, 0.921241004804, 0.922650360076, 0.926888826178, 0.936242509662, 0.951327643403, 0.969126878904, 0.984465721977, 0.99402899512, 0.998289236206, 0.999638392601, 0.999943764683, 0.999993582937], [0.920875459017, 0.921163058236, 0.922363381432, 0.926114128789, 0.934725532927, 0.949174359247, 0.966908468941, 0.982815715266, 0.993154809394, 0.99796292452, 0.999552457759, 0.999927641925, 0.999991411996], [0.920863935648, 0.92110328027, 0.92213405742, 0.925471903383, 0.933417637455, 0.947244128395, 0.964840878478, 0.981214974808, 0.992270479813, 0.997618465854, 0.999457877851, 0.999909164149, 0.999988822676], [0.920854888191, 0.921055988959, 0.921949132384, 0.924933659885, 0.932281742864, 0.945506399904, 0.962911468045, 0.979665200306, 0.991380757461, 0.997258018363, 0.999355008083, 0.999888299565, 0.999985789148], [0.920847052834, 0.921018315954, 0.921797428174, 0.924478933961, 0.931288674603, 0.943935630405, 0.961108570736, 0.978166924312, 0.990489488325, 0.996883539619, 0.999244217885, 0.999865030849, 0.999982288256], [0.911015393227, 0.91202676244, 0.915398852192, 0.923683802715, 0.938573205914, 0.958164698941, 0.977045025765, 0.990270372821, 0.99690960856, 0.999275188478, 0.999874909321, 0.999984137561, 0.999998527586], [0.910938837773, 0.911711980722, 0.914443340761, 0.92157134034, 0.935185781023, 0.954216200139, 0.9737067051, 0.988248324346, 0.996045399111, 0.999015661953, 0.999819663444, 0.999975713709, 0.999997603736], [0.910887746387, 0.911493210227, 0.913740065925, 0.919922528256, 0.932381833873, 0.950751675304, 0.970598418574, 0.986244861081, 0.995132202668, 0.99872333238, 0.999753475247, 0.999964996232, 0.99999635597], [0.91085270389, 0.911335870128, 0.913209140571, 0.91861095414, 0.930031998285, 0.947694131152, 0.96770782133, 0.984276965071, 0.994182646727, 0.998401542246, 0.999676486805, 0.99995184415, 0.999994741251], [0.910828643526, 0.911219535232, 0.91279936534, 0.917551004111, 0.928041559719, 0.94498092456, 0.965019717212, 0.982355432861, 0.993206954014, 0.998053461537, 0.999588949514, 0.999936149582, 0.999992720063], [0.910809781001, 0.911132161761, 0.912477669161, 0.916682440875, 0.926339682127, 0.942560940358, 0.962518245592, 0.980486863234, 0.992213386966, 0.997682037669, 0.999491188774, 0.999917832576, 0.999990256392], [0.910796864047, 0.91106515429, 0.912220604318, 0.915962426656, 0.924872550884, 0.940392273583, 0.960187955834, 0.978675033418, 0.9912086336, 0.997289978664, 0.999383578573, 0.999896836658, 0.999987317608], [0.910786722433, 0.911012143639, 0.912013310526, 0.915359005735, 0.923598489015, 0.938440375567, 0.958014329781, 0.97692174727, 0.990198099766, 0.996879753344, 0.999266523042, 0.999873125058, 0.9999838743], [0.910777939504, 0.910969914546, 0.911843256686, 0.914849227461, 0.922484718874, 0.936676391159, 0.955984002912, 0.975227495313, 0.989186154422, 0.996453601066, 0.999140443007, 0.999846677505, 0.99997990008], [0.901081414622, 0.902199415354, 0.905927255918, 0.915088709511, 0.931567794602, 0.953296025539, 0.974308790694, 0.989088636586, 0.996531994403, 0.999187169072, 0.999859883387, 0.999982249395, 0.999998353287], [0.900996788476, 0.901851442981, 0.904870896674, 0.912752344413, 0.927816630714, 0.948911636334, 0.970586818571, 0.986824984063, 0.995562217264, 0.998895905894, 0.999797955478, 0.999972818528, 0.999997319839], [0.900940310933, 0.901609606607, 0.904093419216, 0.910928987821, 0.924712608966, 0.945067029715, 0.967124082228, 0.984583618901, 0.994537732949, 0.998567789553, 0.999723743198, 0.999960817458, 0.999995923888], [0.900901574204, 0.9014356781, 0.903506487786, 0.90947869185, 0.922111943958, 0.941675765478, 0.963906106167, 0.982383430016, 0.993472774438, 0.998206584149, 0.999637402547, 0.9999460874, 0.999994117201], [0.900874977369, 0.901307078282, 0.903053492688, 0.908306707177, 0.91990946569, 0.938667676578, 0.960915389766, 0.980236353468, 0.992378854321, 0.997815862377, 0.999539213179, 0.999928506641, 0.99999185547], [0.900854126337, 0.901210493391, 0.902697870177, 0.907346383142, 0.918026577442, 0.935985612129, 0.958133818397, 0.978149619512, 0.991265267558, 0.997398947779, 0.999429538708, 0.999907984771, 0.999989098292], [0.900839847669, 0.901136421686, 0.902413697149, 0.90655033071, 0.916403602673, 0.933582786883, 0.955543835134, 0.976127304679, 0.990139528354, 0.996958894844, 0.999308798077, 0.999884457729, 0.999985809043], [0.900828636919, 0.901077822453, 0.902184545019, 0.905883203054, 0.914994346605, 0.931420674118, 0.95312900087, 0.97417128754, 0.989007701572, 0.996498488588, 0.999177444748, 0.999857883589, 0.999981954693], [0.900818928088, 0.901031141439, 0.901996560421, 0.905319617381, 0.913762493352, 0.929467130002, 0.950874222813, 0.972281989775, 0.987874680808, 0.996020255134, 0.999035951481, 0.999828238979, 0.999977505591], [0.891255757962, 0.892477938773, 0.896553397947, 0.906571831841, 0.924608220065, 0.948439102628, 0.97156565953, 0.987899230706, 0.996151403653, 0.999098562208, 0.999844791432, 0.99998035656, 0.999998178761], [0.891163246829, 0.892097538306, 0.895398487266, 0.904016464283, 0.920500293587, 0.943624690215, 0.967462023842, 0.985393267467, 0.995075245531, 0.998775305423, 0.999776142454, 0.999969915277, 0.999997035521], [0.89110150707, 0.891833166273, 0.894548501709, 0.902022428121, 0.917102162082, 0.939405606846, 0.963647242268, 0.982913615703, 0.993938675182, 0.998411105239, 0.999693855328, 0.999956625776, 0.999995491092], [0.891059161123, 0.891643030807, 0.893906845678, 0.900436507561, 0.914255787845, 0.935685896328, 0.960104569481, 0.980481047699, 0.992757556081, 0.99801015369, 0.99959809939, 0.999940311204, 0.999993492013], [0.891030086188, 0.891502448161, 0.893411620959, 0.899155005029, 0.911845686879, 0.932387843667, 0.956814096025, 0.978108608422, 0.991544708476, 0.997576432764, 0.999489182284, 0.999920835766, 0.999990989154], [0.891007292413, 0.891396863746, 0.893022850195, 0.89810499087, 0.909785618713, 0.929448262997, 0.953755375997, 0.975804127023, 0.990310471826, 0.997113648576, 0.999367505846, 0.999898098372, 0.999987937691], [0.890991683367, 0.891315890329, 0.892712191124, 0.897234622142, 0.908010140111, 0.926815502609, 0.95090868949, 0.973571947532, 0.989063193972, 0.996625208155, 0.99923353421, 0.99987202717, 0.999984296973], [0.890979428087, 0.891251831094, 0.892461682597, 0.896505234275, 0.90646861638, 0.924447077939, 0.948255635164, 0.971413993627, 0.987809602799, 0.996114218284, 0.999087770576, 0.999842574898, 0.999980030318], [0.890968814662, 0.891200800596, 0.89225617915, 0.895889065656, 0.905121257434, 0.922307579854, 0.945779362161, 0.969330591281, 0.986555117979, 0.99558349686, 0.998930740192, 0.999809714928, 0.999975104775], [0.881537242096, 0.882861192393, 0.887276272726, 0.898132479461, 0.917694267994, 0.943594082249, 0.968815802614, 0.986702194611, 0.995767830544, 0.999009365295, 0.999829633201, 0.999978459043, 0.999998004007], [0.881437028584, 0.882449113693, 0.886025069079, 0.89536293197, 0.913236459787, 0.938355467807, 0.964332510753, 0.983953235334, 0.994584480265, 0.998653856968, 0.999754223941, 0.999967003937, 0.999996750782], [0.881370148485, 0.882162727389, 0.885104241895, 0.893202019128, 0.909550098159, 0.933767460298, 0.960168098636, 0.981234934238, 0.993335029571, 0.99825327492, 0.99966381097, 0.999952421149, 0.99999505758], [0.881324276914, 0.881956760056, 0.884409121484, 0.891483521104, 0.906463059504, 0.92972452195, 0.956303413006, 0.978569922279, 0.992036997367, 0.997812245536, 0.999558576371, 0.9999345155, 0.999992865684], [0.881292781279, 0.881804471972, 0.883872640944, 0.890094976505, 0.903849686343, 0.926141368064, 0.952716032491, 0.975972321873, 0.990704529173, 0.99733516677, 0.999438855515, 0.999913136864, 0.99999012111], [0.881268089758, 0.881690096398, 0.88345148707, 0.888957309016, 0.90161621033, 0.922948779972, 0.949383103889, 0.973450527947, 0.989349020694, 0.996826133831, 0.999305088475, 0.999888173242, 0.999986774583], [0.881251181151, 0.881602381081, 0.883114953749, 0.888014317635, 0.899691515761, 0.92009025422, 0.946282688752, 0.971009119894, 0.987979660618, 0.996288912423, 0.999157784814, 0.999859544788, 0.99998278139], [0.881237905535, 0.88153298828, 0.882843582411, 0.88722409227, 0.898020605, 0.917519369134, 0.943394383223, 0.968650036737, 0.986603843611, 0.995726936711, 0.998997497898, 0.999827198723, 0.999978101161], [0.88122640847, 0.881477709026, 0.882620965169, 0.886556544958, 0.896560277004, 0.915197473935, 0.940699549414, 0.966373481837, 0.985227516633, 0.995143321396, 0.998824806026, 0.999791105011, 0.999972697614], [0.871924698753, 0.873348048187, 0.878094885015, 0.889769967952, 0.910825723789, 0.938761113188, 0.966059389, 0.985497567972, 0.995381269397, 0.998919575735, 0.999814408437, 0.999976556834, 0.999997829025], [0.871816962417, 0.872905028606, 0.876749609515, 0.886790986402, 0.906024820292, 0.933104071993, 0.961198467328, 0.982504948584, 0.994089917952, 0.998531556959, 0.999732199504, 0.999964084484, 0.999996465623], [0.871745061817, 0.872597140714, 0.875759579532, 0.884466938598, 0.902056024025, 0.928152640826, 0.956686848999, 0.979547657241, 0.992726796504, 0.998094294081, 0.999633609453, 0.999948203539, 0.999994623352], [0.87169574682, 0.872375710342, 0.87501223402, 0.882618860809, 0.898733291352, 0.923791638162, 0.952502835833, 0.976650157688, 0.991311104231, 0.997612854369, 0.999518832523, 0.999928700225, 0.999992238213], [0.871661886924, 0.872211989578, 0.874435455254, 0.881125709529, 0.895920930878, 0.919928190071, 0.948621392742, 0.973827617497, 0.989858329356, 0.997092058497, 0.999388231555, 0.999905409838, 0.999989251337], [0.871635341905, 0.872089027728, 0.87398267067, 0.879902392113, 0.893517761212, 0.916487048674, 0.945017184454, 0.971088963718, 0.988380935355, 0.996536397367, 0.999242284875, 0.999878209241, 0.999985608964], [0.871617164037, 0.871994727652, 0.873620864696, 0.878888443863, 0.891447087415, 0.913406874352, 0.94166599955, 0.96843897866, 0.986888958717, 0.995950001547, 0.99908154773, 0.999847010388, 0.999981262286], [0.871602891875, 0.871920125611, 0.873329115902, 0.878038780246, 0.88964962499, 0.910637329561, 0.938545392352, 0.965879586774, 0.985390464414, 0.99533663824, 0.998906624085, 0.999811754803, 0.999976167212], [0.871590531773, 0.871860696643, 0.873089783159, 0.877321038588, 0.888078824382, 0.908136545779, 0.935634909809, 0.963410841873, 0.983891927668, 0.994699724008, 0.998718145867, 0.999772408883, 0.999970284092], [0.8624169724, 0.863937390277, 0.869008249778, 0.881483618668, 0.904002372588, 0.93394034102, 0.963296586465, 0.984285390699, 0.994991714626, 0.998829190931, 0.999799116882, 0.999974649922, 0.999997653816], [0.862301889791, 0.863464154837, 0.867571086725, 0.878299873356, 0.898865066929, 0.927870602558, 0.958060079789, 0.981048468276, 0.993591555222, 0.998408401823, 0.999710068708, 0.999961156897, 0.999996180042], [0.862225086521, 0.863135269465, 0.866513465537, 0.875816372004, 0.8946195484, 0.922561196377, 0.953203688763, 0.977851867426, 0.992113976556, 0.997934158218, 0.999603250104, 0.999943972908, 0.999994188406], [0.862172408921, 0.862898738711, 0.865715113563, 0.87384166343, 0.891066018656, 0.917887238395, 0.948703034425, 0.974721857621, 0.990579882833, 0.997411974886, 0.999478866877, 0.999922865318, 0.999991609598], [0.862136240257, 0.86272385346, 0.865098978201, 0.872246301028, 0.888058890995, 0.913748248102, 0.944530367456, 0.971674618492, 0.989006122225, 0.996847102076, 0.99933730908, 0.999897654595, 0.999988379831], [0.862107885246, 0.862592506788, 0.864615302748, 0.870939304182, 0.885489684771, 0.910062953373, 0.940657796989, 0.968719575024, 0.987406237264, 0.996244433051, 0.999179093323, 0.999868206233, 0.999984440828], [0.86208846791, 0.862491776464, 0.86422881567, 0.869856037386, 0.883276218061, 0.906765194853, 0.937058785332, 0.965861679699, 0.985791118956, 0.995608469492, 0.999004820794, 0.999834423777, 0.999979739653], [0.862073222594, 0.862412087425, 0.863917166664, 0.868948311637, 0.881354994696, 0.903800740852, 0.933708806646, 0.963102812338, 0.984169505847, 0.994943317331, 0.998815146505, 0.999796242874, 0.999974228459], [0.862060019713, 0.862348606131, 0.863661510057, 0.868181540363, 0.879676178266, 0.901124529261, 0.930585565403, 0.960442850252, 0.982548402175, 0.99425270008, 0.998610756596, 0.999753626198, 0.999967864194], [0.853012920103, 0.8546281148, 0.860015392079, 0.873272758699, 0.897223999292, 0.929131908149, 0.960527561505, 0.983065702936, 0.994599160733, 0.998738208281, 0.999783758278, 0.999972738295, 0.999997478378], [0.852890664809, 0.854125376379, 0.8584884895, 0.869888845399, 0.891756892388, 0.922655156231, 0.954917532562, 0.979583855603, 0.993089388837, 0.998284387991, 0.999687831118, 0.999958221154, 0.999995894039], [0.852809074725, 0.853775989183, 0.857364861859, 0.867249512461, 0.887240281902, 0.916993172144, 0.949718811092, 0.976147647478, 0.991496570487, 0.997772862833, 0.999572732251, 0.999939729216, 0.999993752742], [0.852753113987, 0.853524714623, 0.856516701731, 0.865151074059, 0.883460779525, 0.91201131374, 0.944904202643, 0.972785125538, 0.989843339557, 0.997209601805, 0.999438678463, 0.999917010716, 0.999990979836], [0.852714691119, 0.85333892858, 0.855862135668, 0.863455856842, 0.880263040906, 0.907601478717, 0.940443144439, 0.969513447569, 0.988147921229, 0.996600291671, 0.999286086768, 0.999889871038, 0.999987506588], [0.852684568891, 0.853199395161, 0.855348296815, 0.862067118628, 0.87753139889, 0.903676377023, 0.936305117745, 0.966342501804, 0.986424948141, 0.995950234801, 0.999115512092, 0.999858164076, 0.999983270169], [0.85266394138, 0.853092386508, 0.854937710281, 0.860916144551, 0.875178275843, 0.90016504681, 0.932461206399, 0.963277377855, 0.984686172274, 0.995264310293, 0.99892760184, 0.999821784759, 0.999978213482], [0.85264774591, 0.853007730665, 0.854606630317, 0.859951710001, 0.873136038234, 0.897009384443, 0.928884767028, 0.960319880736, 0.982941008781, 0.99454696854, 0.99872306252, 0.999780662672, 0.99997228489], [0.852633720168, 0.852940292796, 0.854335034922, 0.859137054511, 0.871351623679, 0.894161158616, 0.925551635118, 0.957469684274, 0.981196991434, 0.993802245109, 0.998502635096, 0.999734756609, 0.999965437903], [0.843711411394, 0.845419129782, 0.851115346983, 0.86513672082, 0.89049038859, 0.924335953846, 0.957752479339, 0.981838545053, 0.99420360231, 0.99864662518, 0.999768332365, 0.999970821942, 0.999997302711], [0.843582154083, 0.844887589288, 0.849500817159, 0.861557161829, 0.884699990237, 0.917457826732, 0.951771008281, 0.978111171887, 0.992583415701, 0.998159511892, 0.999665486294, 0.999955277233, 0.999995607612], [0.843495891092, 0.844518187601, 0.848312741368, 0.858765560661, 0.879917837048, 0.911448610603, 0.946232406922, 0.974435080048, 0.990874579238, 0.997610403433, 0.999542055216, 0.999935472427, 0.999993316357], [0.843436725345, 0.844252519821, 0.847415951356, 0.856546246048, 0.875917114905, 0.906163852985, 0.941106531766, 0.970840064652, 0.989101481009, 0.997005729859, 0.999398266306, 0.999911136357, 0.999990348925], [0.843396101918, 0.844056092249, 0.846723864987, 0.854753491639, 0.8725328585, 0.901487816668, 0.936359908659, 0.967344226952, 0.987283740064, 0.996351621478, 0.99923456329, 0.999882059072, 0.999986631604], [0.84336425453, 0.843908566828, 0.846180578011, 0.853284918156, 0.869642325888, 0.897327201302, 0.931959319957, 0.96395788324, 0.985437089961, 0.995653796585, 0.999051539455, 0.999848082632, 0.999982096983], [0.843342445645, 0.843795429212, 0.845746463916, 0.852067821394, 0.867152634025, 0.893606260585, 0.927873419944, 0.960686226948, 0.983574149863, 0.994917518053, 0.998849888695, 0.99980909314, 0.999976683767], [0.843325322633, 0.843705924736, 0.845396414373, 0.851048008916, 0.864992085454, 0.890263041598, 0.924073411289, 0.957530957974, 0.981705014312, 0.99414758651, 0.998630369493, 0.999765013933, 0.999970336494], [0.843310493614, 0.843634624433, 0.845109258803, 0.85018659556, 0.863104451923, 0.887246168453, 0.920533234786, 0.954491519679, 0.979837746907, 0.993348354707, 0.998393778244, 0.999715799769, 0.999963005203]]\nDEMAND_LOG = []\nfor row in DEMAND_CDF:\n    masses = [row[0]] + [max(1e-14, row[i]-row[i-1]) for i in range(1,len(row))]\n    DEMAND_LOG.append([[math.log(max(1e-14, mass)/max(row[k],1e-14))\n                        for mass in masses[:k+1]] for k in range(len(row))])\nDEMAND_FLOW = [r*m for r in DEMAND_RATE for m in DEMAND_MEAN]\nD = {'mult': 1.25, 'horizon': 2000.0, 'mode': 1, 'shrink': 1.0, 'extra': 0.0, 'floor': 0.0}\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        self.flow_notional = 0.0\n        self.flow_exposure = 0\n        self.last_ask_tick = None\n        self.last_quote_exposed = False\n        self.last_flow_ca = None\n        self.last_flow_cap = 0.0\n        self.last_flow_correction = 1.0\n        self.params = P.copy()\n\n    def _oid(self, tag):\n        self.n += 1\n        return tag + str(self.n)\n\n    def _demand_predict(self, cs, k, uni):\n        exp = math.exp\n        bc, bw = self.bc, self.bw\n        # An unchanged eighth-tick grid has repeated, exactly equal distances.\n        # Reuse their Gaussian factors without changing summation order.\n        if cs == bc and len(cs) > 2 and cs[1] - cs[0] == 0.125:\n            kernel = []\n            for ci in bc:\n                d = cs[0] - ci\n                d2 = d * d * k\n                kernel.append(exp(d2) if d2 > -12.5 else None)\n            ws = []\n            for i in range(len(cs)):\n                t = uni\n                if len(cs) <= 8:\n                    for j, wi in enumerate(bw):\n                        e = kernel[abs(i - j)]\n                        if e is not None:\n                            t += wi * e\n                else:\n                    factors = kernel[i::-1] + kernel[1:len(cs)-i]\n                    for wi, e in zip(bw, factors):\n                        if e is not None:\n                            t += wi * e\n                ws.append(t)\n            return ws\n        ws = []\n        for c in cs:\n            t = uni\n            for ci, wi in zip(bc, bw):\n                d = c - ci\n                d2 = d * d * k\n                if d2 > -12.5:\n                    t += wi * exp(d2)\n            ws.append(t)\n        return ws\n\n    def _demand_update(self, state):\n        if self.dprev is None:\n            return\n        tick, prev, cutoff = self.dprev\n        now = {o.order_id:o.remaining_quantity for o in state.own_orders}\n        # One surviving order proves the arbitrageur did not sweep this tick.\n        if not any(oid in now for oid in prev):\n            return\n        spent = sum(q-now.get(oid,0.0) for oid,q in prev.items())*tick/100.0\n        k = 0\n        while k < len(DEMAND_BINS) and spent >= DEMAND_BINS[k]:\n            k += 1\n        if k > cutoff:\n            return\n        key = (cutoff, k)\n        self.dhist[key] = self.dhist.get(key, 0) + 1\n        self.dcount += 1\n        if self.dcount % 64 == 0:\n            for (cutoff, k), count in self.dhist.items():\n                for j, table in enumerate(DEMAND_LOG):\n                    self.dpost[j] += count * table[cutoff][k]\n            self.dhist.clear()\n            mx = max(self.dpost)\n            weights = [math.exp(v-mx) for v in self.dpost]\n            z = sum(weights)\n            self.dflow = sum(w*f for w,f in zip(weights,DEMAND_FLOW))/z\n            self.drate = sum(w*DEMAND_RATE[j//len(DEMAND_MEAN)] for j,w in enumerate(weights))/z\n            self.dmean = self.dflow/self.drate\n\n    def _demand_snapshot(self, state, actions):\n        remaining = {o.order_id:(o.price_ticks,o.remaining_quantity) for o in state.own_orders\n                     if o.side is Side.SELL and o.order_id in self.ahead}\n        for a in actions:\n            if isinstance(a, CancelOrder):\n                remaining.pop(a.order_id,None)\n            elif isinstance(a, PlaceOrder) and a.side is Side.SELL and a.client_order_id in self.ahead:\n                remaining[a.client_order_id] = (a.price_ticks,a.quantity)\n        self.dprev = None\n        if remaining:\n            tick = min(v[0] for v in remaining.values())\n            front = {oid:q for oid,(t,q) in remaining.items() if t==tick}\n            cap = sum(front.values())*tick/100.0\n            k = -1\n            for i,b in enumerate(DEMAND_BINS):\n                if b < cap-.01*tick/100.0:\n                    k = i\n            if k >= 0:\n                self.dprev = (tick,front,k)\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            if self.s == 1:\n                self.params.update({'dmin': 0.3, 'pfl': 1e-06})\n                self.dpost = [0.0]*len(DEMAND_FLOW)\n                self.dprev = None\n                self.dbprev = None\n                self.dcount = 0\n                self.dhist = {}\n                self.dflow = sum(DEMAND_FLOW)/len(DEMAND_FLOW)\n                self.drate = sum(DEMAND_RATE)/len(DEMAND_RATE)\n                self.dmean = sum(DEMAND_MEAN)/len(DEMAND_MEAN)\n\n            if self.s == 3:\n                self.params.update({'flow_prior': 200, 'flow_level': 0.6, 'flow_strength': 1.0, 'flow_safety': 2.0, 'flow_exposure_min': 5.0})\n        if self.s == 1:\n            self._demand_update(state)\n        inv = inv_fast if self.s == 1 else inv_base\n        P = self.params\n        if self.s == 3 and self.last_quote_exposed and ca <= self.last_flow_ca + 1:\n            self.flow_exposure += 1\n            self.flow_notional += min(self.last_flow_cap, state.sell_filled_quantity * self.last_ask_tick / 100.0) * self.last_flow_correction\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            uni = P['uni'] * sg\n            if self.s == 1:\n                ws = self._demand_predict(cs, k, uni)\n            else:\n                ws = []\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        if self.s == 1:\n            def AB(x):\n                k = (x - phat) / s\n                a = s * lpm(k)\n                b = a - (x - phat)\n                ja = jb = 0.0\n                for p, w in jp:\n                    d = x - p\n                    ja += w * (d if d > 0.0 else 0.0)\n                    d = p - x\n                    jb += w * (d if d > 0.0 else 0.0)\n                return (1 - lj) * a + lj * ja, (1 - lj) * b + lj * jb\n        else:\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        if self.s == 1 and self.dcount >= 64:\n            rho = self.drate\n        mu = math.log(self.dmean if self.s == 1 and self.dcount >= 64 else 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        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            stock_rate = P['ydf1']\n            if self.s == 3:\n                flow = (self.flow_notional + P['flow_prior'] * P['flow_level']) / (P['flow_prior'] + self.flow_exposure)\n                scale = max(0.5, min(2.0, flow / P['flow_level']))\n                stock_rate *= 1.0 + P['flow_strength'] * (scale - 1.0)\n            q1 = max(0.0, stock_rate * min(H, P['Wf']) / (self.s / 100.0) - Y)\n\n        # Bridge expected retail demand until another tick crossing is available.\n        if 0.02 < phat < 0.1:\n            ct = max(2, min(99, int(math.floor(ptick))))\n            wealth = state.cash + Y * phat\n            goal = min(1 * qa, 0.3 * max(wealth, 0.0) / phat)\n            if Y < goal and ct < ask_t:\n                amt, qam = ct, min(3000.0, goal - 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        if self.s == 3:\n            self.last_ask_tick = ask_t\n            self.last_flow_ca = ca\n            exposed_qty = ka + sum(o.quantity for o in out if o.side is Side.SELL and o.price_ticks == ask_t and o.quantity > PROBE)\n            self.last_flow_cap = exposed_qty * ask_t / 100.0\n            self.last_quote_exposed = ask_t / 100.0 > phat + max(0.005, P['flow_safety'] * self.st / 100.0) and self.last_flow_cap >= P['flow_exposure_min']\n            if self.last_quote_exposed:\n                logcap = math.log(self.last_flow_cap)\n                mu_flow = math.log(P['m']) - 0.5 * P['sig_n'] ** 2\n                clipped = P['m'] * cdf((logcap - mu_flow - P['sig_n'] ** 2) / P['sig_n']) + self.last_flow_cap * (1.0 - cdf((logcap - mu_flow) / P['sig_n']))\n                self.last_flow_correction = min(3.0, P['m'] / max(clipped, 0.01))\n        if self.s == 1:\n            self.dprev = None\n            if 1 <= ask_t <= 99 and (ka > 0.0 or add_a >= 0.01):\n                front = {o.order_id:o.remaining_quantity for o in asks\n                         if o.order_id in kept_ids and o.order_id in self.ahead}\n                for action in out:\n                    if action.side is Side.SELL and action.client_order_id in self.ahead:\n                        front[action.client_order_id] = action.quantity\n                if front:\n                    cap = sum(front.values()) * ask_t / 100.0\n                    cutoff = -1\n                    for i, bound in enumerate(DEMAND_BINS):\n                        if bound < cap - .01 * ask_t / 100.0:\n                            cutoff = i\n                        else:\n                            break\n                    if cutoff >= 0:\n                        self.dprev = (ask_t, front, cutoff)\n        return actions + out\n", "code_sha256": "b245e3b239660c29163a1719ac0a0ff70cad9e64715d1b44a1ed6c5510a260e2", "tried": ["Full source demand port with existing spread-1 rule; tuning n=1027; paired {\"mean\":-0.4942355893765337,\"standard_error\":1.0967569331020135,\"retail\":-1.2693208944638752,\"arb\":0.7750853050738069}; failures=0", "Full source port without base spread-1 rule; tuning n=240; paired {\"mean\":-3.0400325661104173,\"standard_error\":3.5807854946623445,\"retail\":-2.1954562466749996,\"arb\":-0.8445763194333337}; failures=0", "81-state quote sizes, source bid+ask observations, stock unchanged; tuning n=240; paired {\"mean\":-0.3056277718979167,\"standard_error\":0.716141468259326,\"retail\":-1.498367665418333,\"arb\":1.1927398935116666}; failures=0", "9-state quote sizes, bid+ask observations, stock unchanged; tuning n=1027; paired {\"mean\":-0.013305267735540496,\"standard_error\":0.38517154752290245,\"retail\":-0.7999406413752675,\"arb\":0.7866353736085685}; failures=0", "9-state quote sizes without base spread-1 rule; tuning n=240; paired {\"mean\":-0.019009884684584012,\"standard_error\":0.8122783315027555,\"retail\":-0.6503178943745839,\"arb\":0.6313080096724993}; failures=0", "9-state source stock rules, base ordinary quote sizes; tuning n=240; paired {\"mean\":-2.2969816440599997,\"standard_error\":2.9040404345834956,\"retail\":-1.6455738261195836,\"arb\":-0.6514078179383341}; failures=0", "9-state fitted near-price crossing stock only; tuning n=240; paired {\"mean\":0.0026061653941666595,\"standard_error\":0.0026903389763079212,\"retail\":0.0,\"arb\":0.0026061653941666612}; failures=0", "9-state fitted tick-1 stock with surviving-bid gate; tuning n=240; paired {\"mean\":-2.299586554811667,\"standard_error\":2.904029370511923,\"retail\":-1.6455738261195836,\"arb\":-0.6540127286900008}; failures=0", "9-state fitted tick-1 stock without surviving-bid gate; tuning n=240; paired {\"mean\":-4.784778829373335,\"standard_error\":2.896103759063618,\"retail\":2.05531352282125,\"arb\":-6.840092352192085}; failures=0", "9-state ask-only compound quote sizing; tuning n=240; paired {\"mean\":0.9392495488337494,\"standard_error\":0.9997091590366011,\"retail\":-1.2071685903037497,\"arb\":2.146418139117083}; failures=0", "81-state ask-only compound quote sizing, refresh every 64 observations; tuning n=1027; paired {\"mean\":0.058709334695034136,\"standard_error\":0.1790579157906924,\"retail\":-0.8525212108134372,\"arb\":0.9112305454833493}; failures=0", "9-state bid+ask fitted parameters in base lognormal sizing; tuning n=240; paired {\"mean\":0.7231878843337497,\"standard_error\":1.0173188413961929,\"retail\":-1.0448187514058331,\"arb\":1.768006635709583}; failures=0", "81-state ask-only fitted parameters in base sizing, refresh every 64 observations; tuning n=1027; paired {\"mean\":0.29789104400701055,\"standard_error\":0.18627962488991023,\"retail\":-0.7290670897013632,\"arb\":1.0269581336897757}; failures=0", "Keep base quote parameters until first 64-observation posterior refresh; tuning n=1027; paired {\"mean\":0.27696871887215174,\"standard_error\":0.17940273809813517,\"retail\":-0.6439192358178188,\"arb\":0.9208879546732229}; failures=0", "Warmup-64 ask-only fitted parameters, final optimized implementation; tuning n=1027; paired {\"mean\":0.27696871887215174,\"standard_error\":0.17940273809813517,\"retail\":-0.6439192358178188,\"arb\":0.9208879546732229}; failures=0", "Ask-only compound-Poisson posterior tail sizes, final optimized implementation; tuning n=1027; paired {\"mean\":0.058709334695034136,\"standard_error\":0.1790579157906924,\"retail\":-0.8525212108134372,\"arb\":0.9112305454833493}; failures=0", "Warmup-64 fitted quote sizes without the base spread-1 probability rule; tuning n=240; paired {\"mean\":-0.31801773880750006,\"standard_error\":0.6217962580312356,\"retail\":-0.7963926801012498,\"arb\":0.4783749412741664}; failures=0", "Optimized 9-state ask-only compound quote sizing; tuning n=1027; paired {\"mean\":-0.03811057050116862,\"standard_error\":0.30896361492920876,\"retail\":-0.8992327921396297,\"arb\":0.861122221613145}; failures=0", "Every-other-step ask observations, warmup 32 samples, posterior refresh every 32 samples; tuning n=1027; paired {\"mean\":0.0625953925383641,\"standard_error\":0.2574472567255342,\"retail\":-0.6606747319965918,\"arb\":0.7232701245148002}; failures=0", "Every-other-step estimator with 200-observation shrinkage toward base quote parameters; tuning n=1027; paired {\"mean\":0.18506423798091517,\"standard_error\":0.1713142761146349,\"retail\":-0.23070875335959143,\"arb\":0.41577299133213236}; failures=0", "candidate_comp2_valid; independent validation n=1009; paired {\"mean\":0.33980727555619444,\"standard_error\":0.1878835892536807,\"retail\":-0.5136408422932602,\"arb\":0.8534481178272545}; failures=0", "candidate_comp_valid; independent validation n=1009; paired {\"mean\":0.33980727555619444,\"standard_error\":0.1878835892536807,\"retail\":-0.5136408422932602,\"arb\":0.8534481178272545}; failures=0", "candidate_learned2_valid; independent validation n=1009; paired {\"mean\":0.3241729314801786,\"standard_error\":0.20802611503590235,\"retail\":-0.3275014178147669,\"arb\":0.6516743492937561}; failures=0", "candidate_learned_valid; independent validation n=1009; paired {\"mean\":0.3241729314801786,\"standard_error\":0.20802611503590235,\"retail\":-0.3275014178147669,\"arb\":0.6516743492937561}; failures=0", "candidate_log_valid; independent validation n=1009; paired {\"mean\":-0.028525070570068842,\"standard_error\":0.30959190118301405,\"retail\":-0.3869451319425174,\"arb\":0.3584200613606541}; failures=0", "candidate_comp2_unseen; frozen unseen comparison {\"mean\":0.25814611193824283,\"standard_error\":0.16591036616704274,\"retail\":-0.6427510766407311,\"arb\":0.9008971885791771}; failures=0", "Likelihood batching and managed-order snapshots: all SimulationResult fields identical on 240 tuning runs; inline inverse/filter and lazy initialization identical on 40 runs; Gaussian reuse identical on 20 runs and 1200 randomized grids. See final measurements for retained implementation.", "candidate_log; 200-run one-process timing {\"seconds\":{\"base\":294.8955512815155,\"candidate_log\":298.27196934306994},\"cpu_seconds\":{\"base\":167.29976003400003,\"candidate_log\":170.74200777199982},\"failures\":{\"base\":0,\"candidate_log\":0},\"runs_per_strategy\":200,\"seed_start\":8000,\"spread\":1}; no_slower=False", "candidate_log2; 200-run one-process timing {\"seconds\":{\"base\":159.6998795666732,\"candidate_log2\":158.75749987154268},\"cpu_seconds\":{\"base\":144.76564599199995,\"candidate_log2\":144.64710651400006},\"failures\":{\"base\":0,\"candidate_log2\":0},\"runs_per_strategy\":200,\"seed_start\":8000,\"spread\":1}; no_slower=True", "candidate_learned2; 200-run one-process timing {\"seconds\":{\"base\":437.97944509633817,\"candidate_learned2\":430.7078699860722},\"cpu_seconds\":{\"base\":183.42989461899992,\"candidate_learned2\":180.53505617500014},\"failures\":{\"base\":0,\"candidate_learned2\":0},\"runs_per_strategy\":200,\"seed_start\":8000,\"spread\":1}; no_slower=True", "candidate_comp2; 200-run one-process timing {\"seconds\":{\"base\":291.1769088418223,\"candidate_comp2\":293.3014312153682},\"cpu_seconds\":{\"base\":166.7484692749999,\"candidate_comp2\":168.58739739999982},\"failures\":{\"base\":0,\"candidate_comp2\":0},\"runs_per_strategy\":200,\"seed_start\":8000,\"spread\":1}; no_slower=False", "Retained warmup implementation: all 1027 tuning and 1009 validation SimulationResults equal the prior arithmetic-equivalent implementations in every field. Both final strategies matched the base in all fields on 900 other-spread runs. Compound-tail alternative rejected: lower unseen gain and slower than its paired base."], "next": "Keep the 64-observation warmup and base stock rules; isolate fitted bid sizing from fitted ask sizing to recover retail edge without giving back the arbitrage saving. Use fresh unseen seeds; 60000-67999 has now been evaluated."}