Systematic trading

Inside the black box: the parts of a quantitative trading system

Systematic trading · Published 2026-10-25

Quantitative funds are often called black boxes: money goes in, trades come out, and the logic in between is hidden. In practice, most quant trading systems are built from the same few modules, each answering a different question. Rishi Narang's book Inside the Black Box, first published by Wiley in 2009 and since revised, popularised a clear way of describing them. This article uses that framework to explain how a systematic trading system is put together.

Illustration of a dark cube with a lid slightly lifted, showing labelled modules inside: alpha, risk, cost, portfolio and execution
The modules of a trading system, as an illustration. Image created for Out of Sample, released under CC0.

The overall structure

Narang describes a system in which three models feed a fourth, which hands its output to a fifth:

Data and research infrastructure surround all of them. Separating the parts makes each easier to test and improve, and helps an outsider understand where a strategy's returns and risks come from.

The alpha model

The alpha model is where the strategy's view of the market lives. Narang groups alpha ideas into a handful of families based on what they exploit:

Alpha models can use price data, fundamental data, or alternative data such as text. They can be simple rules or machine-learning models. What matters is that the idea has an economic rationale and survives honest testing, as discussed in our strategy creation guide.

The risk model

The risk model does not try to make money. It identifies exposures that the alpha model is not meant to take and limits them. These can be limits on size (position, sector, gross and net exposure), or limits on exposure to statistical factors such as the market, industries, size, value or momentum. Factor risk models, such as those built on the factors discussed in our article on the Fama-French model, estimate how much of a portfolio's volatility comes from each source. A market-neutral strategy uses the risk model to keep market exposure near zero, so that its returns depend on the alpha rather than on the direction of the market.

The transaction cost model

Every trade costs commissions, the bid-ask spread and market impact, the price movement caused by the trade itself. Market impact grows with trade size relative to available liquidity and is often modelled as proportional to the square root of the trade size relative to daily volume, an empirical regularity reported in several studies. A cost model lets the portfolio construction step decide whether a forecast is strong enough to justify trading. Strategies with weak signals and high turnover are often unprofitable once realistic costs are included.

Portfolio construction

Portfolio construction combines alpha forecasts, risk limits and cost estimates into target positions. There are two broad approaches:

The execution model

Execution decides how and when to trade: order types, timing, routing between venues, and how to split large orders over time. Execution algorithms aim to trade close to a benchmark such as the volume-weighted average price, or to minimise implementation shortfall, the difference between the price when the decision was made and the actual fill prices. At high frequencies, execution and alpha become hard to separate, as discussed in our article on high-frequency trading.

Questions to ask about any black box

Narang wrote partly for investors evaluating quant managers. Without revealing proprietary details, a manager should be able to answer questions such as:

These questions also make a useful checklist for anyone building a system, from a spreadsheet to a fully automated pipeline.

Where the parts interact

The modules are separate on paper but tightly linked in practice. A strong alpha signal can be worthless if the cost model shows that capturing it requires trading too much. A risk model that neutralises a factor may remove the very exposure the alpha model was exploiting, which is why researchers check a signal's factor loadings before deciding what to hedge. Portfolio construction must handle forecasts that arrive at different speeds, such as a fast reversion signal and a slow value signal, without trading the slow one every time the fast one changes. And the execution model's realised costs feed back into the cost model, which should be recalibrated as the fund grows. A useful exercise for a new system is to trace one trade through all five modules and write down every assumption made along the way.

Sources