# What an Algo Trading System Is Made Of: Data, Signal, Risk, Execution, Monitoring

AI agents: this is one page from QuantIDE's site, in Markdown.
Canonical HTML: https://www.quantide.io/guides/what-an-algo-trading-system-is-made-of
Full index of Markdown pages: https://www.quantide.io/llms.txt
Full text of recent articles: https://www.quantide.io/llms-full.txt

---
*2026-11-21 · QuantIDE Team · 5 min read*

An algo trading system is five stages in a loop: data, signal, risk, execution, monitoring. Here is what each one does, where each one fails, and the whole loop running.

## In brief

- An algo trading system is five stages in a loop: data, signal, risk, execution, monitoring — and a system fails at its weakest stage.
- Risk decides the size, not the signal: 1% of equity per trade, sized by distance to the stop; risk can also veto a trade entirely.
- Monitoring is automated, not alerts: drawdown tracked on every bar with a kill-switch that halts the system without a human.
- The demo loop ran end to end on 200 synthetic bars: 4 signals, 2 closed trades, final equity $118,039.34, max drawdown 0.01% — proof of plumbing, not of the strategy.

## The short answer

An algo trading system is five stages in a loop: data feeds the signal, the signal proposes a trade, risk decides the size, execution places the order, and monitoring watches the whole thing and can shut it down. That is the entire machine. Every system that trades for real — from a desk running one strategy on a laptop to the buy-side algorithms that now run roughly 70% of institutional equity volume at the largest US asset managers — is some version of those five stages. If one stage is weak, the system is weak there, no matter how clever the signal is.

## 1. Data: the feed everything else eats

Data is the stage nobody wants to build and everybody blames when the backtest lies. A system needs prices it can trust: timestamps that line up, adjustments for splits and dividends, and a feed that does not quietly drop symbols that stopped trading. Survivorship bias lives here — test only on the stocks that survived and every strategy looks brilliant.

Start with your broker's own data. Alpaca's paper environment, for example, ships with a $100,000 simulated balance and its own market-data feed, which is enough to build the loop before paying for a vendor. The rule for this stage is simple: if you cannot explain where a bar came from, do not let a signal read it. Run the strategy through the [backtesting guide](/guides/how-to-backtest-a-trading-strategy-in-python) first — that is where bad data gets caught, before real money is anywhere near it.

## 2. Signal: the rule that decides

The signal is the only stage that knows anything about trading. It turns data into a decision: buy, sell, or do nothing. A moving-average crossover is the honest starting point — fast average crossing above slow means buy, crossing below means sell. It is simple, deterministic, and testable, which is exactly what you want while the rest of the system is still being built.

Two disciplines matter here. First, the signal must be reproducible: same data, same decision, every time. Second, it must be timestamped — a signal computed on a bar that closed at 10:00 cannot trade at 9:59. Most backtest lies are born in this stage, as look-ahead: the signal peeking at data that did not exist yet when the decision was supposedly made. Keep the signal boring and the plumbing honest, and the system stays debuggable.

## 3. Risk: the stage that decides the size

Risk is the stage that turns a signal into a position. A buy signal is not a size; risk supplies the size, and it can also veto the trade entirely. The working rule is the 1% rule: risk no more than 1% of equity on any single trade, with the distance to the stop setting the share count. A $100,000 account risking 1% with a $5 stop buys 200 shares — and a wider stop buys fewer shares, automatically.

That arithmetic is the whole point of the stage, and the [position sizing guide](/guides/position-sizing-systematic-traders-how-much-risk-per-trade) works through it in full, including why fixed fractional sizing beats fixed share counts over time. Risk also owns the kill-switch: a maximum drawdown that halts the system. The signal never gets a vote on that. When the drawdown limit trips, the machine stops, and a human decides whether it restarts.

## 4. Execution: where the plan meets the market

Execution turns a sized order into a fill, and the market charges for the difference. A market order buys at whatever price is available; a limit order buys only at your price or better. Fills can be partial. Slippage is real even on paper — Alpaca's simulator fills against current quotes but does not simulate slippage, market impact, dividends, or regulatory fees, so a paper fill proves the wiring works, not that the strategy makes money.

This is the stage where your broker's API actually matters. Alpaca is REST-based: HTTPS requests to an API host, no local software. Interactive Brokers works through the Trader Workstation API, your code talking over a local socket to TWS or IB Gateway. With TWS API 10.40, Interactive Brokers shipped a synchronous wrapper that returns values directly instead of through separate streaming callbacks — the classic async plumbing, collapsed — and the official docs were updated for it on October 20, 2026. The [broker API guide](/guides/connect-python-to-broker-api-first-automated-order) walks through both, paper first. Interactive Brokers is also one of the brokers a system can go live on via [QuantIDE for Interactive Brokers](/for/interactive-brokers).

## 5. Monitoring: the stage that never sleeps

Monitoring is the stage most first systems skip, and it is the one that saves the account. It tracks equity against its peak, computes drawdown continuously, logs every fill against its intended price, and halts the system when a rule breaks. Alerts are not monitoring — a text message is the trader's side. Monitoring is automated: conditions checked on every bar, with a halt that needs no human in the loop to trigger.

