Technical risk register (v0.1, 2026-11-13; status updated through phase 5 part 1, 2026-11-20)

Likelihood and impact: H / M / L. “Phase” is where the mitigation lands (see ARCHITECTURE §14). The two risks that most threaten the project’s conclusions, rather than its code, are K1 and K2.

Status during phase 5 (part 1, 2026-11-17 to 20)

ID Change
K3 optimistic passive backtests Mitigation built, checked on simulated and on real data. Equities (Nasdaq ITCH, BX and the main market, one day): on 801,154 BX orders and 439,219 main-market orders (every 10th) of each day’s 8 most-traded stocks, the model is never optimistic: no false fill, no early first fill, no overfill. That needed four corrections, all prompted by these checks (K28, K30). It eventually finds 93–94% of the real volume; 7% (BX) and 47% (main market) of first fills land in the right nanosecond. Real fills (2026-11-18): each of 172,862 resting Bitstamp orders was replayed through the stream without itself, in four variants (HISTORICAL_DATA §6). In every variant the model filled none of the 172,564 that never traded, no order earlier than it really filled, and none for more. The check found one optimistic rule and it was fixed: a trade-through filled a copy’s whole rest, crediting 0.72 BTC that never traded through. Recovery depends on taker information. The conservative rules alone find a third of real fills on time. A taker-remainder rule (Bitstamp publishes takers’ orders; the premise is checked per taker and held for all 79 with a remainder), scored against history rebuilt without each order, finds 292 of 298 and 99.6% of the volume. 71% of the filled volume would otherwise have stayed with the takers, so on this venue maker-only data (LOBSTER-style) would badly understate passive fills. Simulated data: the pure-replay queue model is FIFO and conservative (HISTORICAL_DATA.md §4). Against the exchange’s own fills of about 3,700 probe orders (both backgrounds, 1- and 5-share probes) it filled no order the exchange did not, and none earlier. It found every fill that a probe-free stream can show at the same nanosecond. New from real data: Bitstamp publishes every incoming order as resting before its outcome. A rebuilt book was crossed 2,974 times in 19 minutes, each time for less than one millisecond stamp, and 91% of those orders were MOC orders deleted untraded (HISTORICAL_DATA §6). A replay must not fill against an order until its millisecond has settled; the LOBSTER export never shows takers as resting, and copies join only after their entry stamp. Still open: impact (replay cannot show reactions to our orders; the counterfactual assumes none), L2-only data (queue position must be assumed), hidden orders, and feeds without taker orders (LOBSTER, ITCH), where only the conservative rules apply.
K16 unverified formulas or claims The LOBSTER format comes from secondary sources: a reconstructor library’s documentation, a loader script and a course page. The empty-level dummy prices and halt codes are from memory, and the reader does not depend on them. LOBSTER’s own page could not be loaded. The first real file will confirm or correct them (HISTORICAL_DATA §1). Bitstamp: the channel formats and subtype codes were read in its WebSocket documentation. The documentation names subtype 5 only “MOC”; that it means maker-or-cancel rests on the observed behaviour. The millisecond resolution of order-event stamps is measured, not documented. ITCH 5.0: the layouts are from memory [M], but every message type’s length matches the BX file’s own length prefixes, and the book rebuild finds no inconsistency in 29.2 million messages (HISTORICAL_DATA §7). The specification text was not read.
K11 data licensing The Bitstamp recording (200 MB raw) lives in data/bitstamp/, and the Nasdaq BX ITCH sample day (391 MB, 863 MB decompressed) in data/itch/. Neither source’s redistribution terms were checked. Raw data stays out of the published repository (/data/ is ignored); derived statistics are fine.
K26 (new): tiny aggressive orders In the simulated market an aggressive order executes a median of 2 shares (90th percentile 3, none 6 or more), against a top-of-book depth of hundreds of shares. Real markets differ, so any result that depends on aggressor size, such as replay blind spots, queue-depletion speed or impact per order, inherits it. L: H, I: M. Mitigation: treat as part of K1. Compare with the order-size distribution in real MBO data once available, and recalibrate the background if needed. Real order-level data now exists, but only from a crypto venue whose sizes do not map onto the simulated equity-like market. The comparison has not been made.
K27 (new): one venue’s quirks Real data comes from three venues, one window each. Bitstamp BTC/USD, 19 minutes: MOC orders are 95% of creations, event stamps are whole milliseconds, and 13% of snapshots are at least 1 ms stale. Nasdaq BX and Nasdaq’s main market, one day (2019-12-30): orders ranked at a better price than displayed (K28), orders displayed later than received and auction executions (K30). Each venue showed something the others did not, so none transfers by default to other venues or days. L: H, I: M. Mitigation: state the venue and window in every result (provenance does). Nasdaq’s free archive holds 29 days over three venues; add days before any general equity claim.
K28 (closed 2026-11-19): displayed price is not ranked price First reported as “priority is not strict FIFO on BX”: in 0.2% of executions a newer order passed an older one at the same displayed price, and there the replay model made 539 false fills among 710,970 never-filled orders. Cause: those orders were ranked at a better price than they displayed, under BX’s Price to Comply rule. Their executions arrive as ITCH “executed with price”, one increment better than displayed. Every execution at a displayed price followed arrival order (HISTORICAL_DATA §7). Fixed: such executions are written in LOBSTER form at the price they traded at, and the replay model fills nothing from them. A copy also no longer sees the nanosecond its original was cancelled in, which removed the last 33. Now no false, early or excess fill on 801,154 orders. Nasdaq’s main market shows the same pattern (91,408 such executions, all one increment better, none attributed). Residual: a LOBSTER file that writes these executions at the displayed price would bring the false fills back; check that when a real LOBSTER file is read. L: L, I: M. Lesson: priority holds at the price a venue ranks an order at, which can differ from the price it displays.
K29 (new, closed 2026-11-19): outdated binary behind the Python wrappers The Python wrappers built hftsim only when it was missing, so after a source change they silently ran the old binary. Found when a rerun of the ITCH check after the K28 fix reproduced the old report exactly. Fixed: they ask cargo once per process. Cargo leaves an up-to-date binary untouched, so the run cache (keyed on the binary) stays valid. Tested. Lesson: as with K22, an artefact that exists is not proof it is current.
K30 (new, closed 2026-11-20): display order is not receipt order; auctions Nasdaq’s main market (2019-12-30) executed 10,565 orders (0.18% of executions at a displayed price) ahead of an older displayed order. In every case the executed order had the lower reference number: Nasdaq received it first and displayed it later (2,126 within a second of the open). Checked by reference number, priority held in all 5,722,824. The replay model ranked such orders behind a copy, so the first run made 1 false fill, 26 early first fills and 1 overfill. The main market also runs auctions, whose executions arrive as non-printable executions stamped with the cross (3,529), plus 4,980 other non-printable executions of unknown meaning. Fixed: the replay ranks an order with a lower id ahead of a copy even when shown later, and fills nothing from executions stamped at a cross. Volume counts each auction once. Now no false, early or excess fill on 439,219 main-market orders (every 10th); Bitstamp, BX and the simulator are unchanged. Residual: the rule needs ids that follow receipt (true of Nasdaq, Bitstamp and the simulator; unknown for LOBSTER). 152 non-printable executions outside auctions are read as ordinary ones. L: L, I: M. Lesson: compare queues in the venue’s own order, by price it ranks at and by time it received, not by what the feed shows first.

