Introduction

Algolang is a platform for running trading strategies against historical or live market data. Its central idea is process isolation: a strategy is not a script loaded into the engine, but a standalone program that the engine launches and speaks to over a wire protocol – one bar in, one decision out, until the data runs dry. The strategy SDK handles the handshake, message framing, and local bookkeeping, leaving you a small interface to implement.

The same separation appears at the other boundaries. Market data comes from a data-adapter program. Orders leave through a brokerage boundary called the VenueAdapter. Backtests bind that boundary to the deterministic simulator; the current live path binds it to Interactive Brokers. The strategy does not change when either side changes.

The introductory examples use the bundled sample data: 1,000 real MSFT trades from Nasdaq. Example output is illustrative; timings and reports can change as the engine evolves.

The platform at a glance

One run moves information through a small set of deliberately narrow seams:

historical archive or live feed
              |
       data adapter process
              |
              v
        Algolang engine <----> strategy process
              |
       venue / brokerage adapter
              |
       simulator or live broker
              |
              v
      run report and artefacts

The pieces have distinct jobs:

ComponentResponsibilityStatus in this build
EngineOwns time, validates data, merges series, drives the bar loop, routes orders and records the run.Implemented by bin/algo.
Strategy processTurns bars and account events into orders. It can be written in any language that speaks a supported strategy wire.Go SDK plus reference clients in several languages.
Strategy hostStarts the strategy, negotiates its wire protocol and presents it to the engine through one interface.Built into the engine.
Data adapterResolves instruments and serves bars or trades from a file, archive or live provider.File CSV, Databento and IBKR adapters are bundled; marketfeed is a companion project.
Venue / brokerage adapterSubmits and cancels orders and supplies fills, positions and account state.The simulator is used for backtests; the IBKR adapter is used by the constrained live/emulator path.
Reporting adapterConsumes run results to produce durable reports, exports and downstream analytics without coupling them to the engine loop.Implemented. Every backtest run prints a performance block and, with --results-dir, persists result.json / equity.csv / trades.csv / report.html; algo report prints them again and recombines runs offline.

The reporting layer follows the seam this table always promised: the engine computes and persists per-run artefacts, and everything downstream (the algo report subcommand, the portfolio combination, the HTML report) is a consumer of those artefacts rather than of the engine loop. See “The performance report” below. The human-readable run report, the machine-readable BENCH line, fill JSON, and the continuous-run audit artefacts remain unchanged alongside it.

What happens during a run

At startup the engine opens the data adapter, asks what schemas and intervals it can honestly serve, and resolves instrument metadata. It starts the strategy and applies its declared inputs. During the run it delivers bars in timestamp order, accepts zero or more orders, and sends those orders to the selected venue adapter. Fills and cancellations update the engine and strategy state before the next decision. At the end, the engine shuts down the child processes and reports the account result.

This ownership split matters. The data adapter owns faithful acquisition and bar construction, and, for continuous futures and adjusted equities, the adjusted series itself. The engine owns orchestration, the translation between the raw prices the simulator fills at and the adjusted series the strategy sees, and order routing. The venue adapter owns broker-specific execution. The strategy owns trading decisions. The reporting layer owns output presentation and export: the performance block, the per-run artefacts, and the offline algo report recombination (see “The performance report”).

Continuous futures have changed owner (GLE-214, closed 2026-10-06). Marketfeed builds continuous contracts: it elects each root’s rolls, splices the held contracts into a :cont composite, and serves both the composite and its roll schedule. Since ER1 (GLE-323) a continuous run consumes that composite: one served :cont fetch and its token-pinned roll schedule per root, with the adjusted bars, the per-span constants and the seam pairs taken from the wire, and since ER2 (GLE-324) a daily run reads the trade-date session composite. The engine elects no rolls and computes no adjustment: it executes each roll at the served cut instant at the served seam prices (GLE-270) and applies the served constants only to translate orders. Since ER3 (GLE-325) a continuous run symbol is the bare root fut:V:R or the composite fut:V:R:cont[:adj=panama|ratio|none], both routed through the same consumer; the engine’s own symbol registry and its @ES aliases are gone. Adjusted equities followed with EQ (GLE-328): an eq:V:T:adj=split or adj=splitdiv run reads the adjusted bars marketfeed serves, the strategy sees them as served and the simulator fills on their raw prices, with the engine’s own equity adjustment kept for live mode only. The programme’s record is GLE-214; see Continuous futures and Equities and live reconciliation for how runs behave.