The Architecture of an Automated Trading System
The six subsystems between a strategy definition and a filled order, what each is responsible for, and where the hard failure modes live.
Topic
The engineering beneath automated trading: data pipelines, order management, reconciliation, risk gates and monitoring.
4 pieces published on this topic · Updated
The interesting engineering in an automated trading system is not the strategy logic. Strategy code is usually short. The difficulty lives in the subsystems around it: normalising market data, deciding whether an order is permitted, submitting it safely, and reconciling what you believe you hold against what the broker says you hold.
The organising principle is that each subsystem owns exactly one thing and can be reasoned about alone. Market data owns time, so nothing downstream invents a timestamp. Strategy evaluation owns nothing. It is a pure function, which is the only way a backtest and a live system can run the same code. A separate risk gate owns the veto, so a strategy bug cannot place an order no rule would have allowed.
Almost every hard bug in this domain is a partial-failure bug. A network call that succeeds at the broker and fails on the way back. A fill that arrives for half the quantity. An authorisation that expires between entry and exit. A system that has not been designed for these does not fail loudly; it drifts out of agreement with reality and keeps trading.
Engineering deep-dives covering this topic.
The six subsystems between a strategy definition and a filled order, what each is responsible for, and where the hard failure modes live.
Inside a backtest: the event loop, how fills are simulated, why lookahead bias appears, and what separates a useful engine from a plausible one.
The retention obligation, the fields an inspection actually asks for, and why "comprehensive logging" is not an answer to the question.
How authorised API access works under the framework, and why the once-per-calendar-week limit on changing an IP breaks naive failover designs.
Describe a strategy in plain language, backtest it against historical data, and paper trade it before any capital is committed.