Anatomy of a run

Three processes

Every algo run is three cooperating processes:

  1. The engine (bin/algo) – the conductor. It owns the clock, the bar loop, and the fill simulator.
  2. A data adapter – a program that serves market data. The engine spawns it, asks what it can do, and requests bars (or raw trades) over the data wire.
  3. Your strategy – spawned next, fed the bars one by one over the strategy wire. After each bar the engine waits for your response (orders, or nothing) before moving on.

Both wires are negotiated automatically: each side says what protocols it speaks and the engine picks the best mutual one (a binary protobuf wire, a raw-DBN wire on the data side, and a plain-text CSV wire as the lowest common denominator). You saw it in the report: stdio-dbn-v1 to the adapter, stdio-pb-v1 to the strategy. You never have to care, but the Other languages chapter shows how thin the CSV wire is if you want to write a strategy in another language.

Reading the run report

Line by line, from the hello runs above. This is the full report: what a pipe gets, and what --plate full prints on a terminal, where a run otherwise ends with its plates.

LineMeaning
Algolang run run-fut-xcme-es-1dThe run ID. Deterministic by default (run-<symbol>-<interval>, with a continuous symbol slugified, as here; the MSFT run’s is run-MSFT-1m); set your own with --run-id or a config-file name.
adapter:Adapter binary and the data-wire protocol negotiated; inferred from <directory> when the run named no adapter and discovery found it (Finding the adapter).
strategy:Strategy binary, its self-reported name, and the strategy-wire protocol.
lifetime:The order-lifetime profile and how it was chosen: v2 (default) on a backtest that names no profile, v2 (explicit) under --lifetime v2, v1 (default) on a live run that names none. A run under --lifetime v1 prints no line, so its report is the legacy one (Lifecycle turns).
instance:The one strategy instance, the series it saw, and how many orders it submitted.
request:What was asked of the adapter (symbols, schema, bar kind).
window:The run’s date range resolved to instants: the bars whose close falls in it are the run’s (The date range).
fills:How the simulator filled the orders: tick path when it replayed each bar’s trades, as the MSFT run does, or bar path (P) for the intra-bar path it walked, none for the bars’ OHLC alone, as here (Tick resolution). A backtest’s line only.
coverage:The finest bar granularity the adapter’s data can honestly support over the window (see Data).
data:Records fetched, bytes moved, fetch throughput.
bars:Bars delivered to the loop, plus any warmup history (see Writing a real strategy).
simulator:The fill simulator’s conventions and account outcome (see The fill simulator).
phases:Wall-clock breakdown of the run: spawn+init (starting the adapter and its handshake), fetch (the bar stream), validate+replicate, loop (the strategy loop), then other, the time in none of them (starting the strategy, and every adapter request outside the bar stream, such as instrument metadata and the roll schedule), and total, the run’s wall time to its report, which the five add up to (GLE-1338).
calls:Every request the run made of the adapter, by kind and slowest first, the bar fetches included: how many and their wall time, then the total. A slow request the phases count only in other shows here by name. A bar fetch the series cache served made no request.
performance:The run’s results: net profit, drawdown, trades and the rest, then the trade statistics. Present when a strategy ran; see The performance report.

After the BENCH line, a run that noted anything about its data, its config file or the series cache ends with its data notes, as the first hello run does.