Files
momentum-system/docs/research/orderflow_notes.md
T
momentum devandClaude Fable 5 5bf089cdcc research: orderflow H1/H2/H4 verdicts — all refuted in substance; H2's formal PASS is a bar artifact
H2 exposed an adjudicator gap: on a -0.21R/fire baseline any keep-or-zero
gate zeroing ~44% of fires clears +0.05 mechanically; its own pre-registered
strata check inverts (choppy beats persistent within both gap buckets =
Simpson's). Queued: random-gate null for keep-or-zero bars. H3 accruing as
designed (n=29, skip-on-no-coverage working).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 19:24:47 -05:00

181 lines
19 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- Distilled 2026-07-17 from books/order_flow_microstructure/ (9 sources; O'Hara
image-only PDF unreadable). 9 parallel reader agents + adversarial synthesis, hard-constrained
to data the system actually has (1-min SIP bars, 15s quote snapshots) and fenced from the
8 refuted levers. Companion to regime_notes.md (plan 011's source). Next step: pick
hypotheses, register as pre-registered experiments (experiments/*.json), let nightly
adjudication decide. -->
> **VERDICTS (2026-07-17, first adjudication under deployed exit config, n=2044 v1 fires):**
> - **H1 trigger-erasure: FAIL, mechanism INVERTED here.** 76% of all fires close back below
> the trigger within 5 bars — on $2-20 gappers the recross is NORMAL price action, not a
> death signature. The rule clipped 46% of eventual winners (kill bar: 15%); delta −0.87R.
> Fast recross-invalidation is proven HARMFUL on this population. This also pre-kills H5's
> stall-tightening leg unless it behaves fundamentally differently.
> - **H2 flow-persistence: formal PASS (+0.107R) — REFUTED IN SUBSTANCE by its own
> pre-registered checks.** The kept population still loses (−0.19R/fire vs zeroed −0.24 —
> barely separated), and within BOTH gap strata the sign INVERTS (choppy beats persistent:
> 10-20% −0.03 vs −0.09; 20%+ −0.06 vs −0.26). The pooled tercile gradient is composition,
> not signal (Simpson's). Do not promote. STRUCTURAL LESSON: on a −0.21R baseline, ANY gate
> that zeroes ~44% of fires clears the +0.05 bar mechanically (908/2069 x 0.24 = +0.105);
> keep-or-zero experiments need a random-gate null, not just expR_delta_min.
> - **H4 volume-spike: FAIL clean** (−0.008R; concentration gate separates nothing).
> - **H3 spread-expansion: INCONCLUSIVE (n=29), accruing ~30 fires/day by design** — the
> skip-on-no-coverage guard is working; decisive in ~2 weeks.
> Running tally: conversion levers tested 12, surviving 0 (the regime gate remains the only
> OOS survivor, and it is session-level, not conversion). The transitory-impact mechanism
> (convergent mechanism #1) is looking less like a filterable signature and more like the
> population's base nature.
# Microstructure Shelf → ORB Entry-Conversion: Synthesis Note
The bot's proven #1 problem is entry conversion: triggers fire but only ~35-48% of breakouts reach +1R before -1R, and eight selection-side levers have been refuted — the population is fine, what happens AT and AFTER the breakout is the bottleneck. This shelf (Hasbrouck, Bouchaud et al., Cartea et al., Cont-Kukanov-Stoikov, Dalton, Bellafiore, Neill, Cetin-Danilova) is unusually well-matched to that problem, because market microstructure is precisely the study of which price moves stick (permanent, information-driven impact) and which revert (transitory, liquidity-driven impact). The academic and practitioner books converge, from opposite directions, on the same handful of observable signatures — and critically, most are computable from 1-min bars and 15s quote snapshots without tick data. Everything below is either a conditioning gate on already-fired entries or an exit-config variant; nothing re-opens the refuted selection axis.
## Convergent mechanisms
**1. Failed breakouts are transitory impact; the default fate of a one-shot volume burst is reversion.** (Hasbrouck ch.8/9/15; Bouchaud ch.12.4; Cartea ch.4/10.4) Price moves decompose into a permanent (information) component and a transitory (liquidity) component that mean-reverts once the initiating flow stops. Bouchaud is bluntest: after a metaorder completes, impact decays abruptly — reversion is the empirically *normal* outcome. A ~50-65% breakout failure rate is not a bug in the setup; it is the base rate for one-shot bursts. Continuation requires *sustained* flow.
**2. Return into the broken range is the structural invalidation signal, and it arrives before the stop.** (Dalton — balance-area re-entry; Bellafiore — fake-breakout recross at AIG $25/AMZN $86.60; Neill — false moves; Hasbrouck — the transitory signature *is* the round-trip) Four independent traditions say the same thing: once price trades back through the level it broke, the participants who drove the break are gone and the trade thesis is dead — waiting for the fixed stop is paying extra for the same information.
**3. Continuation is fed by persistent same-side flow, not by the size of the trigger print.** (Bouchaud ch.10 — long-memory order flow from order splitting/herding; Cartea ch.4/12 — same-side MO clustering, imbalance regimes with 0.97-0.98 persistence; Hasbrouck ch.9 — momentum-feedback impulse responses that keep rising; Neill — volume growing on the advance) The discriminator between real and fake breakouts is whether one-directional participation was *ongoing* into the trigger, versus a single isolated spike.
**4. Spread dynamics around the trigger carry real-time information — but the books disagree on the sign.** (Cartea ch.2, Hasbrouck ch.5: widening = Glosten-Milgrom adverse-selection pricing = informed flow = bullish for follow-through. Bouchaud ch.22, Cont-Kukanov-Stoikov (β~1/D), Bellafiore: widening = liquidity pulling back / thin book / chop-zone fragility = bearish.) Five sources agree the spread's *relative* behavior at trigger is informative; the direction is an empirical question and must be pre-registered two-sided.
**5. Speed and shape of the initial rejection through the level grades conviction.** (Dalton — Open-Drive vs Open-Auction taxonomy, tails "made by time" carry no conviction; Neill — gradual advance on steady volume = durable buying, vertical spike = short-covering; Bellafiore — held-bid absorption precedes real breaks) A decisive drive that doesn't look back differs measurably, at the moment it happens, from a limp tag of the level — this is same-bar shape, not delayed confirmation.
**6. Heavy volume with no price progress = exhaustion, at any timescale.** (Neill — "churning"; Dalton — time-beyond-level without acceptance; Bellafiore — chop zones) A *joint* volume-high + price-stall signature — explicitly distinct from the refuted volume-decline fade.
**7. The open is a structurally thin, high-impact regime; every quote-based feature must be normalized to the name's own trailing baseline.** (Bouchaud ch.4.2 intraday U-shape; CKS — depth 2x lower, impact 5x higher 9:30-10:00; Bellafiore — time-of-day regimes) Not a lever itself — a normalization requirement that guards every hypothesis below against re-deriving the refuted liquidity floor.
## Ranked hypotheses
### H1 — Trigger-erasure / recross fast invalidation (exit_config)
**Convergence: 5 books (Dalton, Bellafiore, Neill, Hasbrouck, Bouchaud). Strongest on the shelf.**
*Statement:* Fires where a post-entry 1-min bar closes back below the ORB trigger price within the first 5 minutes are exhibiting the transitory-impact / balance-re-entry / false-move signature and are disproportionately headed to -1R; exiting on the first such close (rather than riding to the stop) reduces average realized loss without materially truncating winners.
*Computable features (1-min bars only):* `trigger_price` from entry-gate receipts; per post-fill bar, `erased = close < trigger_price`; `first_erasure_bar_index` within a 5-bar window; secondary variant `recross_count` = number of bars whose low trades back through trigger. Trigger must be defined from the OR-high, independent of the stop price (no tautology).
*Draft pre-registration:*
```
population: {min_entry_gap_pct: 0.10, min_day_volume: 300000, price_min: 2.0, price_max: 20.0}
intervention: {kind: exit_config, rule: "exit at market on first 1-min bar CLOSE < trigger_price within 5 bars post-fill; else standing exit stack", sweep: {window_bars: [3, 5], condition: [close_below, low_through]}}
bars: {expR_delta_min: 0.05, min_n: 300}
fidelity: {atr_frac: 0.25, spread_mult: 3, adverse_ticks: 1}
```
*Expected direction:* Erasure fires convert to +1R at a materially lower rate; the early-exit variant lifts fire-weighted expR by shrinking the loser tail.
*Kill criteria:* expR delta < +0.05 across the sweep; OR lost-winner rate > 15% of eventual +1R trades exited by the rule (erasure-then-recovery fakeouts eating the gain); OR the rule's benefit vanishes when BE@+5% ratchet is active (redundant with existing protection).
*Confound guards:* Family resemblance to refuted volume-fade exits — but this is price-structure, not volume, and must independently clear the same bar. Measure lost-winner rate explicitly, not just loss reduction. Use consolidated bar closes, not quote mids, to avoid bid-ask bounce on thin names. Report separately by OR-width tercile so wide-range chop doesn't drive the pooled result.
### H2 — Pre-trigger order-flow persistence gate (keep-or-zero)
**Convergence: 4 books (Bouchaud, Cartea, Neill, Hasbrouck).**
*Statement:* Fires preceded by persistent same-direction bar-level flow (volume-weighted sign agreement over the run-up window) are the signature of an ongoing metaorder/herd and convert better than fires whose pre-trigger flow was choppy/balanced — the trigger is a mid-stream observation of sustained flow, not a one-off spike.
*Computable features (1-min bars only):* Over the last 15 closed pre-trigger bars: `sign_i = sign(close_i − open_i)`; `imbalance_persistence = |Σ sign_i · vol_i| / Σ vol_i`; secondary `agree_frac` = fraction of bars with sign matching breakout direction. No look-ahead into the trigger bar.
*Draft pre-registration:*
```
population: {min_entry_gap_pct: 0.10, min_day_volume: 300000, price_min: 2.0, price_max: 20.0}
intervention: {kind: keep_or_zero_gate, rule: "zero fires in the bottom imbalance_persistence tercile", stratify_by: [gap_pct_bucket, rvol_bucket]}
bars: {expR_delta_min: 0.05, min_n: 300}
fidelity: {atr_frac: 0.25, spread_mult: 3, adverse_ticks: 1}
```
*Expected direction:* Top tercile beats bottom tercile on +1R-before--1R rate; zeroing the bottom tercile lifts kept-population fire-weighted expR ≥ +0.05.
*Kill criteria:* Monotonicity fails across terciles; OR the spread between top and bottom tercile collapses inside gap%/RVOL strata (i.e., it was a refuted selection lever in disguise); OR fewer than min_n fires per tercile.
*Confound guards:* Bar-sign is a crude tick-rule proxy — accept the noise, demand the effect survive stratification by gap% and RVOL (the refuted axes) before believing it. Check redundancy against the surviving runner-grade before shipping as an independent lever.
### H3 — Spread-expansion-ratio at trigger (keep-or-zero, two-sided)
**Convergence: 5 books cite the mechanism (Cartea, Hasbrouck, Bouchaud, CKS, Bellafiore) — but they split on direction, so this is registered two-sided.**
*Statement:* The spread's behavior at trigger, normalized to the name's own trailing baseline, discriminates converting from failing breakouts. Adverse-selection theory (Cartea/Hasbrouck) predicts widening = informed flow = keep; fragility theory (Bouchaud/CKS/Bellafiore) predicts widening = liquidity vacuum = zero. The test determines which regime dominates $2-20 gappers.
*Computable features (15s quote snapshots):* `spread_baseline = median((ask−bid)/mid) over the 10 min pre-trigger`; `spread_at_trigger` from the last snapshot at/before trigger; `expansion_ratio = spread_at_trigger / spread_baseline`; secondary post-fill variant `post_ratio(1min) = spread at t0+1min / baseline`.
*Draft pre-registration:*
```
population: {min_entry_gap_pct: 0.10, min_day_volume: 300000, price_min: 2.0, price_max: 20.0}
intervention: {kind: keep_or_zero_gate, rule: "two-sided: compare top vs bottom expansion_ratio tercile; zero the losing tercile only if pre-registered margin met", normalize: per_name_baseline, stratify_by: [price_bucket, rvol_bucket, minutes_since_open]}
bars: {expR_delta_min: 0.05, min_n: 300}
fidelity: {atr_frac: 0.25, spread_mult: 3, adverse_ticks: 1}
```
*Expected direction:* Two-sided by design; a tercile spread in conversion rate that is stable across the backtest window and survives stratification, in either direction.
*Kill criteria:* No stable tercile ordering across time halves of the window; OR the effect disappears within price/RVOL strata (= liquidity floors relitigated → discard permanently); OR >20% of fires lack a usable pre-trigger snapshot baseline.
*Confound guards:* Ratio-to-own-baseline only, never absolute bps (absolute spread = refuted liquidity floor). Stratify by minutes-since-open (Bouchaud/CKS U-shape mechanically widens everyone's open spread). Test for independent value vs H1 — post-fill spread blowout and price erasure are correlated symptoms of the same reversal.
### H4 — Volume ramp vs isolated-spike trigger (keep-or-zero)
**Convergence: 3 books (Bouchaud, Neill, Hasbrouck).**
*Statement:* Fires where volume built progressively across the pre-trigger bars (a ramp — consistent with an unfinished metaorder still executing) convert better than fires where nearly all volume arrived in the single trigger bar with no build-up (a completed one-shot burst whose impact, per Bouchaud, reverts once done; per Neill, the vertical short-covering spike that "dies at the top").
*Computable features (1-min bars only):* `concentration_ratio = trigger_bar_volume / Σ(volume of preceding 5 bars)`; `ramp_slope = sign of linear volume trend over the last 5 pre-trigger bars`. Strictly pre-trigger — no post-entry volume conditioning (keeps it categorically distinct from the refuted volume-fade exit).
*Draft pre-registration:*
```
population: {min_entry_gap_pct: 0.10, min_day_volume: 300000, price_min: 2.0, price_max: 20.0}
intervention: {kind: keep_or_zero_gate, rule: "zero fires in the top concentration_ratio tercile (isolated-spike triggers)", stratify_by: [rvol_bucket, gap_pct_bucket]}
bars: {expR_delta_min: 0.05, min_n: 300}
fidelity: {atr_frac: 0.25, spread_mult: 3, adverse_ticks: 1}
```
*Expected direction:* Isolated-spike (high concentration) fires convert worse; ramp fires convert better; zeroing spikes lifts kept expR.
*Kill criteria:* No monotone relation across concentration terciles; OR effect collapses within RVOL strata; OR feature is >0.7 correlated with H2's imbalance_persistence on the fire population (redundant — keep only the stronger).
*Confound guards:* Must survive RVOL stratification (day-level RVOL is a refuted axis; this is intrabar structure). Check against how the gap formed premarket (instant-gap vs premarket-ramp names) to avoid re-deriving runner-grade. Single odd-lot block prints on thin names can fake a spike — winsorize trigger-bar volume at a per-name percentile.
### H5 — Post-entry churn/stall exhaustion tightening (exit_config)
**Convergence: 3 books (Neill, Dalton, Bellafiore).**
*Statement:* Positions showing, within the first 3 minutes post-fill, either (a) no new 1-min bar high above the entry bar's high (Dalton: no range extension = weak other-timeframe control), or (b) volume spiking above baseline while price makes no net progress (Neill: churning), are disproportionately failures; tightening the stop to breakeven-minus-buffer on that signal cuts loser size without materially cutting winners.
*Computable features (1-min bars only):* `entry_bar_high`; `first_new_high_bar_index` within 3 bars; joint churn flag on bars t0+1, t0+2: `vol_ratio = bar_vol / trailing_15bar_mean > 2.0 AND |close − entry_price|/entry_price < 0.5 × trailing_bar_range_mean`.
*Draft pre-registration:*
```
population: {min_entry_gap_pct: 0.10, min_day_volume: 300000, price_min: 2.0, price_max: 20.0}
intervention: {kind: exit_config, rule: "on stall (no new high in N bars) OR churn flag, tighten stop to entry − 0.25×ATR; sweep N in [2,3,4]", baseline: current_stop_stack}
bars: {expR_delta_min: 0.05, min_n: 300}
fidelity: {atr_frac: 0.25, spread_mult: 3, adverse_ticks: 1}
```
*Expected direction:* Average realized loss on eventual losers shrinks; eventual-winner capture rate stays within 10% of baseline; net fire-weighted expR ≥ +0.05.
*Kill criteria:* Winner-capture drops >10% at every N in the sweep (whipsaw cost exceeds loss savings); OR the churn leg alone reproduces the refuted volume-fade result (volume component fires without the price-stall component adding anything — then drop the volume leg and keep only price-stall, or kill entirely); OR gains are fully redundant with H1 erasure exits on the same trades.
*Confound guards:* This is a *joint* high-volume+stall or no-new-high signature, never volume-decline (the refuted fade). Run H1 first; only fires H1 doesn't already catch count toward H5's incremental value. Sensitivity-sweep N — real winners on small caps routinely chop 2-3 bars before extending.
## Rejected during synthesis
- **Gap-still-open-at-trigger gate (Dalton)** — single source; heavily confounded with time-since-open and gap% (refuted axis); clean but keep on the bench behind the five above.
- **Round-number proximity gate (Cartea)** — single source; evidence from a $450 large-cap at penny resolution, transfer to $2-20 names unvalidated; mechanically confounded with price level.
- **Time-since-open depth-regime gate (CKS)** — single source; collides with the dead 10:30-cutoff history and with early-trigger/gap% correlation; refuted-adjacent selection flavor.
- **Pre-trigger quote-size imbalance (Cartea/CKS)** — hard dependency on bid_size/ask_size existing in the snapshot logs; unverified = dead on arrival; the paper's OFI variable explicitly needs queue data we don't have.
- **Volume-node thickness at trigger (Bellafiore)** — single source; volume-at-price concentration is RVOL in new clothes without careful shape-normalization; weakest power.
- **Overhead same-day resistance distance (Neill)** — single source, and the book itself flags naive levels as unreliable "until confirmed by the action of the stock."
- **Bid-erosion early exit (Bellafiore)** — single source; 15s sampling too coarse for "held bid"; largely restates mark-to-market drawdown; folded conceptually into H1/H3.
- **Impulse decay half-life adaptive stops (Hasbrouck)** — 5 noisy data points per fire can't support a fitted decay rate; strictly a refinement of H1 if H1 shows signal.
- **Trigger-bar close-location drive gate (Dalton) / trigger-bar volume conviction (Neill)** — too close to the refuted close-above-trigger confirmation family; their live content (shape/participation quality) is already carried by H2 and H4 with better mechanism backing.
- **Everything from Cetin-Danilova** — existence-proof mathematics over unobservable signed order flow; zero computable features.
## Data upgrades that would unlock more
1. **Verify whether bid_size/ask_size are in the 15s quote snapshots** — if yes, the CKS order-flow-imbalance family (the highest-R² predictor on this shelf) becomes partially computable; costs one grep.
2. Tighten quote snapshot cadence to ~5s for watched names in the 5 minutes around triggers — halves the aliasing that weakens H3.
3. Log NBBO at the exact trigger/fill instant in the entry receipts (not nearest-15s) — removes the largest measurement error in every spread hypothesis.
4. Per-minute uptick/downtick trade counts (available from SIP aggregates on some feeds) would upgrade H2's crude bar-sign proxy to a real tick-rule imbalance.
5. Tick-by-tick trades remain the true unlock for trade-sign imbalance and held-bid detection — everything above is the best available proxy without them.