Building a trading system
∞structuralFeed handler, book builder, strategy, order manager, risk gate. The components are the same whether you run from a laptop or a colo rack; only the latency budget changes.
The idea
What this shows. Every trading system is the same pipeline: market data flows in through the feed handler and book builder to the strategy, and orders flow back out through OMS/EMS and a mandatory risk gate to the venue. A strategy only earns its way onto that pipeline through a gated loop – idea, backtest, paper, live – where most candidates die at the backtest gate and live results feed back to refine or retire the idea.
What are the components of a trading system, in order?
A trading system is a chain. Gateways connect to the venue; a feed handler decodes market data; a book builder reconstructs the order book; a strategy computes a signal and decides; an OMS/EMS tracks and routes orders; a risk gate enforces limits and can kill everything; and the order gateway puts orders on the wire. Each stage consumes the previous stage's output, which is why the diagram above reads strictly left to right, from market data in to orders out.
Taking the upstream half in order: connectivity is the sessions to the venue, an inbound multicast feed subscription and an outbound order-entry session, two channels with two protocols. The feed handler decodes the venue's wire protocol (FIX, ITCH, SBE), handles sequencing and gap recovery, and emits normalised events; it is the first and most latency-sensitive stage. The book builder applies those increments to rebuild the limit order book in memory, the system's live view of the market. The strategy reads the book and the tape and computes a signal, such as a microprice, an order-flow imbalance (defined by Cont, Kukanov and Stoikov, 2014, who link it to short-horizon price changes) or a statistical-arbitrage spread, and decides whether and what to trade. This is where the edge lives; the rest is plumbing that must not lose money.
Then the downstream half. The OMS/EMS splits in principle into the Order Management System, which tracks the state of every order and your positions, and the Execution Management System, which decides how to work an order across venues: the routing and execution-algorithm layer. Small systems merge the two. The risk gate sits between the strategy's decision and the wire and runs pre-trade checks in-line: maximum order size, price collars, message-rate limits and a maximum position, plus a kill switch. Regulated firms are required to have these controls. In the US, SEC Rule 15c3-5 requires broker-dealers with market access to apply controls reasonably designed to stop orders that exceed pre-set credit or capital thresholds or that appear erroneous, under the firm's "direct and exclusive control". In the EU, RTS 6 (Delegated Regulation 2017/589) sets out price collars, maximum order values and volumes and message limits in Article 15, and Article 12 requires "kill functionality" that can cancel any or all unexecuted orders on any or all venues. A solo trader on a crypto venue is not directly bound by either rule, and should copy the design anyway. Finally the order gateway encodes the order in the venue's protocol and sends it, closing the loop that began at the feed handler and bounding tick-to-trade.
Knight Capital shows why the risk gate and the build order matter. On 1 August 2012, according to the SEC's order in the matter (Release 34-70694), new code was deployed while old "Power Peg" code remained callable. While processing 212 small retail orders, Knight's router sent millions of orders in about 45 minutes, producing over 4 million executions in 154 stocks for more than 397 million shares, and a loss of over $460 million. The SEC charged a Rule 15c3-5 violation.
What is the model-development lifecycle, from idea to live?
A strategy passes four gates: idea (a hypothesis about an inefficiency), backtest (test it honestly on history), paper trade (run it live against the real market with no real money) and live (real capital, small, scaling only on evidence). Each gate kills most candidates, and the arrows in the lifecycle loop above also point backwards, because live feedback refines the idea.
1. Idea. A specific, falsifiable claim ("order-flow imbalance predicts the next move at this horizon on this venue"), because vague ideas cannot be tested or killed. It should be grounded in the microstructure, data and strategy sections. 2. Backtest. This is where most strategies should die. The backtesting page covers how a backtest lies (look-ahead, survivorship, optimistic fills, overfitting) and how to make it honest. A strategy that only works in a dishonest backtest is not a strategy.
3. Paper trade. Run the strategy against the live market, with the real feed, real latency and real adverse selection, but send orders to a simulator or paper account. This catches what a backtest cannot: real-time data problems, infrastructure bugs, your own latency, and whether the edge survives a market that did not exist when your sample was recorded. The EU makes a version of this gate mandatory. RTS 6 Articles 6 and 7 require investment firms to test conformance with a venue's system before first access and before deploying or materially updating an algorithm, in testing environments separate from production. 4. Live, small, scaling on evidence. Start with minimal capital and tight risk limits, compare realised performance with the backtest and paper expectation, and scale only as live results confirm the edge, watching capacity and alpha decay as size grows. Most of the edge found in backtest is gone by here, and the survivors are the business.
It is a loop, not a line: live results feed back into the idea, so you refine the signal, re-parameterise, and retire it when it decays. That is the research-to-production pipeline seen as a cycle.
What is the difference between an OMS and an EMS?
An OMS (Order Management System) keeps the state: the authoritative record of every order's lifecycle and your current positions and exposures. An EMS (Execution Management System) makes the execution decisions: how to slice, time and route an order across venues to minimise cost. The OMS is the ledger and the EMS is the execution brain.
The OMS tracks each order through its states (sent, acknowledged, working, partially filled, filled, cancelled, rejected), reconciles against execution reports, maintains positions and P&L, and is the source of truth the risk layer reads. If its state diverges from the venue's you are flying blind, so reconciliation is a core, unglamorous correctness problem. Given a parent order, the EMS decides which venues to use (smart order routing), on what schedule and how aggressively, to limit market impact and slippage; the execution-algorithm pages live here.
In an HFT market-making system the line blurs, because the strategy is its own execution. For anyone trading meaningful size the distinction matters: one component owns truth, another owns policy.
How do you build this as one person in 2026?
You buy or rent everything undifferentiated and build only the edge. Cloud rents the compute for research, backtests and, for non-speed strategies, live trading. Open data from crypto venues and prediction markets removes the old barrier of expensive data. AI-assisted development writes the feed handlers, the OMS state machine, the backtest harness and the glue. Your scarce judgement goes on the strategy and on validation.
Start by picking a game where speed is not the edge, the honest conclusion of the colocation and FPGA page: statistical arbitrage, slower market making, cross-venue work, crypto, Polymarket. The microsecond-and-slower band is contestable by one engineer; the nanosecond frontier is not. Cloud VMs mean no capex and no server room, at the cost of an explicit latency trade-off. On data, crypto venues publish aggregated L2 books everywhere and order-level L3 on a few, such as Coinbase Exchange, whose docs describe Level 3 as "non-aggregated" and the entire order book, recommended for keeping a real-time book over WebSocket (see the data anatomy page for what each level contains). Polymarket's market WebSocket streams book, price_change and last_trade_price events. Equity and futures history is buyable, and the data pages cover what you get and its pitfalls.
Then let AI write the plumbing: a feed-handler parser from a protocol spec, the OMS state machine, a backtest harness and test fixtures, work that once needed a team (see what AI changes for HFT). Keep the judgement human: what to build, whether a backtested edge is real, how to validate fills, when to scale and when to pull the kill switch. The AI does the typing and you do the thinking. This works below the speed tier only; a solo builder cannot win the nanosecond race, and the full argument is on the going-independent page.
What is the minimum viable build order?
Build the read path before the write path, and the simulator before the live connection. A sensible order is: (1) connect a feed and build the book; (2) record and replay it; (3) build the backtest and simulation harness; (4) write the strategy and prove it in backtest; (5) add the OMS/EMS and risk gate; (6) paper trade; (7) go live small.
(1) Feed and book builder: subscribe, decode, reconstruct the order book and confirm it matches reality, because nothing works without a correct book. (2) Record and replay: capture the message tape so you can replay it deterministically, the foundation of debugging and backtesting. (3) Harness: build the honest backtester, with market replay and queue and fill modelling, before you have a strategy, so the strategy is tested honestly from day one. (4) Strategy: write the signal and prove or kill it; most ideas die here, which is the harness working.
(5) OMS/EMS and risk gate: order state, routing and the pre-trade risk checks and kill switch, built before any order can reach a live venue. (6) Paper trade: live against the real market with simulated execution. (7) Live, small: real capital, tight limits, scale on evidence. The ordering principle is blunt: you can lose money the instant the write path is live, so everything that validates and constrains comes first. Build the parts that can only teach you (feed, book, backtest, paper) before the parts that can cost you.
Worked example: a one-person crypto market maker
Take a concrete sketch of a one-person crypto market-making system, with illustrative durations, to make the architecture and lifecycle tangible. It exercises every block in the diagram above, at millisecond rather than speed-tier latency.
Components. A feed handler decoding one crypto venue's WebSocket snapshot-plus-diff feed; a book builder maintaining one symbol's L2 book; a microprice-and-inventory strategy in the style of Avellaneda–Stoikov (Avellaneda and Stoikov, 2008, for the inventory skew; Stoikov, 2018, for the microprice); a combined OMS/EMS placing and amending two-sided quotes; a risk gate with a maximum-position limit and a kill switch; and an order gateway over the venue's REST and WebSocket order API. Infrastructure: a single cloud VM near the venue's region, with millisecond latency that is fine for slower market making and hopeless for latency arbitrage, and no colocation, no FPGA and no capex.
Lifecycle. The idea is to quote around the microprice and skew on inventory. The backtest replays a month of recorded book data through the honest harness with realistic queue and fill modelling and fees; kill it if the edge is just ignored costs. The paper stage runs live quoting into a simulator for two weeks, measuring the realised spread captured against adverse selection paid. The live stage uses tiny size and tight limits, scaling only as realised P&L tracks expectation and watching capacity and decay.
Where the time goes tells the story. The plumbing (feed handler, book, OMS, harness scaffolding) is days, not months; validating that the backtested edge survives paper trading and live fees is where the weeks go. That ratio is the shift the going-independent thesis turns on. Fees and API limits differ by venue and change often, so the venue's own documentation is the reference for those.
Sources
- Avellaneda, M. and Stoikov, S. (2008). "High-frequency trading in a limit order book". Quantitative Finance 8(3), 217–224. doi.org
- Stoikov, S. (2018). "The micro-price: a high-frequency estimator of future prices". Quantitative Finance 18(12), 1959–1966. doi.org
- Cont, R., Kukanov, A. and Stoikov, S. (2014). "The Price Impact of Order Book Events". Journal of Financial Econometrics 12(1), 47–88. doi.org
- SEC. "Risk Management Controls for Brokers or Dealers with Market Access", Release No. 34-63241 (Rule 15c3-5), 3 November 2010. sec.gov
- SEC. In the Matter of Knight Capital Americas LLC, Release No. 34-70694, 16 October 2013. sec.gov
- Commission Delegated Regulation (EU) 2017/589 (RTS 6, organisational requirements for algorithmic trading), 19 July 2016. eur-lex.europa.eu
- Coinbase Developer Platform. Exchange API, "Get product book". docs.cdp.coinbase.com
- Polymarket. "Market channel" (WebSocket). docs.polymarket.com