{"key":"f-ambiguity","approach":"Ambiguity-set robust quoting overlay: on the selected first-step spreads, estimate the center from the observed competitor quote midpoint history and retain each incumbent order only when its edge remains positive throughout a shrinking interval. No orders are added, so there are no overlay-owned orders to expose to N.","tried":"Two variants on tuning seeds 310000..310199. Variant A used a 64-point history, initial width 0.20, shrink scale 160, and volatility multiplier 2.0. Variant B used a 32-point history, initial width 0.14, shrink scale 80, and volatility multiplier 2.5; it was selected marginally on tuning mean difference and frozen. Both acted on spreads 1..4.","next":"No promotion: the holdout paired difference was negative. Do not promote this overlay; investigate retail-flow preservation before revisiting ambiguity filtering.","spreads_acted":[1,2,3,4],"off_equals_n":true,"code":"from dataclasses import replace\n\n\nclass Strategy(_N):\n    \"\"\"Ambiguity-set filter with faster learning from the observed quote path.\"\"\"\n\n    def __init__(self):\n        super().__init__()\n        self._spread = None\n        self._mid = []\n        self._seen = 0\n\n    def on_step(self, state):\n        if self._spread is None:\n            b = state.competitor_best_bid_ticks\n            a = state.competitor_best_ask_ticks\n            self._spread = 0 if b is None or a is None else max(1, (a - b + 1) // 2)\n        actions = super().on_step(state)\n        if self._spread not in (1, 2, 3, 4):\n            return actions\n        b = state.competitor_best_bid_ticks\n        a = state.competitor_best_ask_ticks\n        if b is None or a is None:\n            return actions\n        self._seen += 1\n        self._mid.append((b + a) * 0.005)\n        if len(self._mid) > 32:\n            self._mid.pop(0)\n        center = sum(self._mid) / len(self._mid)\n        vol = 0.0 if len(self._mid) < 2 else (sum((x - center) ** 2 for x in self._mid) / len(self._mid)) ** 0.5\n        width = 0.14 / (1.0 + self._seen / 80.0) ** 0.5 + 2.5 * vol\n        lo, hi = max(0.0, center - width), min(1.0, center + width)\n        out = []\n        for action in actions:\n            if isinstance(action, PlaceOrder):\n                px = action.price_ticks * 0.01\n                if action.side is Side.BUY and lo <= px:\n                    continue\n                if action.side is Side.SELL and hi >= px:\n                    continue\n            out.append(action)\n        return out\n","code_sha256":"55807d6950c8a9aa8105822e0c347abc3bb420d2e1bf7dbaa7f55082f48989ec","assembled_sha256":"e304da6d9f3ba864b9dcf9d9d525dad5e841b3cc515d560460aa4d934ad1c2cb","tuning":{"n":200,"mean_diff":-39.441586404894004,"se":4.698952741427669},"paired":{"first_seed":410000,"last_seed":410499,"n":500,"complete":true,"incumbent_mean":104.4137531881468,"mean_diff":-44.386158788816,"se":3.013138214895132,"sum_d":-22193.079394408,"sum_d2":3250276.520577319,"retail_diff":-30059.7390416989,"arb_diff":7866.6596472897,"failures":[]},"by_spread":{"1":{"runs":115,"incumbent_mean":28.495154459731307,"mean_diff":-4.268163457178261,"se":2.124740438470509,"sum_d":-490.8387975755,"sum_d2":61280.362732907015,"retail_diff":-1360.05770266,"arb_diff":869.2189050819001},"2":{"runs":116,"incumbent_mean":97.76626247947758,"mean_diff":-28.794084633164655,"se":5.195940853272968,"sum_d":-3340.1138174471,"sum_d2":456326.1899624595,"retail_diff":-6089.4068425281,"arb_diff":2749.2930250779},"3":{"runs":138,"incumbent_mean":128.4054514027384,"mean_diff":-59.03529701012681,"se":6.1781910257594825,"sum_d":-8146.8709873975,"sum_d2":1202595.8069399488,"retail_diff":-10687.0678187013,"arb_diff":2540.1968313075},"4":{"runs":131,"incumbent_mean":151.67248160310686,"mean_diff":-77.97905184723588,"se":6.562845829741553,"sum_d":-10215.2557919879,"sum_d2":1530074.1609420036,"retail_diff":-11923.2066778095,"arb_diff":1707.9508858223999}},"seconds_per_simulation":0.6539}