Status after phase 4

ID Change
K16 unverified formulas Mitigated for the metrics. The Rule 600(b) spread definitions and the Rule 605 horizons were read in the eCFR text. The race-duration definition is at secondary-source level (the NBER Digest); the window and grouping are this project’s choices. Amihud, Roll and Perold are implemented from memory but hand-tested (METRICS.md).
K8 missing dependencies Partly closed (2026-11-16). maturin 1.16 and pyarrow 26 are in a project virtual environment (python/.venv), and PyO3 0.25 came from crates.io for the bindings crate only. The core workspace still has no external dependencies and builds offline. The extension built with the development machine’s Rust GNU toolchain and Python’s installed import libraries, with no MSVC or separately installed MinGW. Jupyter, the web-server crates and Node.js are still not downloaded.
K7 I/O and memory Every run keeps the full event log in memory for the metrics (about 430 MB for 180 simulated seconds with 30 informed traders). With other work sharing the laptop, that limits the batch to 4 parallel runs. Event-level output now exists as opt-in Parquet through the bindings: 3.0 million events of a 180 s run come to 24 MB with zstd, written after the run, off the simulation path. Open: recording levels or streaming metrics, to cut the in-memory log.
K6 Python agents Still open. The bindings run whole markets; a Python agent inside the event loop needs a safe adapter around sim::Agent that is not built.
K19 agent-id streams The runner adds the background first and strategy agents after it (informed, arbitrageurs, market makers). The background’s random streams are therefore the same in every cell of a grid for a given seed, which is what common random numbers need. A market maker’s id moves when the number of informed traders changes. Its quoting draws no random numbers, but its link-latency draws are keyed by id, so across such cells only the background’s randomness is common.
K21 background mean reversion Re-measured. Without market makers, the default background’s lag-1 autocorrelation of 1 s returns is −0.21 [−0.25, −0.16] (8 seeds), and −0.09 with 30 informed traders; zero intelligence is −0.05 (interval includes zero). With one to four step-7 market makers it is −0.07 to +0.08, and every interval includes zero (RESEARCH_RESULTS.md, RQ8). The makers earn no more on the default background than on zero intelligence, and every phase-4 finding holds on both backgrounds.
K23 no informed flow Measured, and partly wrong as stated. Even without informed traders, adverse selection at 1 s costs a GLFT maker 55–60% of its spread capture: the background’s split metaorders are persistent one-sided flow. With 60 precise informed traders the figure is 90–97%. Still, the maker stays profitable in nearly every configuration (RQ2), and the informed traders lose money as a group on the default background. The simulated market remains generous to passive liquidity, and only historical mark-outs (phase 5) can say whether real flow is.
K24 (new, closed): race undercount A cancel that arrives after its order was filled is refused at the gateway, which already knows of the fill, and never reaches the engine log. Race detection from the engine log alone missed exactly the maker’s losing message in a sniping race. Fixed: the kernel records the gateway’s own answers, and races include them (tested end to end).
K25 (new, closed): PnL window Agent PnL from the ledger covered the warm-up, while the market metrics did not. Fixed: a windowed decomposition carries in the position held at the window start at that moment’s mid. It is exact against the ledger (tested).

