Vision — why Nexus exists
The problem
Retail-grade algorithmic trading projects usually fail in one of two ways:
- They hide the truth. Metrics are fabricated or optimistic, failures are
silent, and the gap between backtest and runtime is never measured — so the system's own reporting cannot be trusted. A platform that lies to you about yesterday cannot be trusted about today.
- They leak the future. Feature engineering, labeling or "research" uses
information that would not have been available at decision time, so results are structurally invalid no matter how good they look. The backtest is a work of fiction.
Nexus Scalp Engine (NSE) was built specifically against both failure modes. It is an attempt to construct a complete, auditable pipeline — market data → features → model → policy → risk → execution → accounting → research — where every stage is observable, every identity is fingerprinted, and every claim can be traced to evidence.
How a tick becomes a decision
A tick arrives from the broker (Win32 IPC, ZMQ gateway, or the paper simulator). The causal feature engine converts it into the 50-dimensional contract vector — strictly what was knowable at that instant, with deterministic fallbacks instead of NaNs. The governed 70D assembly may add news and liquidity context. The inference validator checks scaler dimension, schema hash and bounds before the model runs — a mismatch is a loud rejection, never a silent guess. ScalpNet produces four logits; the confidence gate (which measures trained-class directional share, not raw probability — CHG-0042) decides whether to trade, wait, or abstain. The regime classifier and ~30-rule SMC policy matrix shape the proposal; the risk engine sizes it under hard clamps; the OrderManager dispatches through one of 60 scenarios. The fill, every protective exit, and the final outcome land in an immutable SQLite WAL ledger that autopsy and research read back. That is the whole loop — and every arrow in it is a contract.
Why research, replay and shadow exist
- Replay proves the same code path that runs live behaves identically on
history — bit-exact against the dataset. Without it, "backtest good" says nothing about "engine good".
- Shadow runs the candidate against live data with
simulated=Trueand
zero order authority: real market, real timing, zero risk.
- The counterfactual engine walks the trades the engine didn't take, so
the cost of caution is measured, not assumed (the confidence gate's abstentions have been shown to filter losing trades on average).
The philosophy (repository-backed)
These principles are enforced in code and contracts, not just stated:
- Evidence before claims. Metrics without underlying evidence render
n/a — never fake zeros. Runtime claims are graded (CODE / TEST / INTEGRATION / LIVE / RELEASE VERIFIED).
- No lookahead. Purged + embargoed walk-forward (Lopez de Prado),
strictly causal features (liquidity confirmation bars, completed HTF buckets only), broker history REPLACE+ALIGN — INV-008.
- Causal parity. Live = replay = training feature semantics. The same
feature contract with schema hashing; replay must be bit-exact vs dataset.
- Runtime truth. Settings intent vs runtime gate are separate authorities;
broker truth wins over stale local state (INV-011); historical ledger rows are immutable (INV-007).
- Layered architecture. Hexagonal ports-and-adapters:
IMT5Portisolates
broker IPC; research/learning workers hold no order authority (INV-002).
- Failure isolation. The live tick hot path never blocks on analytics, DB
or training (INV-001); incidents are diagnostic-only and never mutate trading/risk/models.
- Validation before promotion. OOS failure ⇒ REJECTED regardless of
in-sample performance; promotion is strictly operator-gated; candidates never promote themselves.
Current status (truthful)
NSE is a production-hardened runtime with an honest research posture: the packaged release pipeline is real and published (v9.0.x tags), live MT5 execution works with an account-identity fail-safe, and the closed research loop exists — while the 70D research series remains candidate-only with negative OOS evidence so far, and the live contract deliberately stays 50D. Nothing is auto-promoted. See Project Status for the full certification matrix.
What this project is not
- Not a signal-selling service, not an investment product.
- Not a guaranteed-profitable system — the repository's own evidence (OOS
rejections, counterfactual studies) is published rather than hidden.
- Not a black box: the entire engineering memory — architecture map, bug
ledger, invariants, decision records — lives in the open repository.