CLI flag definitions

CLI flag definitions

Generated from the current CLI flag definitions. See the usage guide for command examples and configuration rules.

algo cache

FlagTypeDefaultMeaning
--cache-dirString""bar-series cache directory (default: $HOME/algolang/cache)

algo export

FlagTypeDefaultMeaning
--adapterString""fetch the bars through this adapter (a path, or a name in the adapter directory) instead of the one each run recorded
--nameString""the set’s name in the export (default: the results folder’s name)
--oString""the export to write, NAME.algorun (required)
--page-sizeInt0SQLite page size in bytes, a power of two from 512 to 65536 (default 65536)
--partialBoolfalseconvert every run folder that holds a result.json, without an index.json (a set a failed run stopped)

algo report

FlagTypeDefaultMeaning
--chartString"braille"the summary plate’s equity chart: braille (lines of braille dots, the default), blocks (closed equity as an area over a strip of drawdown) or lines (box-drawing lines, for a terminal font that draws braille badly)
--colorString"auto"colour in the summary plate: auto (when stdout is a terminal, NO_COLOR is unset and TERM is not dumb), always or never
--formatString"text"output format: text|json
--outString""directory to (re)write portfolio artefacts under (as /portfolio/); needs two or more runs, and never rewrites a run’s own report.html
--partialBoolfalsecombine whatever run directories exist (a fail-fast run set leaves no index.json)
--plateString""with –format text, what the report prints: plates, comma-separated, printed in the order named, each once: symbols (the results by strategy and symbol, with a total), strategies (by strategy alone), sides (by strategy, symbol and side), equity (the equity curve, the portfolio’s for two or more runs), returns (the monthly returns, the portfolio’s for two or more runs), summary (a header, the key statistics, the long and short table, the equity curve and the monthly returns), notes (the Data notes, which print last when not named), stats or full (each run’s tables, then the portfolio’s; the same here); sections are parted by two blank lines; default symbols,equity,returns when stdout is a terminal (summary with –without), else full
--position-costBoolfalsethe equity curve draws what the open positions tie up (a future’s initial margin, an equity’s market value) as a dim line, in colour; off unless given
--risk-free-rateFloat640annual risk-free rate for the recomputed portfolio Sharpe (default: the first run’s recorded rate)
--runsString""comma-separated run ids to include (default: every run in index.json)
--tierString""with an export file: the equity each run is recombined from, daily or bar (default: every mark the file holds, the curve the run was reported from)
--withoutString""take runs’ long or short books out of the portfolio, as RUN:long or RUN:short, comma-separated; the portfolio is then on its realized (closed-trade) curve

algo run

