Skip to content
Systems & Backtesting

What Is Algorithmic Trading?

From market data to a live order — and everything a convincing backtest can hide

16 min read

Algorithmic trading uses software to make or execute trading decisions under predefined rules. The algorithm may decide what to trade, when, at what price, in what quantity, or how to route and split an order. It does not need artificial intelligence, and it is not automatically high-frequency trading.

The short answer

An algorithm converts data into an action. A serious trading system must also decide position size, enforce risk limits, model execution costs, reconcile with the broker, and stop safely when data or infrastructure fail. Automation can improve consistency and measurement; it can also repeat a bad assumption faster than a human could.

The full decision pipeline

A signal is only one layer. The system must transform an estimate into a feasible portfolio, then into orders that can actually trade.

1
Stage 1

Data

Prices, volume, fundamentals or order-book events, timestamped by when they were truly available.

2
Stage 2

Signal

A rule or model estimates direction, return, relative value or urgency.

3
Stage 3

Portfolio & risk

Signals become target positions under leverage, concentration, liquidity and loss limits.

4
Stage 4

Orders

Current positions and pending orders are compared with targets to generate parent orders.

5
Stage 5

Execution

Order type, venue, timing and child-order schedule determine how the market is accessed.

6
Stage 6

Monitoring

Fills, rejects, positions and P&L are reconciled; alerts and a kill switch limit failures.

A portfolio engine should not maximize a signal in isolation. One simplified objective is:

target = arg max [ expected return − risk penalty − cost of changing the portfolio ]

That last term matters. A small forecast can be economically useless once turnover, spread and market impact are included.

Algorithmic trading is not the same as HFT, AI or a bot

Algorithmic trading

Software determines relevant order or portfolio decisions with limited or no human intervention.

High-frequency trading (HFT)

A latency-sensitive subset with highly automated infrastructure and very high message activity. A monthly rebalance is algorithmic, but not HFT.

AI / machine learning

One possible technique for learning signals or parameters. A deterministic rule can be algorithmic without using AI.

Trading bot

An informal label for software that watches, alerts or sends orders. The name says nothing about statistical edge, controls or regulation.

Copy trading

Automatically replicates another trader or signal provider. The original decision still comes from a third party.

Two different jobs: finding a trade and executing it

Strategy algorithms

They create or size exposure. Common research families include:

  • Trend or momentum
  • Mean reversion
  • Pairs and statistical arbitrage
  • Market making
  • Event-driven rules
  • Systematic allocation and rebalancing

Execution algorithms

They may not predict returns at all. They seek to complete an existing order while balancing time, price risk and market impact.

TWAP

Spreads an order through time.

VWAP

Targets the market's expected volume profile.

POV / participation

Trades a chosen fraction of observed market volume.

Implementation shortfall

Balances urgency against price movement and impact.

Why a beautiful backtest can be wrong

A backtest is a historical experiment, not proof of future profitability. Its main value is to reject weak ideas, understand behavior and define falsifiable expectations.

Look-ahead bias

The test uses a close, filing, index constituent or macro value before it was actually available.

Survivorship bias

The universe contains today's surviving funds or companies and silently drops failures and delistings.

Data leakage

Information from validation or future observations reaches model fitting or preprocessing.

Data snooping

Many rules are tried and only the lucky winner is reported.

Overfitting

Parameters explain historical noise; neighboring values or new periods quickly fail.

Impossible execution

A signal calculated at the close is filled at that same close without a tradable auction model.

Regime change

Volatility, correlation, liquidity, participants or market rules change.

A more defensible test

  1. 1Define the universe, signal, timing, position rules, costs and benchmark before looking at results.
  2. 2Use point-in-time data, including delisted assets and the publication date of each input.
  3. 3Separate development, validation and a final untouched out-of-sample period; then use walk-forward testing.
  4. 4Execute on the next tradable event unless the test models a real order and venue available at signal time.
  5. 5Record how many variants were tried and test whether nearby parameters produce similar behavior.
  6. 6Report net return, drawdown, volatility, turnover, exposure, sample size and capacity — not only win rate.

Metrics that answer different questions

Metrics that answer different questions
CAGR / net returnHow fast did capital grow after modeled costs?
Volatility & Sharpe/SortinoHow variable was return relative to a chosen risk measure?
Maximum drawdownHow deep was the worst peak-to-trough loss?
TurnoverHow much of the portfolio was traded, and therefore exposed to friction?
Exposure & tailsWhere did risk come from, including leverage and extreme periods?
CapacityWould the edge survive at a larger order size relative to market liquidity?