Status after phase 3

ID Change
K16 unverified formulas Mitigated for market making. GLFT and the CKS order-flow imbalance were transcribed from the primary texts. The GLFT exact solution matches a direct numerical HJB solution, and A–S is verified as its first-order expansion. The micro-price stays at secondary-source level (its estimator is checked against simulation). Rule 605 spread definitions and Amihud are still open (phase 4).
K23 (new): no informed flow in the background The background’s aggressive orders come from random metaorders and noise. A passive market maker meets little adverse selection, and with K21 every ladder step looks profitable. L: H, I: H for any profitability statement. Mitigation: mm_ladder --informed N adds informed traders. Strategy studies report with and without informed flow, on both backgrounds, and claim nothing beyond the simulator. Phase 4 research question 2 varies the informed share systematically.
K15 unstable ecologies Market makers carry the kill switch and a hard inventory bound, and stop cleanly (tested).
K2 false profitability The ladder’s defaults are illustrative and matched on risk appetite, not tuned for PnL. Results are labelled simulation-only (MARKET_MAKING §6–7).

Status after phase 2

ID Change
K1 unrealistic market Partly mitigated. The background meets five stylised-fact targets (cancellations, executed share, one-tick spread, long-memory order signs with pooled γ 0.46–0.54, concave impact with pooled δ 0.53–0.58) on the calibration seeds and two holdout seed sets (STYLIZED_FACTS.md). Still open: no volatility clustering, mild tails, no intraday seasonality, high metaorder participation, and nothing compared with historical data (phase 5).
K21 (new): background mean reversion The noise traders’ anchor that makes impact concave also makes 1-second returns mean-revert. Lag-1 autocorrelation is −0.14 to −0.26 across seed sets, against −0.01 without the anchor. A mean-reversion or passive market-making strategy can earn this inside the simulator. L: H, I: H for phase-3 studies. Mitigation: BackgroundConfig::zero_intelligence() as a second background; every strategy result reported on both; an edge on the anchored background alone is treated as an artefact; re-measure once adaptive market makers exist.
K2 false profitability Rule added: strategy results on both backgrounds, with common seeds; calibration choices validated on holdout seeds.
K5 determinism Agents deterministic across platforms by construction: only exactly rounded IEEE operations and sim::detmath in agent code (checked: no platform math calls); a golden digest of the background market.
K14 market-order sweeps Mitigated agent-side: every marketable order is an IOC limit at most N ticks through the agent’s view of the opposite best. Engine-level protection bands are still not built.
K15 unstable ecologies Partly mitigated: loss kill switch in every strategy agent (cancels all orders, stops for good; tested). Run monitors and automatic halts are not built.
K22 (new, closed): stale test tooling The mutation script restored files with old timestamps, so cargo could skip rebuilding them and one mutant’s code could leak into the next run (found 2026-11-15 when an analysis-crate mutant failed a simulation digest test). Fixed: the script touches restored files; all 46 mutants rerun (TESTING.md). Lesson: any tool that restores or swaps source files must force the rebuild it relies on.

