The trading pipeline
- Market data ingestion. Websocket and REST feeds bring in price, order book, funding, and open interest with explicit freshness.
- Feature extraction. Raw data becomes features — price action, volatility, volume, structure, microstructure — each carrying freshness and confidence.
- Strategy / book classification. The current market is classified into scenario books and regimes; each book is read-through and non-authoritative.
- Candidate generation. Books emit candidate setups. A candidate is not a trade — it must clear every downstream gate.
- Pre-trade risk controls. Bounded leverage, bounded concurrency, fractional Kelly sizing, minimum reward-to-risk, and minimum-notional floors are applied.
- EV and fee gate. The net-positive expected-value gate (after fees) enforces that a candidate is economically worth taking.
- Execution planning. The surviving candidate is turned into an order plan — size, order type, protection geometry.
- PostOnly order path. Entries are PostOnly-first (maker); a fill is confirmed before a position is considered opened.
- Protection attach. A guaranteed stop-loss and take-profit are attached; an unprotected position is blocked or flattened.
- Exchange / DB reconciliation. Exchange state and platform state are reconciled continuously so the two never silently diverge.
- Close classification. When a position closes, the close is classified — terminal vs deferred, clean vs dirty/ghost.
- Attribution. The closed trade is attributed to its book, regime, symbol, and session with realized net PnL.
- Evidence packet. Attributed closes accrue into the §18 evidence corpus that governs live promotion.
- Auto-demotion / operator review. Decaying edge is auto-demoted; live activation stays an evidence-gated, operator-owned decision.