Gross alpha is not net P&L

net P&L = gross P&L − commissions − spread − slippage − market impact − financing/borrow − taxes/fees

Spread

The gap between the best bid and ask paid when demanding liquidity.

Slippage

The difference between the expected and executed price due to movement, latency, depth or partial fills.

Market impact

The price movement caused by the order itself; it grows with size and participation relative to available liquidity.

Capacity

A rule that works with a small notional may disappear when scaled.

A market order prioritizes execution but does not guarantee price. A limit order controls the worst acceptable price but may not execute. A realistic model must allow partial fills, rejects and unfilled orders.

Backtest, paper trading and live trading test different things

Backtest, paper trading and live trading test different things
StageUsesCan testCannot prove
BacktestHistorical dataLogic, historical behavior and obvious failure modesFuture profitability, queue priority or live reliability
Paper / forward testCurrent data, simulated capitalSchedules, state, reconnects, order logic and alertsReal fills, impact, borrow availability or full broker behavior
LiveReal market and capitalActual fills, costs, operations and human responseThat a short profitable period will persist

A cautious sequence is: locked backtest → paper trading → small real capital with hard limits → gradual scaling only when fills, costs and behavior match expectations.

What a production system needs

A script that calculates a signal is not yet a trading system. Even a slow daily strategy needs explicit failure handling.

Data controls

Reject stale, missing, duplicated or implausible observations.

Pre-trade limits

Maximum order, position, leverage, gross/net exposure, price collar and daily loss.

Idempotent order state

Unique identifiers prevent retries or restarts from duplicating orders.

Broker reconciliation

Treat confirmed broker fills and positions as the final external truth.

Observability

Structured logs, heartbeat, latency, rejects, exposure drift and alerting.

Kill switch

Stop new orders and cancel pending orders when limits or infrastructure fail.

Testing & deployment

Unit, replay, integration and stress tests; separate environments and controlled releases.

Recovery

Persistent state, reconnect logic and a documented manual procedure.

Operational risk is not theoretical. The SEC's staff report describes a 2012 software deployment failure at Knight Capital that sent millions of orders for about 45 minutes and produced losses above US$460 million. Automation scaled the defect, not an investment insight.

Current note for Chile

As of August 2026, CMF General Rule No. 571 is the current reference for Chilean exchanges and securities intermediaries; among other rules, it repealed NCG 528. Where applicable, it requires intermediaries to maintain policies and procedures for algorithm approval, assessment and control, trained personnel, and continuous verification of correct operation. These duties target regulated entities — they do not mean that every person who codes for their own account must register. Offering advice, order routing, intermediation or custody to third parties may trigger separate Fintech Law and CMF authorization requirements.

CMF NCG 571 (PDF)
Use the right tool for the right question

Explore portfolio backtesting — with its limits visible

FinClaro's backtester compares static ETF allocations using monthly adjusted-close history, contributions and periodic rebalancing. It does not test trading signals, order execution, slippage, market impact, taxes or FX.

Looking for the basics in Spanish? Read the FinClaro.cl guide to what trading is, how orders work and which risks matter in Chile.

Trading guide for Chile

💬 Algorithmic Trading — Frequently Asked Questions

No. A deterministic rule can be algorithmic trading. Machine learning is one possible way to create a signal or estimate parameters, but automation and AI are different concepts.
No. HFT is a latency-sensitive subset. A system that rebalances an ETF portfolio monthly can be algorithmic while using ordinary infrastructure and no speed advantage.
No. The result may come from look-ahead bias, survivorship bias, data leakage, multiple testing, overfitting or unrealistic execution. A backtest supports a research process; it does not certify future returns.
A signal is an estimate or rule output. Portfolio and risk layers must translate it into a target position. Only then does the order-management layer decide the quantity, type, timing and destination of orders.
No. It can test schedules, state, reconnects and order logic, but often does not reproduce queue priority, partial fills, market impact, borrow availability, rejects or real latency.
Technically, yes, especially for slow rules on liquid instruments through a broker API. The difficult parts are data quality, realistic testing, costs, risk controls, monitoring and operations — not merely writing a signal.
It should stop new orders and, when appropriate, cancel pending ones through a tested path. It must be independent enough to remain usable when the strategy process behaves incorrectly.
No. The current tool compares static ETF allocations with monthly adjusted-close data, contributions and periodic rebalancing. It does not implement signals, orders, execution costs, slippage, impact, taxes or FX.

Primary and regulatory references

Educational content only. This page does not provide an investment recommendation, a trading signal, legal advice or instructions to connect real capital. Historical results do not guarantee future performance.