Status after phase 1

ID Change
K4 latency model Mitigations built: latency distribution library (constant, uniform, log-normal, Pareto, spikes), links that never reorder, a queue per gateway session, a per-instrument engine queue with work-dependent service time, per-subscriber feed and signal delays. Still open: calibration to venue data and sensitivity sweeps (phase 4).
K5 determinism Kernel deterministic by construction and tested: per-entity random streams, ln/exp that do not use the platform math library, run digests (same seed gives the same run; an extra silent agent leaves exchange events bit-identical). Still open: floating point inside future strategy agents.
K13 accounting overflow Closed for the exchange ledger and agents’ own views: cash and fees are i128.
K18 multiple instruments Closed: one engine per instrument under one scheduler; tested with two instruments.
K14 market-order sweeps Still open: no price protection. The zero-intelligence agents use IOC limit orders, not market orders.
K19 (new) Random streams are keyed by agent id (insertion order): inserting an agent in the middle of a configuration renumbers later agents and changes their draws. L: M, I: L. Mitigation: append agents, or key streams by a stable agent name in the phase-4 configuration layer.
K20 feed fan-out (mitigated 2026-11-14) Problem: every market-data packet went to every subscriber, so kernel work grew with subscribers × engine commands. At ~20,000 actions per simulated second: 20 agents ran 2.8× faster than real time, 200 agents 0.22×, 1,000 agents 0.025×. Mitigation built: shared feed groups (one delivery and one book view per location; members in callback or snapshot mode) and smaller scheduler entries. 1,000 agents on three snapshot groups now run 5.3× faster than real time; private feeds also got 17–18% faster. Existing configurations are bit-identical (golden digest), and groups with constant latency reproduce private feeds exactly (tested). Residual: many event-driven agents that each need a callback per packet still cost one callback per member per packet (about 0.08 µs each); conflated feeds are not built. L: M, I: L.

Research validity

ID Risk L I Mitigation Phase
K1 The simulated market is not realistic. Zero-intelligence or hand-made agent ecologies miss real order-flow structure (long-memory order signs, clustered arrivals, intraday seasonality, hidden liquidity), so market-making results reflect model artefacts. H H Calibrate background flow to stylised facts before any strategy study (spread distribution, cancel-to-trade ratios by distance from the touch, order-sign autocorrelation, square-root impact). Consider queue-reactive or Hawkes generators. Report sensitivity to the agent mix. 2
K2 False profitability. Strategies tuned in simulation exploit simulator quirks (no fees, perfect fills, predictable agents, known auction times). H H Out-of-sample seeds and agent populations; fees and rebates in accounting; randomised auction ends; paired comparisons with confidence intervals; never call a strategy profitable from simulation alone; separate historical-validation stage. 3–5
K3 Historical backtests of passive strategies are optimistic. In L2 data your queue position is unknown; MBO data lacks hidden and iceberg orders and true participant latency; replay cannot show how the market would have reacted to your orders. H H Prefer MBO data; explicit queue-position fill models with conservative assumptions (fill only after the queue ahead is depleted); hybrid replay for impact; state the data level in every result; report fill-model sensitivity. 5
K4 Latency model misspecified. Real latency has heavy tails, bursts, correlated jitter, per-session ordering and gateway queueing; a constant delay misstates race outcomes. M H Distribution library (base + heavy-tailed jitter + rare spikes), per-link FIFO, gateway service queue, per-subscriber feed delays; magnitudes anchored to published figures; sensitivity sweeps over latency rank (Baron et al.: relative latency is what matters). 1
K10 Our rulebook is one venue design. Results on priority, self-trade handling or auction pricing may not transfer to a real venue (e.g. Nasdaq replace priority differs from CME’s). M M Documented rulebook with venue precedents; make rules switchable (replace-priority convention, pro-rata allocation, price protection) before venue-specific studies. 3+
K16 Unverified formulas or claims get implemented. Several formulas (A–S details, GLFT closed form, CKS OFI, Rule 605 definitions) and exchange rules are snippet-level only. M H Formula register (RESEARCH_SURVEY §D): transcribe from the primary paper and test against an independent numerical solution before use. 3–4

