{
  "key": "f5-reprice-rate",
  "mechanism": "reprice-rate",
  "approach": "Blind RC subclass counts rival best-quote pair changes over the latest 20 step transitions. Above K, multiply new order quantities by f; drop scaled orders below 0.01 shares. Act only on first-quote spreads 1\u20134. All variants suffered collateral failures; freeze the best available-pair tuning mean for diagnostic holdout only.",
  "tried": [
    {
      "name": "K6_f0.5",
      "code_sha256": "0e3aef5f65260e8d5bc5db484ff4ac04bd69aaaf1c2f21abe02e7075098de8f9",
      "mean_diff": -0.6618935489786801,
      "se": 0.2626147238938424,
      "tuning": {
        "seeds": {
          "start": 330000,
          "end": 330199
        },
        "attempted_n": 200,
        "complete": false,
        "failed_pair_count": 3,
        "overall": {
          "n": 197,
          "sum_d": -130.3930291488,
          "sum_d2": 2749.2405404892374,
          "mean_diff": -0.6618935489786801,
          "se": 0.2626147238938424,
          "comparator_mean": 97.8560172817066,
          "candidate_mean": 97.19412373272792,
          "retail_diff": -1.0942635538543135,
          "arb_diff": 0.43237000486700516
        }
      },
      "eligible": false
    },
    {
      "name": "K6_f0.7",
      "code_sha256": "2f01e9676b128ce00b49a51528084e5dae2c6d778245ea69dbef91b19218734f",
      "mean_diff": -0.6319337799780612,
      "se": 0.25079718694913594,
      "tuning": {
        "seeds": {
          "start": 330000,
          "end": 330199
        },
        "attempted_n": 200,
        "complete": false,
        "failed_pair_count": 4,
        "overall": {
          "n": 196,
          "sum_d": -123.8590208757,
          "sum_d2": 2482.2792309231086,
          "mean_diff": -0.6319337799780612,
          "se": 0.25079718694913594,
          "comparator_mean": 98.24645157446174,
          "candidate_mean": 97.61451779448367,
          "retail_diff": -0.9268198078520403,
          "arb_diff": 0.2948860278642857
        }
      },
      "eligible": false
    },
    {
      "name": "K10_f0.5",
      "code_sha256": "7aeda6a8c1aa08c3149818d6deaebc2a67b528d831dd07b3108648632f6e82dd",
      "mean_diff": 0.0058284461395935,
      "se": 0.07584437812574771,
      "tuning": {
        "seeds": {
          "start": 330000,
          "end": 330199
        },
        "attempted_n": 200,
        "complete": false,
        "failed_pair_count": 3,
        "overall": {
          "n": 197,
          "sum_d": 1.1482038894999196,
          "sum_d2": 222.11719084150855,
          "mean_diff": 0.0058284461395935,
          "se": 0.07584437812574771,
          "comparator_mean": 97.94109507274771,
          "candidate_mean": 97.94692351888732,
          "retail_diff": -0.06699069859289322,
          "arb_diff": 0.07281914473451759
        }
      },
      "eligible": false
    },
    {
      "name": "K10_f0.7",
      "code_sha256": "091a86bc90812d470342c23ade1addc89cdbe14f2a9b79292d15c49038f2a451",
      "mean_diff": -0.06746344768781791,
      "se": 0.07126765909768315,
      "tuning": {
        "seeds": {
          "start": 330000,
          "end": 330199
        },
        "attempted_n": 200,
        "complete": false,
        "failed_pair_count": 3,
        "overall": {
          "n": 197,
          "sum_d": -13.290299194500129,
          "sum_d2": 197.010016759237,
          "mean_diff": -0.06746344768781791,
          "se": 0.07126765909768315,
          "comparator_mean": 97.90433875693503,
          "candidate_mean": 97.8368753092472,
          "retail_diff": -0.10042735237969527,
          "arb_diff": 0.03296390468933983
        }
      },
      "eligible": false
    }
  ],
  "next": "Reject all four variants as operationally invalid. Holdout is diagnostic only: available-pair means exclude failures and cannot support promotion. Do not use finalist seeds for this candidate.",
  "spreads_acted": [
    1,
    2,
    3,
    4
  ],
  "off_equals_rc": true,
  "code": "from collections import deque as _f5_deque\nfrom dataclasses import replace as _f5_replace\nfrom orderbook_pm_challenge.types import PlaceOrder as _F5PlaceOrder\n\nclass Strategy(_RC):\n    \"\"\"Reduce new sizes after frequent changes in the rival's best quotes.\"\"\"\n    _f5_K = 10\n    _f5_factor = 0.5\n    _f5_enabled = True\n\n    def on_step(self, state):\n        actions = super().on_step(state)\n        if not self._f5_enabled:\n            return actions\n        quotes = (state.competitor_best_bid_ticks,\n                  state.competitor_best_ask_ticks)\n        if state.step == 0 or not hasattr(self, '_f5_changes'):\n            self._f5_changes = _f5_deque(maxlen=20)\n            self._f5_previous = quotes\n            bid, ask = quotes\n            self._f5_spread = (max(1, (ask - bid + 1) // 2)\n                               if bid is not None and ask is not None else None)\n        else:\n            self._f5_changes.append(int(quotes != self._f5_previous))\n            self._f5_previous = quotes\n        if (self._f5_spread not in (1, 2, 3, 4)\n                or sum(self._f5_changes) <= self._f5_K):\n            return actions\n        return [_f5_replace(action, quantity=action.quantity * self._f5_factor)\n                if isinstance(action, _F5PlaceOrder) else action\n                for action in actions\n                if not isinstance(action, _F5PlaceOrder)\n                or action.quantity * self._f5_factor >= 0.01]\n",
  "code_sha256": "7aeda6a8c1aa08c3149818d6deaebc2a67b528d831dd07b3108648632f6e82dd",
  "assembled_sha256": "809c313aca5e795da07bc311459b2090dc41d8b9158d66b45b6ef2aefe0ec19a",
  "comparator_sha256": "3c07bdcd221ac25729c3ebc92b21ac9e2014510ecb85816c4391ed81e933291f",
  "tuning": {
    "seeds": {
      "start": 330000,
      "end": 330199
    },
    "selection": "Maximum mean_diff among fully successful variants if any; otherwise maximum available-pair mean as a diagnostic fallback. All four failed, so none is eligible.",
    "selected": "K10_f0.5",
    "K": 10,
    "f": 0.5,
    "attempted_n": 200,
    "complete": false,
    "eligible": false,
    "overall": {
      "n": 197,
      "sum_d": 1.1482038894999196,
      "sum_d2": 222.11719084150855,
      "mean_diff": 0.0058284461395935,
      "se": 0.07584437812574771,
      "comparator_mean": 97.94109507274771,
      "candidate_mean": 97.94692351888732,
      "retail_diff": -0.06699069859289322,
      "arb_diff": 0.07281914473451759
    }
  },
  "paired": {
    "seeds": {
      "start": 440000,
      "end": 440499
    },
    "n": 499,
    "attempted_n": 500,
    "complete": false,
    "missing_seeds": [
      440163
    ],
    "overall": {
      "n": 499,
      "sum_d": -5.202806123200001,
      "sum_d2": 94.70717537227624,
      "mean_diff": -0.010426465176753509,
      "se": 0.019516506629401943,
      "comparator_mean": 101.65555207417435,
      "candidate_mean": 101.64512560899759,
      "retail_diff": -0.08133504109719433,
      "arb_diff": 0.07090857591523045
    },
    "by_spread": {
      "1": {
        "n": 141,
        "sum_d": 4.955440104299988,
        "sum_d2": 31.47656091136503,
        "mean_diff": 0.035144965278723315,
        "se": 0.039821283977248746,
        "comparator_mean": 28.972641823249646,
        "candidate_mean": 29.00778678852837,
        "retail_diff": -0.011117094067376437,
        "arb_diff": 0.046262059343262454
      },
      "2": {
        "n": 110,
        "sum_d": -4.326338988799999,
        "sum_d2": 12.358095983365576,
        "mean_diff": -0.039330354443636355,
        "se": 0.03188273386526525,
        "comparator_mean": 88.78927784058273,
        "candidate_mean": 88.74994748613909,
        "retail_diff": -0.15547558577272722,
        "arb_diff": 0.11614523132090897
      },
      "3": {
        "n": 119,
        "sum_d": -6.808459207299988,
        "sum_d2": 34.13624189537097,
        "mean_diff": -0.05721394291848729,
        "se": 0.0490231474491658,
        "comparator_mean": 143.37780997585293,
        "candidate_mean": 143.32059603293445,
        "retail_diff": -0.1248367736932763,
        "arb_diff": 0.06762283076806719
      },
      "4": {
        "n": 129,
        "sum_d": 0.976551968599999,
        "sum_d2": 16.736276582174654,
        "mean_diff": 0.007570170299224799,
        "se": 0.03182978050775933,
        "comparator_mean": 153.5829305298,
        "candidate_mean": 153.59050070009923,
        "retail_diff": -0.05473476542248076,
        "arb_diff": 0.06230493571782954
      }
    },
    "statistics_policy": "Only pairs where both engines complete all 2000 steps enter aggregates. Failed pairs are listed in missing_seeds. Available-pair statistics are descriptive and may be biased by failures."
  },
  "failures": [
    {
      "phase": "initial tuning smoke",
      "variant": "K6_f0.5",
      "first_seed": 330000,
      "count": 1,
      "error": "quantity must be positive after rounding",
      "repair": "Drop scaled PlaceOrders below 0.01 shares; restarted tuning with repaired overlay. Smoke records excluded from statistics."
    },
    {
      "phase": "tune",
      "variant": "K10_f0.5",
      "count": 3,
      "first_seed": 330065,
      "errors": [
        "orderbook_pm_challenge.market.OrderBookError: Insufficient free cash for order collateral"
      ],
      "repair": "None: adding collateral management would exceed this single-mechanism screen. Failed pairs are excluded from mean/se and coverage is incomplete."
    },
    {
      "phase": "tune",
      "variant": "K10_f0.7",
      "count": 3,
      "first_seed": 330065,
      "errors": [
        "orderbook_pm_challenge.market.OrderBookError: Insufficient free cash for order collateral"
      ],
      "repair": "None: adding collateral management would exceed this single-mechanism screen. Failed pairs are excluded from mean/se and coverage is incomplete."
    },
    {
      "phase": "tune",
      "variant": "K6_f0.5",
      "count": 3,
      "first_seed": 330083,
      "errors": [
        "orderbook_pm_challenge.market.OrderBookError: Insufficient free cash for order collateral"
      ],
      "repair": "None: adding collateral management would exceed this single-mechanism screen. Failed pairs are excluded from mean/se and coverage is incomplete."
    },
    {
      "phase": "tune",
      "variant": "K6_f0.7",
      "count": 4,
      "first_seed": 330065,
      "errors": [
        "orderbook_pm_challenge.market.OrderBookError: Insufficient free cash for order collateral"
      ],
      "repair": "None: adding collateral management would exceed this single-mechanism screen. Failed pairs are excluded from mean/se and coverage is incomplete."
    },
    {
      "phase": "hold",
      "variant": "K10_f0.5",
      "count": 1,
      "first_seed": 440163,
      "errors": [
        "orderbook_pm_challenge.market.OrderBookError: Insufficient free cash for order collateral"
      ],
      "repair": "None: adding collateral management would exceed this single-mechanism screen. Failed pairs are excluded from mean/se and coverage is incomplete."
    }
  ],
  "check_values": [
    17.5126554022,
    20.6298693268,
    2.3903113616,
    248.006347259
  ],
  "python_version": "3.12.3",
  "seconds_per_simulation": 0.8027096169815394,
  "validation": {
    "off_seeds": [
      320000,
      320001,
      320002
    ],
    "off_check": "Per-step action equality against a separate RC instance receiving identical states, plus equal full simulation edge components.",
    "synthetic_checks": "Strict threshold, 20-transition expiry, quantity scaling, dust removal, unchanged cancels, off-target and disabled action identity passed.",
    "records_checked": 2010,
    "one_record_per_seed_per_strategy": true,
    "simulator_commit": "b244530ee2a6247b5f930830eeca9dd950da0e7e",
    "steps": 2000,
    "config": "Default ChallengeConfig and ParameterVariance, sampled for each seed; same cfg and engine seed for RC and candidate.",
    "process": "serial, no sandbox; chunks at most 50 seeds",
    "assembled_convention": "Rename the last top-level class Strategy (the exported RC) to _RC, preserving earlier definitions; append one newline then exact overlay text.",
    "blind": "RC fetched, hash-checked, imported, and class-renamed programmatically; source not displayed or inspected.",
    "off_target": "No sampled spreads outside 1\u20134; synthetic spreads 5 and 6 return the original actions unchanged.",
    "timing_note": "Mean wall seconds per engine invocation, including interrupted simulations, excluding source download and checks outside the engines.",
    "assembled_engine_equality": "Assembled strategy and imported RC overlay produced identical SimulationResult on check seed 310000."
  }
}
