Opens in a new tab
Home / Blog / Machine Learning

Algorithmic Trading: How the Systems Actually Work

Algorithmic trading is less about market prediction than it is about execution, risk control and not fooling yourself in the backtest. Here's how the systems are actually built.

SoftmaxAI EngineeringPublished January 20, 2026Updated August 25, 202613 min read
Topic
How algorithmic trading systems are designed and tested
Strategy families
Arbitrage · mean reversion · trend · execution
Biggest pitfall
Backtests that leak future information
What decides survival
Risk controls and costs, not prediction

What algorithmic trading actually is

Algorithmic trading is the use of computer programs to make the decision and execute the trade according to a set of rules — covering the whole spectrum from a bank executing a large institutional order in a way that minimises market impact, through to a systematic fund holding a position for weeks and a market maker who is constantly quoting. The commonality in all of these cases is that a system, not a person, makes the decision at the moment it is made.

It's worth separating out two activities which are so often lumped together. Alpha generation is the business of deciding what to hold and when to hold it; execution is the business of deciding how to get in and how to get out. Most of the automated volume in the industry is execution, and most of the durable value in algorithmic trading systems is to be found in execution too. It's a better-defined problem and it has a much clearer measure of success.

Nothing in this article is investment advice. It's a description of how these systems are built, which is a different issue to whether or not any particular strategy is a good one.

The main strategy families

  • Arbitrage. Exploiting price differences for the same or equivalent instrument across venues or forms. In concept the cleanest, in practice the hardest, as it is a speed race and the opportunities close as participants arrive.
  • Mean reversion. Betting that a price which has moved away from a statistical relationship will return to it. Works until the relationship breaks — and it breaks exactly when the position is largest and the loss is greatest.
  • Trend following and momentum. Betting that a move continues. Wins very infrequently but with big payoffs, which in turn requires the discipline to stick with it through long drawdowns that can easily feel like the strategy has simply stopped working.
  • Statistical models. Multi-factor models which attempt to estimate expected returns from a large number of inputs. This is the area where machine learning is most frequently applied and where overfitting does the most damage.
  • Market making. Quoting both sides continuously and earning the spread, while managing the accumulated inventory risk. Fundamentally an inventory and adverse-selection problem.
  • Execution algorithms. Not alpha at all — a large order being split across time and venues to minimise market impact. The largest category by volume and the most measurable.

How a trading system is put together

The architecture is more revealing than the strategy, as that's where the majority of the failures come from.

  1. Market data ingestion. Normalising feeds from a number of venues, dealing with gaps and corrections, and consistent timestamping. If this is done in a sloppy fashion, it silently corrupts everything that comes downstream.
  2. Signal computation. Taking the raw data and turning it into the features that the strategy actually uses — and doing it in exactly the same way in backtest as in live, which is harder than it sounds and a very common cause of divergence.
  3. Portfolio construction. Taking the signals and converting them into target positions subject to constraints: exposure limits, concentration rules and capital allocation.
  4. Order generation and routing. Working out what type of order, what size, what venue and when to place it, in order to get to the target position at a reasonable cost.
  5. Risk management. Pre-trade checks which reject orders that breach limits, and real-time monitoring which can halt trading. This layer must be independent of the strategy logic.
  6. Reconciliation and reporting. Confirming that the positions the system thinks it holds are in fact the same as those reported by the broker and the custodian. A divergence in this area is an emergency, not a discrepancy.

The consistency between the backtest and live execution needs to be stressed. If the research code and the production code compute a feature differently — however slightly — then the strategy you backtested is not the strategy you actually deployed. The standard way of dealing with this is to ensure that the exact same computation path is used in both.

Why most backtests are wrong

A backtest is a simulation, and simulations always flatter their authors. These are the errors you see most often, in rough order of the damage they do.

ErrorWhat it looks likeCorrection
Lookahead biasUsing data not available at decision timeTimestamp everything by availability, not by event
Survivorship biasTesting on instruments that still exist todayUse a universe including delisted instruments
Unrealistic fillsAssuming execution at the mid or the closeModel spread, slippage, and partial fills
Ignoring costsGross returns presented as netInclude commission, fees, financing, and impact
Overfitting by iterationThe hundredth parameter set looks excellentHold out data never used for selection
Regime dependenceTested only on a favourable periodTest across regimes, including crises
Capacity ignoredStrategy assumes unlimited liquidityModel impact as a function of size
Common backtesting errors

The pattern is that each of these errors tends to improve the results rather than degrade them. That asymmetry is the clue: if a backtest looks great, the first thing you should think is that something is wrong with it.

Where machine learning genuinely helps

