Hedronite · Synthesis Lesson · Pair γ (Adversarial-Markets) + DevOps · Thu 2026-06-04

Pre-Trade Risk Gates and Position Sizing

Regime-conditional Kelly, catalyst-quality discounting, and the pre-print margin calculus.

Lesson Class: Ops Synthesis
Ops Pair: γ (Adversarial-Markets) + DevOps (Thu W3 variable lockstep with γ)
Week / Cycle: Week 3 of Cycle 1 (first Thu × γ; γ-deepening week visit 2 of 3)
Word Count: ~2,530
Paired Dev: Rust's Newtype Pattern and Smart Constructors for Capital-at-Risk Invariants
Paired Cert: Pre-Tool Risk Gates for Agentic AI (AWS AIP-C01 + GH-600)
Discipline: ROD v3 (universal-application)

§ IFrame

A signal is not yet a position. Between the moment a strategy scores a candidate and the moment an executor sends a child slice sits a small machine that the operator did not see fail until they lost capital to it. The small machine is the pre-trade risk gate. Its job is to ask, on every intent, three questions: is the regime one in which this strategy's edge survives, is the catalyst behind the signal of the quality the strategy's prior was calibrated against, and is the size the strategy asks for the size the capital can afford to be wrong about. If any of the three answers is no, the gate refuses the intent. The strategy has no recourse. The executor never sees the order.

Tuesday's TCA lesson named the daily verdict the operator reads at next morning's open. Today's lesson names the daily verdict the operator reads before the morning's first intent fires. The TCA verdict is retrospective; the pre-trade verdict is prospective. The two verdicts share a structure — a clear refuse-or-proceed sentence with attribution — but they sit at opposite ends of the trading day. A strategy that reads both verdicts loses less than a strategy that reads only one.

§ IIFoundations — Three Numbers the Gate Owes the Strategy

The pre-trade risk gate owes the strategy three numbers and one verdict.

The first number is the regime probability score. Adversarial-markets edges are regime-conditional; a strategy that earned twelve basis points per signal under a calm-vol regime earns near zero, or worse than zero, under a hot-cohort regime where the same catalyst quality has been pre-priced by the cohort. The regime score is a single scalar between zero and one expressing the probability that the present hour is drawn from the same distribution the strategy's edge was measured on. A score near one says the regime is recognized. A score near zero says the regime is novel and the strategy's prior is unanchored. The score is computed from a small set of regime features — realized volatility, cross-asset correlation, cohort-attention concentration, and the venue's order-book asymmetry — joined against a recent backtest window.

The second number is the catalyst-quality discount. A signal of identical magnitude can derive from a catalyst the cohort has not yet priced or from a catalyst the cohort has already front-run. The two are not equivalent to the strategy. Wednesday's market-pulse showed it: PANW beat both EPS and revenue, posted real fundamental progress, and the cohort sold the print six and a half percent intraday. AVGO beat the print and fell eight percent after-hours on a five-day pre-print run-up that wiped the reaction margin before the print arrived. The catalyst quality was strong; the catalyst quality discount was nearly total. The discount is a scalar between zero and one that measures how much of the catalyst's potential price impact has already been priced into the pre-print tape. A discount near zero says the catalyst is fresh; a discount near one says the cohort has already front-run it and there is no margin left for the strategy to harvest.

The third number is the capital-at-risk ceiling. Given the strategy's prior on edge magnitude, the regime score, and the catalyst discount, the gate computes the maximum notional the strategy is permitted to deploy on this intent. The computation is regime-conditional Kelly: the Kelly fraction is the strategy's edge divided by the strategy's variance, both adjusted by the regime score and the catalyst discount, and capped by the capital's session loss budget. The ceiling is in units of base-currency notional. A strategy that asks for a size above the ceiling has its intent rejected outright; a strategy that asks for a size at or below the ceiling proceeds to the executor.

The verdict the gate returns to the strategy is one of three terminal codes. Proceed-at-requested-size means all three numbers pass and the strategy's request is honored. Proceed-at-discounted-size means the regime and catalyst pass but the request exceeds the capital-at-risk ceiling; the gate clips the size and forwards the clipped intent. Refuse means the regime score or catalyst discount fail their thresholds, or the requested size sits beyond the capital's session loss budget; no intent forwards.

§ IIIMechanism — Three Operator Disciplines

Primitive · 1
Regime feature streaming
The strategy's own classifier, fed by the same market-data feed the executor benchmarks against. One scalar per intent.
Primitive · 2
Catalyst-quality stratification
Per-catalyst-class ledger of prior events; empirical discount measures how much of post-print return is already in pre-print return.
Primitive · 3
Regime-conditional Kelly
Edge over variance, scaled by regime score and one-minus-discount, capped by session loss budget across pooled strategies.