The professionals monitor because the machine never sleeps. Buy-side-controlled algorithms crossed roughly 70% of institutional equity volume at the largest US asset managers in 2025, according to SIFMA, SEC MIDAS, CBOE, and Nasdaq data — and none of those desks runs a system without a kill-switch. The monitoring stage is what makes an automated system something you can walk away from.

## The whole loop, running

Here is all five stages in one script, executed against 200 synthetic daily bars with a fixed seed — the numbers below are the actual output, not an illustration:

```python
import random
random.seed(42)

# Stage 1: DATA — synthetic bars, as if from a market-data feed
prices = [100.0]
for _ in range(199):
    prices.append(prices[-1] * (1 + random.gauss(0.0004, 0.012)))

# Stage 2: SIGNAL — SMA(10) vs SMA(30) crossover
def sma(s, n, i):
    return sum(s[i - n + 1:i + 1]) / n
signals = []
for i in range(30, len(prices)):
    fast, slow = sma(prices, 10, i), sma(prices, 30, i)
    pf, ps = sma(prices, 10, i - 1), sma(prices, 30, i - 1)
    if pf <= ps and fast > slow: signals.append((i, "BUY"))
    elif pf >= ps and fast < slow: signals.append((i, "SELL"))

# Stages 3-5: RISK (1% rule), EXECUTION (slippage + commission),
# MONITORING (drawdown kill-switch at 10%)
equity, position, peak, max_dd, halted = 100_000.0, 0, 100_000.0, 0.0, False
for i, side in signals:
    if halted: break
    price = prices[i]
    if side == "BUY" and position == 0:
        shares = int((equity * 0.01) // (price * 0.02))
        fill = price * 1.0001 + 0.005
        position, entry = shares, fill
    elif side == "SELL" and position > 0:
        fill = price * 0.9999 - 0.005
        equity += position * (fill - entry)
        position = 0
    mark = equity + (position * (price - entry) if position else 0)
    peak = max(peak, mark)
    max_dd = max(max_dd, (peak - mark) / peak)
    if (peak - mark) / peak > 0.10:
        halted = True
```

The run produced 4 signals over 200 bars, 2 closed trades — both winners on this synthetic series — and final equity of $118,039.34 on a $100,000 start, with a maximum drawdown of 0.01% and the kill-switch never tripped. Read that result for what it is: proof the five stages connect and run, not proof the strategy makes money. The data is synthetic, the sample is two trades, and a two-trade win rate means nothing. What the run does prove is the plumbing — a signal fired, risk sized it, execution filled it with costs applied, and monitoring watched the drawdown on every bar.

## What to do next

Build one stage at a time, in order, and do not skip monitoring to get to live trading faster. The full five-stage loop is the same system described in [Automating a Trading Strategy End to End](/guides/automating-a-trading-strategy-end-to-end); this piece is the map of its parts, and that piece is the assembly. Run the loop above on paper data, then swap the synthetic feed for your broker's paper feed and change nothing else. If you would rather have an engineer build the loop — data, signal, risk, execution, and monitoring — than assemble it yourself, that is what the engineering desk inside [Blackshore Technologies](https://www.blackshoretechnologies.com/) does: describe the strategy, it comes back built, with the monitoring included. Either way, the first version runs on paper. No exceptions.



## Frequently asked questions

### What are the parts of an algorithmic trading system?

Five stages in a loop: data, signal, risk, execution, monitoring. The signal is the only stage that knows anything about trading; the other four are plumbing that keeps the signal honest.

### Which stage matters most for not losing money?

Risk — specifically position sizing. A signal without a sizing rule is a bet sized by mood. The 1% rule (risk 1% of equity per trade, sized by distance to the stop) is the standard starting point.

### Is monitoring just getting alerts when something moves?

No. Monitoring is automated: drawdown and fill checks on every bar, with a halt that triggers without a human. Alerts are the trader's side — useful, but not a substitute for a kill-switch.

### Can I run this five-stage loop myself?

Yes — the demo in this article runs the whole loop on synthetic data with a fixed seed. Swap the synthetic feed for your broker's paper feed and change nothing else for the first live-data run.


## Sources

- [Paper Trading Journal — Algorithmic Trading Statistics 2026](https://papertradingjournal.com/2026/03/12/algorithmic-trading-statistics/)
- [TechBullion — Algorithmic Trading in US Markets in 2026 (SIFMA / SEC MIDAS / CBOE / Nasdaq data)](https://techbullion.com/algorithmic-trading-in-us-markets-in-2026-how-the-buy-side-quietly-took-the-reins-from-the-sell-side/)
- [Interactive Brokers — TWS API 10.40 Synchronous Wrapper introduction](https://www.interactivebrokers.com/docs/tws-api/sync-doc/introduction)
- [Alpaca — Build and Backtest Bollinger Bands with Alpaca's Trading API](https://alpaca.markets/learn/how-to-build-backtest-bollinger-bands-strategy-with-alpaca-mcp-server)

*Educational content, not investment advice. Trading involves risk of loss.*