Financial markets are the most unforgiving environment for machine learning. The signal-to-noise ratio is very low, the data is non-stationary, and any pattern that is exploitable is quickly competed away as it's discovered. The classic and very expensive mistake is to apply a flexible model to price data and expect to be able to predict direction.

  • Execution cost prediction. Forecasting market impact and slippage for a given order size and market state is a well-posed supervised problem with a huge amount of labelled data, and that's precisely where machine learning is most likely to deliver.
  • Alternative data processing. Extracting structured signal from text, imagery or transaction data. The modelling is pretty standard; the advantage is in having the data and processing it faster.
  • Regime classification. Identifying what market state you're in, so that a strategy can adjust its exposure rather than trying to predict returns directly.
  • Risk estimation. Forecasting volatility and correlation, which is far more tractable than forecasting returns and is directly useful for sizing.
  • Anomaly detection. Spotting when the live behaviour differs from what the system expects — a monitoring application which picks up problems before losses have built up.

Our market movement forecasting case study demonstrates this in practice. The system generates a set of candidate directional signals which are then assessed by the research team — the human has the final say, and the model is simply used to focus the search.

Risk controls that matter

  • Pre-trade limits, independently enforced. Maximum order size, position and exposure are checked outside of the strategy code, so a strategy bug cannot circumvent them.
  • Kill switches with clear triggers. Defined conditions under which trading is halted, and named people who can invoke a halt without having to obtain permission first.
  • Loss limits at several horizons. Daily, weekly and drawdown limits which reduce or stop trading, agreed in advance rather than debated on a bad day.
  • Continuous reconciliation. Automated comparison of internal positions against broker records, with divergence treated as an incident.
  • Fat-finger and sanity checks. Rejection of orders which are absurd in relation to normal size or price — the cheapest control available and in many cases the most effective.
  • Graceful degradation. Defined behaviour for when a feed dies or a venue drops off. The sensible default is usually to stop trading and flatten, rather than carry on trading on stale data.

How SoftmaxAI builds trading infrastructure

We build our financial systems the same way we build everything else. We have a written, client-approved specification prior to any code. We have an agent-accelerated build led by senior engineers. And every decision that matters is owned by a human.

  • Data and reproducibility first. Point-in-time correct data with availability timestamps, and a single computation path shared between research and production, so the strategy being tested is the one that's actually deployed.
  • Honest evaluation. Out-of-sample discipline, realistic cost and fill modelling, and capacity analysis. We report what a result is actually worth, including when the result is disappointing.
  • Risk as an independent layer. Limits and halts are enforced outside of the strategy logic, so a bug in a model can't disable the control that contains it.
  • Human-owned decisions. The model output narrows where to look; the allocation and risk decisions remain with your own research and risk teams. That's the pattern in our finance work.

Algorithmic tradingBacktestingExecutionRisk managementMarket microstructureQuantitative financeTime seriesMLOps

FAQ

Questions we get asked.

What is algorithmic trading?
The use of computer programs to decide and execute trades in accordance with a set of rules. This encompasses execution algorithms which break down large orders so as to have a minimal impact on the market, systematic strategies which hold a position for days or weeks, and market making, which involves continuous quoting. The vast majority of automated volume is in execution rather than alpha generation.
Does machine learning work for predicting markets?
Poorly for predicting direction, as the signal-to-noise ratio is very low, the data is non-stationary and the patterns you find are competed away as you find them. It is much better at execution cost prediction, volatility and risk estimation, regime classification, extracting signal from alternative data and anomaly detection in the live system.
Why do backtested strategies fail live?
Typically because the backtest contained an error that gave it an unrealistic boost: using data that wasn't actually available at the time of the decision, testing only on instruments that still exist today, assuming unrealistic fills, omitting costs, selecting parameters by repeatedly iterating on the same data, or testing on a single, favourable market regime.
What is more important, the signal or the execution?
For most strategies, execution. A small edge executed properly will survive; a big edge lost through spread, slippage and market impact won't. Execution is also a far better-defined engineering problem with a much clearer measure of success, which is why most of the durable value in a trading system is in execution.
What risk controls does an algorithmic trading system need?
Pre-trade limits enforced separately from the strategy code, kill switches with defined triggers and named people who can activate them, loss limits at both daily and drawdown levels which are agreed in advance, continuous position reconciliation against the broker records, sanity checks on order size and price, and defined behaviour in the event of a data feed or venue failure.
Can a small team build an algorithmic trading system?
The infrastructure (data handling, backtesting, execution, risk controls) is very much within the capability of a small, competent team, and that's the part most often under-invested in. The difficulty isn't in building the system but in finding an edge that can survive the costs and the competition, which is a research problem rather than an engineering problem.
Start here

Building trading or research infrastructure? Let’s talk — free.

A 30-minute call with our engineers, not a salesperson. You'll get a genuine read on the architecture, the data requirements and what your evaluation is actually telling you.