Engineering

ID Risk L I Mitigation Phase
K5 Determinism erodes as layers are added: floating point in agents (libm differences, FMA, parallel reductions), hash iteration, wall-clock reads, thread scheduling. M H Integer core; deterministic hashers; one thread per simulation; per-entity RNG streams; no wall clock in lob or sim; event digests in CI; cross-platform reproducibility promised only for the integer core. 1–4
K6 Python agents are slow. PyO3 callbacks cost microseconds each, so a Python agent on every event caps simulation speed. H M Core agents in Rust; Python agents on timers or batched events; vectorised interfaces for research code. 2, 4
K7 I/O dominates runtime. Logging every event (64 bytes × millions per run) and book snapshots to disk can exceed simulation cost. M M Columnar compressed storage (Parquet); recording levels (events / BBO / sampled depth); write off the simulation thread. 4
K13 Accounting overflow. Notional = price × quantity in i64 overflows for fine price units (e.g. crypto) and long runs. M H i128 (or checked arithmetic) for notional, cash and PnL; spec bounds already cap price at 2^61 and order size at 2^40. 1–2
K14 Market orders sweep thin synthetic books (no price protection), producing unrealistic crashes. M M CME-style protection bands and limit-price collars in the engine; gateway risk limits per agent. 1–2
K15 Agent ecologies become unstable (empty book, runaway prices, liquidity spirals) and waste runs. M M Run monitors (one-sided book duration, spread blow-ups); kill switches via CancelAll; scenario-level invariants; automatic volatility halts. 2
K17 Memory-bound at depth. Median cost rises 3.5× from a 1k-order to a 190k-order book (cache misses on the arena and hash map). M L Fine for research scale. If needed: direct id-indexed slot table (ids are sequential), smaller nodes, locality-aware slot reuse, per-level contiguous storage. later
K18 One engine per instrument. Cross-instrument strategies (statistical arbitrage) need several books with consistent event ordering. M M Multi-book scheduler in the kernel with one global (time, seq) order. 1

Environment and process

ID Risk L I Mitigation Phase
K8 Missing toolchains and dependencies. No C/C++ compiler and no Node.js on the development machine; PyO3/maturin, pyarrow and the web-server crates were not cached. H M Add a dependency only when a phase needs it; keep the core dependency-free (it builds offline today); add dependencies per phase with pinned versions and a lockfile. 1, 4, 6
K9 Benchmark noise on a Windows laptop. At normal priority, preemption by background work inflated mean cost about 4× (first run: 1.75 vs 8.6 M msg/s). H L Raise the benchmark’s own process priority; report median, best and worst runs, percentiles and a same-harness noise floor; record the power plan (Balanced) and AC state; never compare across machines without re-running. done
K11 Data licensing. ITCH, LOBSTER and vendor data usually forbid redistribution. M M Keep raw data outside the repository; commit only code and derived statistics; record the licence in provenance. 5
K12 Scope. The specification covers an exchange, a simulator, agents, strategies, a research platform, data adapters and a UI. H M Phase gates with exit criteria; research questions decide what gets built next; each phase must leave the previous ones green. all