Skip to content

[C] Orion Implementation — Phase 7.2 Binary CLOB Switch

To: Orion (he/him) CC: Katja (Captain) From: Vesper Date: 2026-04-18


Context

S37 baseline session is complete. Results confirm Phase 7.2 is ready to build.

S37 key numbers: - VW: +3.40 bps | Fills: 29 (19B/10S) | Toxic: 0% - Anchor |err|>5bps: 69.4% — anchor in unreliable territory 70% of all ticks - Anchor mean: +5.51 bps | median: +9.88 bps (STRESS-dominant regime) - At 3 bps control threshold: near-100% of ticks would switch to CLOB

This is the baseline. Phase 7.2 is a controlled comparison against it.


What to Build

Spec (Atlas-locked Apr 18):

clob_mid = (best_bid + best_ask) / 2

if abs(anchor_error_bps) > 3:
    reference_mid = clob_mid
else:
    reference_mid = anchor_mid

anchor_error_bps is already computed each tick as last_anchor_divergence_bps in strategy_engine.py (line ~204). Use that value.

What changes: wherever anchor_mid (or quote_anchor_price) is currently used as reference_mid for quote placement, replace with the conditional above.

What does NOT change: - Spread offsets (bid=10, ask=14) - Size (15 RLUSD) - Skew/drift logic - Momentum filter - Any other guard or config


Hard Constraints

  • One commit, nothing else. No cleanup, no refactor, no other fixes bundled in.
  • No blending. Binary switch only — no weighted average of clob_mid and anchor_mid.
  • No additional regime logic. The 3-condition regime model (ALIGNED/DIVERGENT/STRESS) is for future phases. This commit implements only the switch.
  • The threshold is 3 bps. Not 5 (that's the evaluation floor, not the control threshold).

Deliverable

One branch: feat/phase-7.2-clob-switch

Provide: 1. The exact lines changed (file, line number, before/after) 2. Confirmation that anchor_error_bps source variable is correctly identified 3. Git commands block (branch, commit, push) — Katja runs these in her VS Code terminal 4. Any test coverage if applicable

No PR needed unless you flag a concern. Katja merges via GitHub UI.


What This Enables

After merge, the next session runs with CLOB as the primary reference when |anchor_error| > 3 bps. Given S37's 69.4% |err|>5bps rate, the engine will price against CLOB for the majority of ticks instead of the lagging anchor. Expected effect: reduced quote displacement, improved bid/ask competitiveness, better sell-side conversion.

The session after merge is the controlled comparison against S37 baseline.

— Vesper