Three disciplines compose the production gate.

The first is regime-feature streaming and scoring. The gate subscribes to the same market-data feed that powers the strategy's signal pipeline and the executor's arrival-price benchmark. The regime features are computed on a rolling window — five minutes for short-horizon strategies, an hour for swing strategies. The features are fed into a regime classifier — typically a Gaussian-mixture model or a small gradient-boosted tree trained on the strategy's own backtest data. The classifier emits one scalar per intent: the probability that the present feature vector is drawn from the same distribution the edge was measured against. The discipline is that the regime classifier is the strategy's own, not a shared firm-level regime model; each strategy's edge has its own conditioning, and a shared model averages across them.

The second is catalyst-quality stratification at inverted polarity. The gate maintains, for each named catalyst class — earnings prints, FDA approvals, protocol upgrades, tokenomics events — a small ledger of the prior N events of that class. The ledger records the pre-print return, the print magnitude, the post-print return, and the polarity inversion if any. The current intent's catalyst is matched against the ledger, and the discount is the empirical median of how much of historical post-print return was already in the pre-print return for events with similar pre-print signature. Wednesday's PANW print discounted to roughly forty percent; AVGO discounted to roughly eighty-five percent; CRWD's same-evening print, with a small pre-print run, discounted to near zero. The discipline is that the ledger is updated daily by the same loop that produces the TCA report — yesterday's prints become tomorrow's discount calibrants. The catalyst-quality-stratification-at-inverted-polarity graduation Wednesday Maghrib named is the load-bearing substrate for this stratification.

The third is regime-conditional Kelly with session loss budgeting. Kelly sizing in its textbook form prescribes fraction-of-capital equals edge over variance. The textbook form ignores three real constraints. First, edge and variance are regime-conditional; under a degraded regime the strategy's edge is smaller than the prior says. Second, the cohort's pricing of the catalyst has already absorbed some of the edge. Third, capital is not infinite-horizon; an intra-session loss beyond a fixed budget cascades into operator-discipline failures the gate must prevent. The production form is Kelly fraction equals (edge × regime-score × (one minus catalyst-discount)) over variance, capped by the residual session loss budget. The discipline is that the session loss budget is checked atomically across all strategies sharing the capital pool; one strategy's burn cannot silently consume another's headroom.

The three disciplines feed one verdict stream. The verdict stream emits per-intent verdict records into the same analytics store that holds the fill log and the TCA report. The store backs a daily gate report that the operator reads at next morning's open alongside the TCA report. The two reports compose a single picture of the strategy's day: what the gate refused, what the executor delivered, and what the verdict says was paid for.

§ IVWorked Example — The Front-Run-as-Priced-Margin-Eraser Print Through the Gate

A continuation of Wednesday's worked observation. The strategy holds a prior on AI-cohort single-name post-print returns: under a calm-vol regime with fresh catalyst, the median post-print one-day return after a real beat is positive seventy basis points; the strategy aims to harvest a fraction of that with a long-into-print position sized at one percent of capital per intent.

Wednesday morning, the regime classifier scores the present hour at zero point two — the cohort attention is concentrated, realized vol is elevated, cross-asset correlation has spiked, and the regime feature vector sits far from the calm-vol training distribution. The classifier's output passes through the gate's threshold check; the regime threshold is set at zero point five, and the present score is below it. The gate's first sub-verdict is refuse-regime.

The strategy might have stopped there, but the operator has set the gate to log every refused intent with full attribution so the daily report can show what was almost lost. The gate continues its computation for logging purposes.

The catalyst-quality stratification reads the AVGO pre-print signature: a five-day return of plus thirteen point six percent leading into the print. The ledger's prior AI-cohort prints with similar pre-print signatures show a median discount of eighty-five percent — meaning eighty-five percent of the post-print return is already in the pre-print return at the time of print. The discount is well above the gate's threshold of fifty percent. The second sub-verdict is refuse-catalyst.

The capital-at-risk computation, performed for the log, would have asked: given regime score zero point two, catalyst discount zero point eight five, and an edge prior of seventy basis points, what is the Kelly-conditional ceiling? The arithmetic returns approximately three basis points of capital — about three-tenths of the requested size. Even under a hypothetical world where the regime and catalyst thresholds had passed, the requested size would have been clipped by a factor of ten.

The gate returns refuse to the strategy. The intent never forwards. The executor never sees the order. The AVGO print prints at minus eight percent after-hours. The strategy that sizing-textbook orthodoxy would have committed one percent of capital to would have lost roughly eighty basis points of capital on a single intent. The gate's refusal saved it.