FlagTypeDefaultMeaning
--accept-degraded-seamsBoolfalsecontinuous futures: trade across a served roll seam whose pair is a fallback (degraded) instead of refusing the run; recorded in degradation.json and the manifest pin
--adapterString""data adapter: a path, or the name of an adapter in the adapter directory ($ALGOLANG_ADAPTERS, else the one make install used, /usr/local/algolang/adapters by default); empty asks every adapter there and runs the one that can serve the run
--adapter-inputsString""adapter input values: k=v[,k=v…]
--auto-lineageBoolfalsefollow each configured equity symbol’s rename chain FORWARD and auto-discover its successor tickers (fetch their bars + corporate actions and run the whole lineage from one head ticker)
--bar-intervalStringrunconfig.DefaultBarIntervalbar interval: 1s/5m/1h/1d/1w style (–bar-kind time only); with –config, overrides every run’s bar interval (unset: each run’s own, else 1d)
--bar-kindString"time"bar construction kind: time|volume|tick|dollar|range|renko|imbalance_tick|imbalance_volume|imbalance_dollar|streak|vwap_anchor|runs_tick|runs_volume|runs_dollar
--base-currencyString"USD"fill simulator: the account’s currency (ISO 4217); an instrument quoted in another currency is converted at the RBA rate in force
--batch-sizeInt4096records per data response envelope
--bracket-ambiguityString"conservative"same-bar bracket ambiguity convention: conservative|optimistic|path_direction (Section 6.5.3); with –config, the default of a run that does not set the bracket-ambiguity key
--cacheString"on"bar-series disk cache: off|on|refresh
--cache-dirString""bar-series cache directory (default: $HOME/algolang/cache)
--calendar-accept-unverifiedString""comma-separated roots whose unrecorded session eras precise-time admission accepts (decision D-I11-4)
--calendar-margin-quartersInt0calendar quarters past the run’s last bar the exchange-calendar fetch reaches (0 = the default, 2)
--calendar-revisionsString""exchange-calendar pins: root=revision[,root=revision…]; a served revision that differs, or no calendar for a pinned root, refuses the run (calendar_pin_drift)
--chartString"braille"the summary plate’s equity chart: braille (lines of braille dots, the default), blocks (closed equity as an area over a strip of drawdown) or lines (box-drawing lines, for a terminal font that draws braille badly)
--colorString"auto"colour in the summary plate: auto (when stdout is a terminal, NO_COLOR is unset and TERM is not dumb), always or never
--commission-per-orderString"0"fill simulator: flat commission per fill: an amount in the account’s currency (1.50) or one with its currency (EUR1.50, 1.50EUR), which each fill converts into the account’s at the RBA rate in force
--commission-per-shareString"0"fill simulator: commission per share/contract, in the form of –commission-per-order; the two amounts that are not zero share one currency
--configString""path to a run-config JSON file (one run = one strategy instance; excludes the single-run flags)
--continuous-clockString""continuous futures: session (default) reads the feed’s trade-date session composite for a 1d/1w series (under –session, or eth when none is given), the feed’s intraday grid composite for an intraday interval under –session (eth, rth, session or utc-day), and epoch buckets for an intraday interval without one; epoch reads UTC epoch buckets at every interval and takes no session
--data-protocolString"auto"data wire protocol: auto|dbn|pb|csv
--date-fromString""the range’s first day, YYYY-MM-DD, a day in the exchange’s time zone (with –session, from its session’s open), or the instant it starts, RFC 3339 (the first bar opens there); with –config, overrides every run’s date-from (empty: unbounded)
--date-toString""the range’s last day, inclusive, YYYY-MM-DD, a day in the exchange’s time zone (with –session, to its session’s close), or the instant it ends, RFC 3339 (the last bar closes there); with –config, overrides every run’s date-to (empty: unbounded)
--deployString""path to a deployment file: start every member it names together, each its own process, live, against the desk it names, and start a member that crashes again (GLE-1439, GLE-1385); excludes –config and the single-run flags but –member, –date-from, –date-to, –results-dir, –plate, –color and –chart
--deploymentString""with –mode live: the ledger’s deployment label (1-40 characters from [A-Za-z0-9_]; empty = algo); every order reference (the IBKR cOID) is
--directorString""trade director (GLE-532): a JSON file holding {“director”: {…}} (// and # comments allowed); with –config it replaces every run’s director; needs –lifetime v2, the default for a backtest
--director-controlString""trade director (GLE-532): a file of ordered owner control events (resume, reduce, reset-peak, reset-ladder, reset-period), one JSON object per event, read once when the run starts and each applied at the first event boundary at or after its effective time; {run} is replaced by the run’s ID; needs a director
--director-jsonString""trade director (GLE-532): the same {“director”: {…}} value inline, for a single run without a file; not with –director
--director-logString""trade director (GLE-532): where its decision log goes; with –config it must contain {run}, replaced by each run’s ID (default: director-decisions.jsonl in the run’s results directory, or .director.jsonl beside a live run’s ledger)
--endString""removed: use –date-to
--equity-samplingString"daily"performance report: the rows of equity.csv, the last bar of each UTC date (daily) or every bar (bar); the metrics always use every bar
--ewma-span-barsFloat640expectation mode: EWMA span (bars) for the expected bar size
--ewma-span-signalFloat640expectation mode: EWMA span (bars) for the signed-rate estimate
--exchange-calendarBoolfalsefetch the exchange calendar of every root the run reads (pb data wire), push it to a strategy that asks for it and record it in the run’s provenance (result.json, –fills-json, –lifecycle-json); a strategy that sets needs_calendar turns this on by itself
--exportString""backtest: write the run set to this .algorun file as it runs, self-contained: the bars every run read (warm-up included), its every equity mark, its trades, fills and the rest (GLE-672); a set that exports keeps going past a failed run unless report.keep-going is false
--feedString"history"with –mode live: where the run’s bars come from: history (the bars fetched before the run starts) | stream (the warm-up from history, then the adapter’s real-time feed, each bar as it closes)
--fills-jsonString""backtest only: write the run’s fill blotter (all simulator fills + summary equity) to this JSON path — the golden-master parity seam
--gtc-expiryString"never"fill simulator: venue GTC termination model: never (a GTC order rests until filled, cancelled or the run ends) | ibkr-quarter (cancelled, reason gtc_expired, before the first bar whose trade date falls after the end of the calendar quarter following its submission’s trade date); a live venue applies its own rule
--include-pathBoolfalserequest the intra-bar path (BARS_TIME only; serves_path adapters): the finer bars each coarsened bar was built from, used to simulate fills at bar resolution; on a 1d trading-day session it needs –path-interval; a continuous symbol (a bare root or a :cont composite) walks each held contract’s own path, a bar containing a roll from the cut
--init-expected-sizeFloat640expectation mode: expected-bar-size seed
--init-signed-rateFloat640.5expectation mode: signed-rate seed, in [0,1]
--initial-capitalString"100000"starting capital: an amount (100000) or one with its currency (USD100000, 100000USD); the fill simulator’s starting cash, in the account’s currency (–base-currency; another currency is refused); with –config, overrides the capital pool, which capital-units shares between the runs (unset: the config’s own)
--inputsString""strategy input values: k=v[,k=v…] (a value may hold commas: Stocks=spr:1a,1b)
--lead-inDuration0event bars: constructor warm-up; the adapter feeds trades from start minus this and discards the bars that close before start (0 = none)
--ledgerString""with –mode live: the order-ledger file (startup reconciliation + canonical-id store, designspec §11.3)
--ledger-migrationString""with –mode live: accept a ledger written before deployment identity existed (every reference c-): exclusive-owner asserts no other deployment on the account allocated references under that prefix; empty refuses such a ledger
--lifecycle-jsonString""backtest only: write the run’s order lifecycle trace (submissions in both frames, cancel requests, every venue fill and cancel, rolls and their roll_account records, contract expiries under –lifetime v2, timer arms, disarms, fires and refusals, the working set before shutdown, the summary counts (roll_replaced, roll_lost, roll_expired and contract_expiries among them when not zero), and the fill blotter) to this JSON path
--lifetimeString""order lifetime profile: v1 (legacy: every exchange as before) | v2 (GLE-200: the strategy must accept lifetime-v2; every submission is acknowledged with an OrderUpdate, every cancel request answered with a CancelResponse, and lifecycle turns are granted per instant; backtest and emulated-live runs; a continuous run is simulated only, live continuous futures stay refused); empty = the default: v2 for a backtest (a strategy that does not accept lifetime-v2 is refused; run it with –lifetime v1), v1 for –mode live and –schema TRADES
--lifetime-hold-timeoutDuration0with –lifetime v2: how long the admission race guard holds an order behind a pending cancellation before rejecting it (hold_timeout), on the run’s event clock (0 = the default, 5m)
--lifetime-turnsInt0with –lifetime v2: lifecycle turns granted per instant (0 = the default, 3)
--limit-fillString"conservative"limit fill rule: conservative (trade-through at tick resolution) | through (trade-through at every resolution) | optimistic (touch; diagnostic only); with –config, the default of a run that does not set the limit-fill key
--margin-modelString"report"fill simulator: margin model: report (lock and report the margin the positions require, record margin calls, deny nothing) | enforce (also deny an order that adds exposure the net liquidation cannot carry at initial margin) | off
--max-order-quantityInt640with –lifetime v2: the admission policy’s limit on the quantity of one order and of each attached order (cap_quantity; 0 = no limit)
--max-positionInt640with –lifetime v2: the admission policy’s limit, either way, on the position each symbol could reach if every working and held order executed (cap_exposure; 0 = no limit)
--max-submissionsInt0with –lifetime v2 and –submission-window: the admission policy’s budget of new orders per window of event time (rate_budget; 0 = no budget)
--max-symbol-working-ordersInt0with –lifetime v2: the admission policy’s limit on the working orders on each symbol, counted as –max-working-orders counts them (cap_symbol_working_orders; 0 = no limit)
--max-working-ordersInt0with –lifetime v2: the admission policy’s limit on the instance’s working orders, held, pending-cancel and unknown ones and labelled attached orders included (cap_working_orders; 0 = no limit)
--memberString""with –deploy: run that member alone, in this process, and do not start it again if it fails (what –deploy starts for each member)
--modeString"backtest"run mode: backtest (in-process fill simulator) | live (IBKR VenueAdapter over HTTP)
--on-orphanString"exit"with –mode live: the match_ledger orphan policy (only exit is in scope: refuse-to-start on an unexplained broker order)
--path-heuristicString""bar-resolution fill assumption: legacy (the old engine’s O->H->L->C walk, branch bug reproduced) | midpoint (open’s half of the range picks the leg order); empty = single ambiguous OHLC interval
--path-intervalString""named granularity for the intra-bar path constituents (“1s”, “1m”, …); implies –include-path and is exact-or-refused: the adapter serves exactly this granularity or the run fails (a 1d trading-day session’s edge constituents are clamped to its open and close)
--plateString""what the run prints: plates, comma-separated, printed in the order named, each once: symbols (the results by strategy and symbol, with a total), strategies (by strategy alone), sides (by strategy, symbol and side), equity (the equity curve, the portfolio’s for two or more runs), returns (the monthly returns, the portfolio’s for two or more runs), summary (a header, the key statistics, the long and short table, the equity curve and the monthly returns), notes (the Data notes, which print last when not named), stats (each run’s performance block, tables and director summary, as it finishes) or full (each run’s whole report with its BENCH line, as it finishes); sections are parted by two blank lines; default symbols,equity,returns when stdout is a terminal, else full
--position-costBoolfalsethe equity curve draws what the open positions tie up (a future’s initial margin, an equity’s market value) as a dim line, in colour; off unless given
--replicateInt1total copies of the fetched bars to run
--reportString"on"performance report: on prints the performance block after each backtest run (and, with –results-dir, writes result.json/equity.csv/trades.csv/report.html); off restores the pre-report output
--results-dirString""directory for per-run artefacts: every backtest run writes //{result.json,equity.csv,trades.csv,report.html} (report on), a continuous run adds manifest.yaml/audit.jsonl, and the run set writes index.json, plus portfolio/ for two or more runs (empty: write nothing)
--reversal-multFloat640renko reversal as a multiple of the brick size (default 2.0)
--risk-free-rateFloat640performance report: annual risk-free rate for the Sharpe ratio, as a decimal (0.04 = 4%)
--roll-rebaseBooltruecontinuous futures: re-adjust each adjusted series at every roll, so the strategy calculates on prices adjusted only by the rolls that have happened: its bars are the held contract’s own prices, each roll sends it the series’ history on the incoming basis, and its orders and costs are restated; the report stays in the served frame. On by default: a strategy that can’t take it (stdio-csv-v1, or one that does not accept roll-rebase) runs without it, with a Data note, and a continuous series on –feed stream is then refused; given explicitly, such a strategy is refused. –roll-rebase=false turns it off (GLE-1502)
--roll-tradesString"stitch"performance report, continuous runs: pair trades across contract rolls as one economic round trip (stitch) or per contract leg (split)
--run-idString""run identifier (default: deterministic run--)
--schemaString"BARS"BARS or TRADES (TRADES = data-plane benchmark, no strategy)
--sessionString""trading-day bar container for 1d/1w series: eth|rth|session, or utc-day for UTC days (empty: the exchange’s local days); with an intraday interval, eth|rth|session|utc-day selects a session-anchored grid (bars restart at each window open, the last is cut at the close); with –config, overrides every run’s session; never applied to a cot:, macro: or fx:RBA: series, which has no trading day
--simulation-resolutionString"auto"fill simulation path resolution: auto|tick|bar (tick replays each bar’s trades); with –config, the default of a run that does not set the simulation-resolution key
--slippage-ticksFloat640fill simulator: adverse slippage on market-style fills, in ticks (multiplied by each traded symbol’s tick size)
--startString""removed: use –date-from
--strategyString""path to the strategy binary (required unless –schema TRADES)
--strategy-protocolString"auto"strategy wire protocol: auto|pb|csv
--strategy-stall-timeoutDuration0how long a strategy may keep the engine waiting, for its next reply or to take what the engine writes, before the run is cancelled (GLE-496); each frame it sends ends a wait, a log line is not a reply, and a warm-up chunk of up to 50,000 bars is one wait (0 = off, the default: a slow strategy on a big bar is not a stall)
--strict-calendarBoolfalserequire a pinned, served exchange calendar (–calendar-revisions) for every symbol the run reads (calendar_pin_drift)
--submission-windowDuration0with –lifetime v2 and –max-submissions: the window of event time the submission budget covers (0 = no budget)
--symbolString""deprecated alias for –symbols with a single symbol
--symbolsString""comma-separated instrument symbols (required); ONE instance receives every symbol’s series
--thresholdFloat640activity-bar close threshold (static mode; the kind’s unit)
--threshold-modeString"static"imbalance/runs threshold mode: static|expectation
--transport-queueInt0with –lifetime v2, live: the most submissions the transport scheduler queues; a submission that finds the queue full is refused (transport_overload; 0 = the default, 100)
--transport-requestsInt0with –lifetime v2, live: the transport scheduler sends at most this many submissions and cancel requests to the venue within any –transport-window of the run’s operational clock, queued cancel requests first (0 = the default, 5)
--transport-windowDuration0with –lifetime v2, live: the window –transport-requests covers; also the pause after the venue refuses a request for pacing (0 = the default, 1s)
--venue-accountString""with –mode live: the IBKR account id (empty resolves from the venue)
--venue-emulatedBoolfalsewith –mode live: drive the deterministic emulator clock via POST /admin/tick (vs a real-time gateway feed)
--venue-reply-allowString""with –mode live: comma-separated IBKR order reply message ids the venue confirms; any other reply is declined and its order denied (reply_declined) with IBKR’s text; none confirms no reply; empty = the default, o10151,o10152,o10153,o10331,p12
--venue-urlString""with –mode live: the IBKR gateway / emulator base URL
--verifyBoolfalsewith –config: validate the file, run every check a run makes before its first bar (adapter capabilities, coverage, the grid probe) without fetching bars or trades, print the plan, and exit non-zero if any run would fail