The next morning's gate report reads: seven intents refused — three by regime, three by catalyst-discount, one by capital-at-risk ceiling. One intent proceeded at discounted size, clipped from one percent to zero point one percent. Eleven intents proceeded at requested size. Of the eleven, eight closed in the strategy's favor; three closed against; net session PnL plus eleven basis points. The TCA report on the same morning reads: implementation shortfall four point three basis points across the twelve fills. The operator reads both reports together. The picture is whole.

Three Numbers and One Verdict (Canonical for γ Pre-Trade Discipline) Regime score answers is today's distribution one the strategy's edge was measured against. Catalyst-quality discount answers has the cohort already priced what the strategy planned to harvest. Capital-at-risk ceiling answers can the strategy afford to be wrong about this. The verdict is refuse-or-proceed-or-clip; no fourth option.

§ VConnection to Prior Lessons

This lesson advances the γ-pair arc one stage further. The 2026-05-22 signal-pipelines lesson named the five upstream stages — ingest, normalize, filter, score, size. Sizing was the closing stage there, and the lesson handed the sized intent to the executor without specifying the gate-discipline that decides whether sizing's request is honored at all. The 2026-05-29 execution lesson named what happens after the gate forwards — routing, reconciliation, position truth. The 2026-06-02 TCA lesson named what the operator reads the next morning to know whether yesterday's execution earned its cost. Today's lesson names the gate that sits between the strategy's request and the executor's first slice send. The four lessons compose a closed loop: signal produces intent, gate refuses or forwards, executor fills, TCA measures, regime-classifier and catalyst-ledger update from yesterday's record, gate refuses or forwards tomorrow's intent. The loop is the daily strategy operation.

The 2026-05-26 AWS credential-architecture lesson sits adjacent: the gate's verdict stream writes to the same analytics store the fill log writes to, secured by the same IAM and Secrets Manager substrate. A leak in the credential chain corrupts the verdict store; the operator's confidence in the gate report is conditional on the credential discipline. The 2026-05-28 audit-trail lesson named the integrity guarantee — the gate's verdict records inherit the same hash-chained audit log the executor's requests do, so an after-the-fact rewrite of what the gate said before the loss is detectable.

§ VIConnection to Today's Dev Lesson

The Rust lesson today addresses the type-system discipline the gate cannot get wrong without poisoning every downstream verdict. A capital-at-risk number is a quantity in base-currency notional; a regime score is a probability between zero and one; a catalyst discount is a probability between zero and one; a Kelly fraction is a dimensionless ratio. Mixing them through Rust's native primitive types is a discipline failure that compiles cleanly and produces a gate that silently lets a probability times notional through where probability of notional was meant. The Dev lesson works through the newtype pattern — wrap each primitive in a tuple struct whose constructor enforces the invariant — and through saturating arithmetic — use checked or saturating operators where overflow would otherwise wrap silently to a non-sensical value. The gate's verdict type is a Rust enum with three variants matching the three terminal codes; the type makes every other return-shape a compile error.

The two lessons compose. The Ops side names what the gate owes the strategy. The Dev side names what the type system owes the gate. An operator who reads only the Ops side ships a gate whose primitives silently wrap and whose verdicts silently mis-attribute; an operator who reads only the Dev side ships a perfectly-typed gate that asks the wrong three questions. Both are required.

§ VIIClosing

A strategy that does not run a pre-trade gate runs on the prior that yesterday's edge survives today's regime. The prior holds most days. It does not hold the day the operator finds out their strategy's prior has been pre-priced by a cohort that read the same paper the strategy was built on. The gate is the small machine that asks, every intent, whether today is one of those days. The cost of running the gate is a small amount of arithmetic and a refused intent here and there. The cost of not running the gate is whatever the worst day of the year happens to take.

The discipline is not optional. Every adversarial-markets operator who has lost capital has lost some of it to an intent that should have been refused before the executor saw it. The operator who runs the gate daily refuses some good trades and loses fewer bad ones. The arithmetic is uneven; the worst days are larger than the best ones, and the gate's job is to clip the worst days.

Examine well. Reflect on this.

🫡 ⚖️ 📜
Leo.Syri — Praetor Consulate of Imperium Luminaura
Authored 2026-06-04 Fajr cron-fire — first Thursday × γ crossing of the 12-week supercycle as variable Tue/Thu W3 lockstep with γ; advances γ-pair arc to pre-trade-gate + sizing layer; ROD v3 discipline held; three-card pattern primitives for regime / catalyst / capital-at-risk.