Performance reports
A backtest reports its results in these places:
| Where | What you get | When |
|---|---|---|
| The terminal | On a terminal, the plates: the results by strategy and symbol, the equity curve, the monthly returns and a footer line. With --plate full or --plate stats, or in a pipe, a performance: block at the end of the run report, then the trade statistics, per-symbol and monthly tables. --plate chooses others: the summary plate and the slice tables among them | Every backtest run with a strategy, unless --report off |
| The results directory | Per-run files — result.json, equity.csv, trades.csv and an interactive report.html — and a portfolio report for a config of several runs | When the run names --results-dir DIR, or a config sets the global results-dir |
algo report DIR | The terminal tables again, read back from the saved files, and a recombined portfolio for any subset of the runs | Any time after a run that saved its results |
algo run ... --export NAME.algorun | One self-contained export of the whole set, bars included, for AlgoChart, written as the set runs (Writing the export as the set runs) | When the run names --export FILE, or a config sets report.export; with a results directory or without one |
algo export DIR -o NAME.algorun | The same export, converted from a results directory, its bars fetched again (The export file) | Any time after a run that saved its results |
All of these render from one record of the set’s results, the run set: each run’s result.json, curve, plots and fills, and the set’s portfolio. The engine adds each run to it as the run finishes, so a run’s own report prints and its files are written straight away, and combines the set once its last run has. algo report builds the same record from a results directory or an export, and from an export it prints what the run printed, plate for plate. What a run says about itself rather than about its results (the run report’s diagnostic lines, the BENCH line, the summary plate’s footer and the data notes) comes from the run as it ran, so algo report does not print it.
The report writes no files without a results directory; an export needs none. To get the HTML report, add one and open the page the run writes:
bin/algo run ... --results-dir results
open results/<run-id>/report.html # xdg-open on LinuxThe page is one self-contained file: the charting library and every figure are embedded, so it needs no web server and no network access, and it can be archived or sent on as it is.
The examples in this section come from one config of three of the bundled demo strategies, run on the marketfeed archive’s E-mini S&P 500 and E-mini Nasdaq-100 daily bars from 2018 to September 2026, with 300,000 dollars per run, a commission of 2.50 dollars per order and one tick of slippage:
{
"global": {
"bar-interval": "1d",
"date-from": "2018-01-01",
"date-to": "2026-09-30",
"initial-capital": "USD900000",
"slippage-ticks": 1,
"commission-mode": "per-trade",
"commission-amount": 2.5,
"data": {"adapter": "marketfeed"}
},
"runs": [
{"name": "ES/NQ spread", "strategy": "bin/esnqspread", "symbols": "fut:XCME:ES/fut:XCME:NQ",
"inputs": {"Log": false}},
{"name": "Term carry ES", "strategy": "bin/termcarry", "symbol": "fut:XCME:ES"},
{"name": "COT trend ES", "strategy": "bin/cotcarry", "symbol": "fut:XCME:ES"}
]
}bin/algo run --config report-demo.json --results-dir resultsThe initial capital is a pool shared equally by the runs, so each run starts with 300,000 dollars.
How the numbers are computed
Four definitions decide how every figure in the report reads:
- Open vs closed equity. The engine tracks two curves per bar. OPEN equity is mark-to-market net liquidation (cash plus open positions at the bar close — the same single source the
simulator:equity line uses); CLOSED equity counts only realized results (capital + realized PnL - commission). The headline net profit, drawdown, Sharpe and CAGR are computed on the open-equity curve; both curves are persisted and charted. - Trades are FIFO round trips paired from fills (one trade per entry-lot/exit-fill overlap; a through-zero flip closes the old side and opens the new). A strategy that holds several lots of one side and sells them in their entry order, one order per lot, therefore gets one trade per lot; a sell out of entry order is paired with the oldest lot, so the per-trade list then differs from the strategy’s own record while the net is the same (Overlapping per-signal trades). This pairing is validated against the legacy engine’s exported books trade-for-trade (
internal/goldentest/perfreplay.go). A position still held at the end of the run is an open trade, marked at its symbol’s last close; it counts towards open P&L but not towards any closed-trade statistic. - Gross basis. Winners and losers are classified on gross trade P&L; commission and slippage are reported separately (the legacy
profitCurrency/commissionPointssplit). Slippage is already inside the fill prices, so a trade’s P&L carries it and the slippage figures are a memo; commission is charged on top. A stitched trade’s roll legs are fills in neither of its prices, so its P&L subtracts their slippage (GLE-1337). - Continuous futures pair across contract rolls as one economic round trip by default (
Rollscounts boundaries survived);--roll-trades splitgives per-contract legs instead. Thepairing residualpublished in result.json is whatever still parts trade-level P&L from the equity curve, such as the translation of a balance in another currency — visible, never hidden. A stitched trade’s P&L carries its roll legs’ slippage, so the roll seams leave none (GLE-1337).
Daily statistics (Sharpe, Sortino, the Ulcer index, the linear fit, the monthly grid) use the last open-equity mark of each UTC calendar date. A statistic that cannot be computed honestly — Sharpe with fewer than 20 daily returns, a profit factor with no losing trade — shows as n/a rather than as an invented zero. Metric reference defines every figure.
The plates
On a terminal, algo run ends with its plates rather than the full run report (GLE-1410): its results by strategy and symbol, its equity curve and its monthly returns, then a footer line and the data notes. Each is a section of its own, parted from the next by two blank lines. The smacross demo on the E-mini S&P 500’s daily bars from 2012 to September 2026, with a million dollars and one tick of slippage, prints:

| Plate | What it shows |
|---|---|
symbols | The set’s results by strategy, each strategy’s symbols beneath it, and the total (The slice tables). |
equity | The equity chart, as the summary plate draws it, under an Equity (USD) title: one run’s, or the portfolio’s for a set of two or more runs. A curve of a single point draws nothing. |
returns | The monthly returns, as the summary plate shows them: one run’s, or the portfolio’s. Unlike the summary plate’s, they print for a single month. |
| Footer | The line the summary plate describes, after the last plate. |
A set of two or more runs prints the same three, its equity curve and monthly returns the portfolio’s. A pipe, a file, a script or CI gets the full report instead (Choosing what a run prints).
The summary plate
--plate summary prints the summary plate: what the run made, and how, in about fifty lines. The same run prints:

From the top:
| Part | What it shows |
|---|---|
| Header | The run’s name, its series, how the simulator filled its orders (bar path (none), see Tick resolution), the dates of the first and last bars, the capital and the run id. |
| Statistics | Net profit, return, CAGR and Sharpe; the maximum drawdown in money and in percent, net profit over it, and the time in the market; the closed trades (and any open ones), the long and short split, the win rate and the profit factor; the average trade, winner and loser and the ratio of the last two; the largest winner and loser, the longest winning and losing streaks, and commission plus slippage. They are the performance: block’s figures and the trade statistics’ All column, defined in the Metric reference. |
| Long and short | When the run closed trades both long and short, a row for each side: its closed trades, their P&L, the average trade, the win rate, the profit factor, the maximum drawdown and Sharpe of the side’s closed-trade curve, and the time it spent in the market. They are the trade statistics’ Long and Short columns. The columns go two to a cell of the statistics grid, so the second of each pair ends where the grid’s values end. Their P&L counts closed trades only, so the two add up to the closed trades’ P&L, not to the net profit, which also counts open trades’ P&L and the slippage of roll legs. A run that traded one way only has no such rows. |
| Chart | On round-number gridlines over a time axis, drawn in braille dots: four levels to a row and two slices of time to a column, each dot column showing the last mark in its slice of time. When the run closed trades both ways, the closed P&L of its long book in teal and of its short book in orange, with a red zero line; otherwise closed equity less the capital in purple over open equity in grey. The books are the set’s long and short slices, net of the commission each paid, so the two lines together make the closed equity line, and they end below the side rows’ P&L, which is gross of commission, by the commission. Without colour the chart draws closed equity alone, since two lines would be one tangle. In colour a dim steel-blue line beneath them shows what the open positions tied up (The position cost line). --chart draws it another way (Choosing the chart). |
| Monthly returns | The monthly pnl grid in whole units, gains in green and losses in red, with yearly totals and a total row. The bottom-right figure is the net profit. |
| Footer | One line, after the old engine’s, which follows the last plate whichever plates print: the wall time from the command’s start; the bars the strategy read, over every series; the trades it read, when there were any (tick-resolution fills and declared trade events); and the days its bars span, each with a rate over the strategy loop’s time. Then the orders and fills, the time spent fetching data, and how many bar fetches the series cache served. |
The run above ends:
Run completed in 2.37 seconds [3.8K bars (18.3K bars/sec), 5.4K days (25.9K days/sec), 515 orders, 633 fills; data 0.1s, 2/2 fetches cached].
With --plate summary, a config of two or more runs prints one plate, once the set is done. (Without --plate, such a set prints the default plates on a terminal.) Its header names the runs’ fill path when they share one. Two lines of the portfolio’s figures follow it: its net profit, CAGR, maximum drawdown in percent with its dates, and time in market; then its closed trades, win rate, profit factor and average trade. Then come its chart and monthly returns, and the footer for the whole set. The runs’ own figures, their win rates among them, are the slice tables’ (GLE-1398), so the plate has no row for each run.
A run that recorded no performance (a --schema TRADES run, a live run, a run under --report off) prints its full report whatever plate is chosen.
The plate is 124 columns wide. On a narrower terminal the statistics, and the long and short rows, fall into two columns and the chart narrows to fit; the monthly grid keeps its width.
Choosing what a run prints
--plate (or --plates, another name for it) chooses:
| Plate | What it prints |
|---|---|
symbols | Once the set is done, a row for each strategy of the set with its symbols beneath it, and the total (The slice tables). |
strategies | The same, a row for each strategy alone. |
sides | The same, with each symbol’s long and short books beneath it. |
equity | The equity curve: one run’s, or the portfolio’s for a set of two or more runs (The plates). |
returns | The monthly returns: one run’s, or the portfolio’s. |
summary | The summary plate: a header, the key statistics, the long and short rows, the equity curve and the monthly returns. |
notes | The data notes. Not named, they print last. |
stats | Each run’s performance: block, trade statistics, per-symbol and monthly tables and director summary under an Algolang run <run-id> line, as the run finishes, then for a set the PORTFOLIO block; no run diagnostics and no BENCH line. |
full | The full run report as each run finishes: every line Reading the run report describes, the performance block and tables, the director summary and the BENCH line, as before the plates existed. |
Several may be named, separated by commas. The set’s plates (all but stats and full) print once the set is done, in the order named; a plate named twice prints once. stats and full print as each run finishes, so they come first wherever they are named. The footer follows the last of the set’s plates, and the data notes come last unless notes places them. Each section is parted from the next by two blank lines; the full report keeps its single blank lines. Without --plate, a terminal gets symbols,equity,returns, and anything else (a pipe, a file, a script, CI) gets full, so tooling that reads the report or the BENCH line sees the same bytes as before.
bin/algo run --strategy bin/smacross --symbol fut:XCME:ES --bar-interval 1d # a terminal: symbols, equity, returns
bin/algo run ... --plate full # the full report on a terminal
bin/algo run ... --plate stats,summary # the statistics, then the summary plate
bin/algo run ... --plate returns,equity # the monthly returns, then the equity curve
bin/algo run ... > run.txt # a file: the full report--color colours the plate. auto, the default, colours it when stdout is a terminal, unless the NO_COLOR environment variable is set or TERM is dumb; always and never decide outright. Whatever the plate, a backtest ends with its data notes when it has any. algo report takes both flags too (Reading saved results again: algo report).
Choosing the chart
--chart chooses how the plate draws its equity chart:
| Chart | How it draws |
|---|---|
braille | The default: the long and short sides’ closed P&L, or closed equity over open equity, and the zero line, in braille dots, as above. |
blocks | Closed equity less the capital as an area from zero, green above it and red below, in eighths of a row. Beneath it, a strip three rows deep shows the drawdown of open equity from its running peak, the worst in each column’s slice of time, hanging from 0% to a round depth (1%, 2%, 2.5%, 5%, 10% and so on) that takes in the worst. |
lines | The same lines as braille, in box-drawing characters, one level to a row. For a terminal whose font draws braille unevenly. |
bin/algo run --strategy bin/smacross --symbol fut:XCME:ES --bar-interval 1d --chart blocks
In colour, a block that hangs from the top of its cell is drawn in reverse video, so the area’s edge is exact to an eighth of a row both ways. Without colour, such a block is rounded to a full block, an upper half block or nothing.
The position cost line
With --position-cost, in colour, the chart also draws what the open positions tied up at each moment as a dim steel-blue line beneath the others (GLE-1396). The line is off by default (GLE-1410). Each position counts as follows:
- A future counts its initial margin for the contracts held, long or short, as its adapter serves the margin.
- An equity or ETF counts its market value: the shares held at the last price.
- A future whose adapter serves no margin counts nothing, since its notional value is not what holding it costs.
Amounts in another currency are converted at the rate in force. The line is on the chart’s own money axis, rising from zero when a position opens, and the caption names it. The cost is taken at each bar’s close, and each column shows the most its slice of time tied up, so an intraday strategy that is flat at each day’s close still shows the positions it held during the day. In the blocks chart the line runs over the empty cells and, in colour, through the area’s full cells. A chart without colour leaves it out even with --position-cost, since there it could not be told from the equity. A run that never tied anything up draws no line.
bin/algo run --strategy bin/smacross --symbol fut:XCME:ES --bar-interval 1d --plate summary --position-cost
The margin a futures adapter serves is the requirement in force now, one amount per contract, so for a future the line steps with the number of contracts held rather than following the exchange’s past margin changes. A portfolio’s line is its runs’ costs added together. In report.html the equity chart draws the same figure as a thin grey line on a scale of its own in the lower part of the pane, so it never flattens the equity curves. The legend names it and shows its value under the cursor, and clicking its chip hides or shows it. A run filter hides it, because the page holds only the whole selection’s cost.
The slice tables
The slice tables show a set’s results by strategy, by strategy and symbol, and by strategy, symbol and side, once the set is done. Each row is one of the set’s slices, and its figures are the slice’s own. On a terminal a run or a set prints the by-symbol table, symbols, first of its plates; --plate strategies, symbols and sides choose them anywhere. The smacross demo with two input sets, on the E-mini S&P 500, the E-mini Nasdaq-100 and crude oil’s daily bars from 2012 to September 2026, with 300,000 dollars per run, a commission of 2.50 dollars per order and one tick of slippage:
"runs": [
{"name": "SMA ES", "symbol": "fut:XCME:ES", "inputs": {"Fast": 10, "Slow": 30}},
{"name": "SMA NQ", "symbol": "fut:XCME:NQ", "inputs": {"Fast": 10, "Slow": 30}},
{"name": "SMA CL", "symbol": "fut:XNYM:CL", "inputs": {"Fast": 10, "Slow": 30}},
{"name": "Slow ES", "symbol": "fut:XCME:ES", "inputs": {"Fast": 20, "Slow": 50}},
{"name": "Slow NQ", "symbol": "fut:XCME:NQ", "inputs": {"Fast": 20, "Slow": 50}},
{"name": "Slow CL", "symbol": "fut:XNYM:CL", "inputs": {"Fast": 20, "Slow": 50}}
]bin/algo run --config smacross-set.json # a terminal: the symbols tableStrategies by symbol 2012-01-03 → 2026-09-30 · 6 runs · capital $1,800,000
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
Strategy / symbol Total Long Short Slippage Commission Max ID DD Max ID DD % Trades Win% PF NP/DD Sharpe TIM CAGR
SMA Crossover Fast=10 Slow=30 @1d $240,485 $504,597 -$264,113 $12,553 $2,423 -$165,400 -13.9% 380 37.6% 1.20 1.45 0.24 99.9% +1.6%
├─ E-Mini S&P 500 $20,413 $151,269 -$130,856 $4,588 $605 -$60,578 -18.8% 125 37.6% 1.07 0.34 0.09 98.1% +0.45%
├─ E-Mini NASDAQ-100 $106,340 $295,561 -$189,221 $1,855 $610 -$107,243 -22.8% 127 37.8% 1.20 0.99 0.21 98.0% +2.1%
└─ Crude Oil $113,732 $57,767 $55,965 $6,110 $1,208 -$85,960 -18.1% 128 37.5% 1.36 1.32 0.36 100.0% +2.2%
SMA Crossover Fast=20 Slow=50 @1d -$24,645 $377,642 -$402,288 $9,933 $2,058 -$418,830 -37.9% 234 40.2% 0.95 -0.06 0.03 99.7% -0.19%
├─ E-Mini S&P 500 -$25,028 $127,656 -$152,684 $3,488 $495 -$162,730 -41.5% 81 40.7% 0.93 -0.15 -0.01 97.7% -0.59%
├─ E-Mini NASDAQ-100 -$68,298 $211,660 -$279,958 $1,335 $483 -$239,180 -64.2% 74 43.2% 0.84 -0.29 0.04 99.8% -1.7%
└─ Crude Oil $68,680 $38,326 $30,354 $5,110 $1,080 -$64,813 -17.1% 79 36.7% 1.24 1.06 0.22 99.3% +1.4%
------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total $215,840 $882,240 -$666,400 $22,485 $4,480 -$513,613 -22.5% 614 38.6% 1.08 0.42 0.14 99.9% +0.77%

On a terminal the rules, written here as hyphens, are box-drawing lines. Each strategy’s row is its subtotal, in bold. Its symbols hang beneath it, each named by the description its adapter serves (E-Mini S&P 500 for fut:XCME:ES), or by its id when the adapter serves none or the set was saved before descriptions were. When two of a strategy’s symbols share a description, each has its id beside it, dimmed. The set’s total comes last, under a rule. A strategy of one symbol has no subtotal: its row shows its name alone, since the symbol’s row beneath it says the same. A set of one strategy has no total.
--plate strategies prints the strategy rows and the total:
Strategies 2012-01-03 → 2026-09-30 · 6 runs · capital $1,800,000
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
Strategy Total Long Short Slippage Commission Max ID DD Max ID DD % Trades Win% PF NP/DD Sharpe TIM CAGR
SMA Crossover Fast=10 Slow=30 @1d $240,485 $504,597 -$264,113 $12,553 $2,423 -$165,400 -13.9% 380 37.6% 1.20 1.45 0.24 99.9% +1.6%
SMA Crossover Fast=20 Slow=50 @1d -$24,645 $377,642 -$402,288 $9,933 $2,058 -$418,830 -37.9% 234 40.2% 0.95 -0.06 0.03 99.7% -0.19%
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Total $215,840 $882,240 -$666,400 $22,485 $4,480 -$513,613 -22.5% 614 38.6% 1.08 0.42 0.14 99.9% +0.77%
--plate sides adds each symbol’s long and short books beneath it, with their own drawdown, profit factor and Sharpe. A book’s row shows its net profit in its own side’s column and in Total.
| Column | What it shows |
|---|---|
| Total | The slice’s net profit: Long plus Short. |
| Long, Short | The net profit of the slice’s long book and of its short book, open positions marked at the last bar’s close, net of commission and slippage. |
| Slippage, Commission | What the slice paid in slippage and commission over all its fills, roll legs included. They are costs, already taken out of the profits. |
| Max ID DD | The slice’s max intraday drawdown: the deepest fall of its equity with each open position marked at the worst price it reached while it was held, not only at bar closes. |
| Max ID DD % | The same fall over the equity at the peak it fell from (GLE-1373). It is the money column’s fall, so it can differ from the deepest fall in percent, which may come from another, smaller peak. |
| Trades | Its closed trades. |
| Win% | The share of them that won, on their gross P&L (GLE-1398); n/a when it closed none. |
| PF | Their gross profit over their gross loss. |
| NP/DD | Total over Max ID DD. |
| Sharpe | The annualized Sharpe ratio of its curve’s daily returns. |
| TIM | Its time in market: the share of its bars with a position open (GLE-1395). Beside the CAGR it shows how much of the span the strategy’s capital was at work. |
| CAGR | Its compound annual growth rate from its first bar to its last. |
The money columns and the trades add up: a strategy’s symbols sum to its row, a symbol’s long and short books sum to it, and the strategies sum to the total. When they leave more than rounding, such as the translation of a foreign currency’s P&L, a residual row beneath them shows the rest in the Total column, named for what it is left by: residual (sides), residual (symbols) or residual (strategies). Max ID DD and its percentage, Win%, PF, NP/DD, Sharpe, TIM and CAGR are each row’s own curve’s, so they do not add up: the first strategy’s Max ID DD is 165,400 dollars, where its three symbols’ add up to 253,781. A symbol’s row has the capital of the runs that trade it, and a strategy’s row the capital of all its runs, so a symbol’s percentages are of a smaller capital than its strategy’s. A strategy’s or the total’s intraday drawdown adds its symbols’ worst points within each bar as if they came at the same moment, so it never understates. The long and short columns are the books, marked to market and net of their commission, so they differ from the summary plate’s long and short rows, which count closed trades gross of commission.
The table is as wide as its names and figures need. On a terminal too narrow for it, the names are cut, ending in …, down to 16 columns. In colour each strategy’s name is bold purple, the subtotals and the total are bold, the tree lines and a symbol’s costs are dim, the long books are teal and the short books orange, as on the summary plate, and profits are green and losses red. algo report prints the same tables from a results folder or an export. A set saved before GLE-1354 has no slices, and its tables say so. A set saved before GLE-1358 has no intraday figure: its Max ID DD, Max ID DD % and NP/DD say n/a. A set saved before GLE-1373 says n/a for Max ID DD %.
Benchmarks in the slice tables
Give a run or a set a benchmark with --benchmark, or name one in the configuration’s report.benchmark or report.benchmarks (Choosing benchmarks), and the slice tables show it below the strategies (GLE-1374). The same set against 60% ES and 40% ZN, both held, and against 60% ES with the rest in cash at the 3-month bill:
bin/algo run --config smacross-set.json \
--benchmark '60% fut:XCME:ES + 40% fut:XCBT:ZN' \
--benchmark '60% fut:XCME:ES + macro:FRED:DGS3MO'Strategies by symbol 2012-01-03 → 2026-09-30 · 6 runs · capital $1,800,000
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Strategy / symbol Total Long Short Slippage Commission Max ID DD Max ID DD % Trades Win% PF NP/DD Sharpe TIM CAGR
SMA Crossover Fast=10 Slow=30 @1d $240,485 $504,597 -$264,113 $12,553 $2,423 -$165,400 -13.9% 380 37.6% 1.20 1.45 0.24 99.9% +1.6%
├─ E-Mini S&P 500 $20,413 $151,269 -$130,856 $4,588 $605 -$60,578 -18.8% 125 37.6% 1.07 0.34 0.09 98.1% +0.45%
├─ E-Mini NASDAQ-100 $106,340 $295,561 -$189,221 $1,855 $610 -$107,243 -22.8% 127 37.8% 1.20 0.99 0.21 98.0% +2.1%
└─ Crude Oil $113,732 $57,767 $55,965 $6,110 $1,208 -$85,960 -18.1% 128 37.5% 1.36 1.32 0.36 100.0% +2.2%
SMA Crossover Fast=20 Slow=50 @1d -$24,645 $377,642 -$402,288 $9,933 $2,058 -$418,830 -37.9% 234 40.2% 0.95 -0.06 0.03 99.7% -0.19%
├─ E-Mini S&P 500 -$25,028 $127,656 -$152,684 $3,488 $495 -$162,730 -41.5% 81 40.7% 0.93 -0.15 -0.01 97.7% -0.59%
├─ E-Mini NASDAQ-100 -$68,298 $211,660 -$279,958 $1,335 $483 -$239,180 -64.2% 74 43.2% 0.84 -0.29 0.04 99.8% -1.7%
└─ Crude Oil $68,680 $38,326 $30,354 $5,110 $1,080 -$64,813 -17.1% 79 36.7% 1.24 1.06 0.22 99.3% +1.4%
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total $215,840 $882,240 -$666,400 $22,485 $4,480 -$513,613 -22.5% 614 38.6% 1.08 0.42 0.14 99.9% +0.77%
Benchmarks
60% ES + 40% ZN $4,781,367 $35,822 $3,600 -$1,068,695 -18.5% 4.47 0.99 +9.2%
├─ 60% E-Mini S&P 500 $4,857,205 $25,487 $1,800 -$1,129,278 -22.1% 4.30 0.82 +12.3%
└─ 40% 10 Yr U.S. Tsy Notes -$75,838 $10,335 $1,800 -$205,525 -24.2% -0.37 -0.13 -0.75%
60% ES + 40% cash at DGS3MO $5,066,453 $25,487 $1,800 -$1,118,386 -18.8% 4.53 0.80 +9.5%
├─ 60% E-Mini S&P 500 $4,857,205 $25,487 $1,800 -$1,129,278 -22.1% 4.30 0.82 +12.3%
└─ 40% cash at 3-Mo Treasury CMT Rate $209,248 $0.00 $0.00 $0.00 0.00% n/a 11.20 +1.7%

Under a dim Benchmarks title each benchmark has a row, the primary first, named as it was given or for its sleeves and their shares, and in bold, as a strategy’s subtotal is. In the tables by symbol and by side a benchmark of two sleeves or more has a row for each beneath it, on tree lines, named for its share and its instrument, as its adapter names it (GLE-1401): 60% E-Mini S&P 500, 40% cash at 3-Mo Treasury CMT Rate. A benchmark of one sleeve named for it is named for the instrument too: Long E-Mini S&P 500 rather than Long ES. A sleeve whose adapter names nothing keeps its ticker, 60% ES. --plate strategies shows the benchmarks’ rows alone.
A name longer than 24 characters is shortened: what follows a comma is dropped (Invesco QQQ Trust, Series 1 is Invesco QQQ Trust), then common words are abbreviated one at a time until it fits (Constant Maturity is CMT, Month Mo, Year Yr, Effective Eff., Federal Fed, Government Govt, International Intl, Index Idx, Treasury Tsy), and what is still too long is cut at a word, ending in …. 3-Month Treasury Constant Maturity Rate is 3-Mo Treasury CMT Rate. Only the benchmarks a run was given are shown. The three built in, which a --config run compares against when its configuration names none, stay in the report and report.html but not in the tables.
A benchmark’s row has the columns a held position can fill:
| Column | For a benchmark |
|---|---|
| Total | Its net profit: what its capital grew by, net of its commission and slippage. |
| Long, Short, Trades, Win%, PF, TIM | Blank: a benchmark is bought at the first bar and held to the last, so it has no books, no closed trades and no time out of the market. |
| Slippage, Commission | What buying, rolling and selling its held sleeves cost, at the run’s own commission and slippage. Cash costs nothing. |
| Max ID DD, Max ID DD % | Its max drawdown and that over the equity at the peak it fell from. A benchmark’s curve has no marks inside a bar, so its drawdown is from close to close and can understate an intraday one. |
| NP/DD, Sharpe, CAGR | As for a strategy, on the benchmark’s own curve. |
A benchmark’s figures stand beside the strategies’ to compare with; the tables do not combine the two (GLE-1402). A strategy’s CAGR is the rate its capital grew at over the span, out of the market as well as in it, and the benchmark’s the rate a buy-and-hold grew at throughout.
A set of several runs holds each benchmark once per run, each on that run’s capital. The primary’s row is the portfolio’s joint benchmark, its figures exact on the summed curve. Every other row, and every sleeve’s, adds the runs’ net profits, costs and drawdowns, weights their drawdown percentages and Sharpes by capital, and compounds the summed capital over the set’s span. A sum of drawdowns never understates the joint one, but it can overstate it. A one-run set’s rows are the run’s own. A sleeve’s figures are on its own share of the capital: 40% ZN above lost 75,838 dollars of the 720,000 it was given. A cash sleeve’s Sharpe is large because its returns barely vary: it is the return over the risk-free rate, which is 0 unless --risk-free-rate says otherwise.
On a terminal, a run given a benchmark prints the symbols table first of its plates, so the strategy and its benchmark sit side by side. algo report prints the same rows from a results folder or an export: each run’s benchmarks travel in its result.json, its primary’s curve in equity.csv. A run saved before GLE-1374 has no chosen benchmark, so its tables show none.
The data notes
A backtest prints nothing on stderr but errors, the orders the venue or its trade director refused, and its strategies’ own log lines. What it notes about its data goes in one Data notes section at the very end of stdout, after the run’s report, or after the set’s plates and their footer, whatever the plate (GLE-1357), unless --plate notes places it (GLE-1410). It covers every run of the set:
- the runs’ data degradations: a short warm-up, a bar that straddles a roll, a degraded seam, the flags the feed serves on a roll schedule;
- what the run could not learn of its markets and so assumed (GLE-1360): a contract’s margin, expiration, final settlement or currency, an exchange calendar, a spread to price combos at, or an input of the trade director; a benchmark sleeve it left out; a lead-in served from the cache without its report; an older adapter’s missing coverage segments, and corporate actions auto-lineage could not read;
- why
autoresolution filled on bars, not ticks; - the config file’s notes, such as a
commission-amountwithout acommission-mode, or a field the file names that the engine ignores; - the series cache: why it was off, and how many bar fetches it served. The footer that follows the set’s plates counts the cached fetches, so when it prints the section leaves them out.
What went as asked is not a note: a lead-in that warmed in full, a combo priced at its exchange spread, the successor tickers auto-lineage found, and the data wire the run negotiated. How the orders filled is the run header’s fills: line (Tick resolution).
A run without notes prints no section, so its output is the same as before. The smacross demo on heating oil and gasoline, on gold and platinum as weekly bars on the UTC clock, and on the E-mini Russell 2000 with two slow averages, from 2015 to October 2026:
"runs": [
{"name": "SMA {energy}", "symbol": "{energy}", "capital-units": 2},
{"name": "SMA weekly {metals}", "symbol": "{metals}", "bar-interval": "1w",
"data": {"continuous-clock": "epoch"}, "capital-units": 2},
{"name": "SMA slow RTY", "symbol": "fut:XCME:RTY", "inputs": {"Fast": 50, "Slow": [100, 200]}, "capital-units": 2}
]ends with:
Data notes 120 notes from 6 runs
short warm-up fut:XCME:RTY@1d 0 of 101 / 201 bars (SMA slow RTY Slow=100, SMA slow RTY Slow=200)
roll straddles fut:XCEC:GC@1w 59 bars cross a roll cut, 2015-01 to 2026-07; each trades wholly in the incoming contract (SMA Crossover)
fut:XNYM:PL@1w 43 bars cross a roll cut, 2015-03 to 2026-09; each trades wholly in the incoming contract (SMA Crossover)
expiry conflict fut:XNYM:HO, RB @1d Z19 (SMA Crossover)
provisional tail 5 markets the trading contract's roll span is not final (6 runs of SMA Crossover)
config 6 runs commission-amount without commission-mode defaults to per-trade
cache 6 runs served 28 of 28 bar fetches from /home/you/algolang/cache
Each line is one kind of note on one market: what it says, how often, the months it spans, and where it came from. A note several runs share is one line, so the provisional tail of six runs on five markets is a single line. Lines that say the same of several markets merge, as heating oil’s and gasoline’s expiry conflict do. A line says what the note means for the run in a few words, and degradation.json keeps each note in full, the adapter’s own error included. The kinds that change fills come first:
| Kind | What it means |
|---|---|
short warm-up | A series’ warm-up held fewer bars than its lookback (0 of 101 / 201 bars: none, of a 101-bar lookback in one run and a 201-bar one in the other), or none at all and why (none: degraded seam PLV14->PLF15), or a constructor lead-in or aligned series came up short. An indicator reading further back sees a short history. |
roll straddles | Bars whose bucket crosses a roll’s cut, and how each was routed. A weekly bar on the UTC clock straddles nearly every roll. |
degraded seams | Seams built from a fallback price that the run traded under --accept-degraded-seams. |
margin | A contract whose margin the adapter did not serve, or served unusable: it requires none, so the run’s margin checks pass it (Margin). |
trade director | An input of the trade director the run could not read: a contract’s history, after which its risk rules warm up from the run’s own bars, or its volume or open interest, after which the rule that bounds them refuses its openings. |
fill path | Why auto resolution filled on bars rather than ticks, one line per reason. |
expiry | A future the adapter gives no expiration for: the simulator does not expire its orders or position. |
final settlement | A contract’s final settlement could not be read: a position held to its expiry settles at the last settlement or close. |
combo pricing | An exchange spread the run could not price combos at: combos of its legs fill at their own bars. |
currency | A symbol with no instrument info: its currency is taken as the account’s. |
run end | The run’s end, clamped to the feed’s newest bar. |
adjustment anchor | The adjustment anchor moved, or is held by a contract with no bar in the window. |
calendar | A root with no exchange calendar, and why: ctx.Calendar reports none for it. |
coverage, expiry conflict, … | A flag the feed serves on a contract of its roll schedule, by the flag’s kind. A seam fallback line names each seam the feed measured on a fallback basis by its contract and basis (CHFU14 (temporal)); degradation.json says why each better basis failed. |
provisional tail | The roll span the run ends in is not final: the feed may still move its roll. |
feed note | Any other note of the feed’s roll schedule, as the feed wrote it. |
benchmark | A benchmark sleeve the run left out or could not price, and why (Benchmarks). |
lead-in | A lead-in served from the bar cache, which keeps the warmed bars but not the adapter’s report. |
coverage gate | An older adapter reports no coverage segments, so the granularity gate is skipped. |
auto-lineage | The adapter serves no corporate actions, so auto-lineage discovers no successor ticker. |
config | The config file’s notes, each once, with the runs it concerns. |
cache | The series cache: why it was off, and the bar fetches it served. |
A line names the strategies its notes came from, up to three. When several runs of one strategy carry the notes on one market, as a sweep’s do, it names the runs instead; past three, it counts them. The header counts every note of every run and, when the runs saved their results, points to their degradation.json files, which hold each note in full. A live run prints no section: it writes each note on stderr as it occurs, and the config file’s notes on it when it starts.
algo report reprints the section after its plates (GLE-1360), from the notes each run saved: a results folder’s degradation.json files, or an export’s records of them. It is the section the set printed, but for the cache line of served fetches, which counted the run’s fetches, not its results, and for an export’s, which has no degradation.json to point to. A run saved before GLE-1360 kept only its data degradations, and a continuous run’s alone, so its section holds those.
The performance block
Under --plate full or --plate stats, and in a pipe, every backtest run with a strategy phase ends its report with a performance: block after the phases: line. The ES/NQ spread run of the example config prints:
performance: net profit +20755.00 (+6.92%) | closed equity 336552.50 | open PnL -15797.50
max drawdown 68602.50 (18.21%) peak 2026-04-06 trough 2026-07-29 | sharpe 0.13 | cagr +0.77%
trades 186 closed, 2 open | win rate 53.23% (99W/87L/0E gross) | profit factor 1.07
gross profit 602840.00 | gross loss -565202.50 | avg trade 202.35 | avg win 6089.29 | avg loss -6496.58
largest win 27440.00 | largest loss -49900.00 | max consec 5W/4L | avg bars held 11.0
commission 1085.00 | slippage 3797.50
max margin 135134.00 | return on margin +15.36% | margin calls 0
Long ES +441106.19 (+147.04%) | 2.2272 fut:XCME:ES @ 2694.25 | vs strategy -420351.19
b&h costs 2184.45 = entry+exit 60.68 + 35 rolls (70 legs) 2123.78 | commission+slippage
ES/NQ 50:50 +642874.32 (+214.29%) | 1.1136 fut:XCME:ES @ 2694.25 + 1.1511 fut:XCME:NQ @ 6515.5 | vs strategy -622119.32
b&h costs 1776.64 = entry+exit 49.35 + 70 rolls (140 legs) 1727.29 | commission+slippage
Cash (3M T-Bill) +81456.70 (+27.15%) | cash at macro:FRED:DGS3MO | vs strategy -60701.70
exposure: b&h 300000.00 notional daily | strategy 134700.00 avg (peak 134700.00, 0.4x) | in market 41.4%
at equal drawdown: b&h x0.60 = +264328.85 | vs strategy -243573.85
| Line | What it says |
|---|---|
net profit | Final open equity minus capital, then as a percentage of capital; the closed equity; and, when positions are still open at the end, their P&L. |
max drawdown | The largest fall of open equity from its running high, in currency and percent, with the dates of the high and the low; the daily Sharpe ratio; the compound annual growth rate. |
trades | Closed and open trade counts; the win rate with winners, losers and break-even trades on gross P&L; the profit factor. |
gross profit | The sums of winning and losing closed trades, and the average trade, winner and loser. |
largest win | The best and worst closed trades, the longest winning and losing streaks, and the average holding time in bars. |
commission | Commission and slippage over every fill, roll legs included. |
max margin | Present only when the run held a margin requirement (Margin): the largest initial margin, net profit over it, and the number of margin calls. |
| Benchmark lines | One line per benchmark with its result and the difference from the strategy, its costs, the exposure comparison and the equal-drawdown line (Benchmarks). |
When the run has closed trades, three tables follow: trade stats (gross), every statistic in All/Long/Short columns; symbols, one row per traded symbol when there are two or more; and monthly pnl, a Year x Month grid. The HTML report shows the same tables, and The HTML report explains each one. In outline:
trade stats (gross): All Long Short
net profit $37,637.50 $172,372.50 -$134,735.00
gross profit $602,840.00 $361,700.00 $241,140.00
...
% time in market 42.24% 41.31% 41.35%
symbols:
Symbol Trades Win% Long PnL Short PnL Net PnL ...
fut:XCME:NQ 93 60.2% $144,885.00 -$57,010.00 $87,875.00 ...
fut:XCME:ES 93 46.2% $27,487.50 -$77,725.00 -$50,237.50 ...
monthly pnl:
Year Jan Feb Mar ... Total
2018 $323 -$4,395 -$108 ... $940
...
A config of several runs prints one such report per run, then a PORTFOLIO block for the combination: capital, fills, realized P&L and final equity; the joint performance lines; a runs: table with each run’s capital, net profit, return, drawdown, trades, win rate, Sharpe and difference from buy and hold; the correlation matrix; and the tables above over the union of the runs’ trades.
--report off removes all of it and restores the pre-report output byte for byte. --risk-free-rate sets the annual rate the Sharpe and Sortino ratios subtract (a decimal: 0.04 is 4%). TRADES-schema runs and live mode do not record performance.
Saving the results
--results-dir DIR (in a config file, the global results-dir) writes one directory per run, named by its run id, and an index of the set:
results/
index.json the run set: names, ids, strategies, capital, first and last bars
slices.json the set's results by strategy, symbol and side
slices-equity.csv their equity curves
es-nq-spread/
result.json header, every metric and the trade list
equity.csv the equity curve
trades.csv one row per trade
books.csv each symbol's long and short P&L, marked to market
report.html the interactive report
continuous/ the continuous manifest and audit ledger of each series
degradation.json the run's data notes, when it had any
term-carry-es/
...
cot-trend-es/
...
portfolio/ a set of two or more runs
result.json equity.csv trades.csv report.html
The run id is the config entry’s name made into a slug (ES/NQ spread becomes es-nq-spread), or --run-id, or by default run-<symbol>-<interval>. No run may take the name portfolio, index.json, slices.json or slices-equity.csv. Each file is written to a temporary name and renamed into place, so a crashed run never leaves a half-written file, and running the same set again replaces its files. The set writes index.json when it reaches its end. A set that stops at a failed run leaves the finished runs’ directories without one, and algo report --partial reads them; a set that keeps going past a failed run lists it in index.json as failed (When a run of a set fails).
Other files join a run’s directory when the run has them: combo_trades.csv for combo orders (Combo orders), fills.json when the config sets report.fills, degradation.json when the run had data notes, and the continuous contract files: manifest.yaml and audit.jsonl beside the others for one continuous series, or under continuous/<series>/ for several (Continuous futures). Artefact formats describes the CSV and JSON files column by column.
In a config file the global-only report object carries the report’s settings:
| Key | Default | Meaning |
|---|---|---|
enabled | true | false is --report off: no performance block and none of the report’s files. |
risk-free-rate | 0 | Annual decimal rate subtracted by the Sharpe and Sortino ratios; --risk-free-rate overrides it. |
roll-trades | stitch | split reports each contract of a continuous run as its own trade; --roll-trades overrides it. |
equity-sampling | daily | daily writes the last point of each UTC date to equity.csv and the chart; bar writes every bar. The metrics are computed the same way either way. --equity-sampling overrides it. |
fills | false | Also write each run’s fill blotter, the --fills-json format, as fills.json in its directory. Needs results-dir, unless the set exports: an export holds every fill whatever fills says. |
benchmark | true | false turns off the buy-and-hold comparison and restores the pre-benchmark artefacts byte for byte. |
benchmarks | Long ES, ES/NQ 50:50, 3M T-Bill cash | The benchmarks to compare against; see Benchmarks. |
export | none | Write the set to this .algorun file as it runs (Writing the export as the set runs, GLE-672). --export overrides it. |
keep-going | true when the set exports, false otherwise | Carry the set past a failed run (When a run of a set fails). |
When a run of a set fails
A set stops at its first failed run unless report.keep-going is on. It is on by default when the set exports (--export or report.export) and off otherwise, so a set that does not export stops there as before. With it:
The set runs on. The failed run prints its error and the rest of the set runs. At the end the set prints how many failed:
algo: run "SMA ES Fast=10 Slow=10": engine: smacross reported error init_failed: OnInit: Fast (10) must be less than Slow (10); the set keeps going (report.keep-going) ... algo: 10 of 63 runs failed; the set kept going (report.keep-going)index.jsonlists the failed run. Its row has"Status": "failed"and"Error", the message that stopped it, beside its name, id, strategy, capital, config entry, sweep and template. ItsFirstBarandLastBarare the zero time,0001-01-01T00:00:00Z.The export keeps it as a failed run. Its
runsrow hasstatus = 'failed', itserror, inputs, sweep and config entry, and nothing else of the run (Failed runs).The set fails only when every run failed. Otherwise
algo runexits 0, and the portfolio combines the runs that finished.The readers skip it, or keep it.
algo report DIRskips a failed row and says so on stderr (Reading saved results again);algo export DIRkeeps it as a failed run.
The smacross sweep of Fast 2 to 25 and Slow 10 to 60 on ES 1d (testdata/algorun/configs/sweep.json) is 63 combinations, ten of which the strategy refuses because Fast is not less than Slow. Without keep-going the set stops at the first of them, Fast=10 Slow=10, after 28 runs; with it, or with --export, it completes in one go: 63 runs, 10 failed.
The HTML report
report.html is laid out top to bottom as: a header with the run’s capital and results; a row of headline tiles; the equity and drawdown chart; the benchmark comparison; the monthly P&L grid; the trade statistics; the symbols table; the full metrics table; the trade list; combo trades, when there are any; and the record of how the run was made. A section with nothing to show is left out: a run without closed trades has no monthly grid, statistics or symbols table, the monthly grid needs two or more months, the symbols table two or more symbols, and the benchmark section a benchmark.
The colours follow one rule: green above zero and red below. A profit factor or a win-to-loss ratio is coloured around 1.0 rather than zero, drawdowns are always red, and costs and unsigned rates (win rate, time in market) stay uncoloured, so a colour that is there means something. Amounts are in the account’s currency with two decimals, $1,234.56 in a USD account and with the ISO code in place of the $ in any other (JPY 1,234.56); the monthly grid alone rounds to whole units.
The header and the equity chart

The title is the run’s name: the config entry’s name, else the name the strategy reports for itself, else the strategy binary. Under it are the strategy binary and the dates of the first and last bars. The chips give the capital, the final equity (open equity at the last bar, open positions marked), the closed equity and the net profit.
The tiles are the headline figures: net profit, return on capital, the difference from the primary buy-and-hold benchmark (when one is on), the maximum drawdown in percent, Sharpe, Sortino, CAGR, the number of closed trades, the win rate and profit factor (when there are closed trades) and the time in market.
The chart has two panes on one time axis. The upper pane plots open equity (the solid blue line and its shading), closed equity (dashed orange; it moves only when a trade closes, so the gap between the two is the open position’s P&L), the primary benchmark’s equity (dotted grey) and a faint horizontal line at the starting capital. The lower pane is the drawdown: how far open equity is below its running high, in percent, with the high starting at the capital. The legend above the chart reads the values at the last date until the pointer is over the chart; then it follows the pointer, as the dark-theme picture below shows. Drag to pan and use the scroll wheel or a pinch to zoom the time axis.
The chart plots the curve at the run’s equity sampling, daily by default: the same rows as equity.csv. The maximum-drawdown tile is measured on every bar, so the deepest point of the drawdown pane can be a little shallower than the tile.

The page follows the system’s light or dark setting. The theme button at the top right switches it for that viewing; the choice is not remembered. Clicking the buy & hold chip in the legend hides or shows the benchmark line, which can dwarf the strategy’s own curve; it changes no figure.
The benchmark comparison

The first table puts the strategy beside each benchmark — net profit, return, CAGR, drawdown, Sharpe, Sortino, Calmar and the net profit at equal drawdown — with a difference column for each. Under it, every benchmark lists what it held, its costs and result; a folded list of its buy-and-hold trades, which opens on click; and a note stating the conventions the numbers depend on. Benchmarks explains the comparison.
The monthly grid

Each cell is the change in open equity over the month: the last daily mark of the month minus the last mark of the previous month, the first month measured from the capital. Because it is mark-to-market, a month shows the P&L of positions held through it, closed or not. The Total column adds a year’s months and the Total row a calendar month’s years, and the bottom-right cell, the sum of every cell, equals the net profit exactly ($20,755 here). An empty cell is a month with no bar. The tint behind a cell grows with its size against the largest month of the run.
The trade statistics

The All, Long and Short columns repeat each statistic over all closed trades, the long trades only and the short trades only. The rows from net profit down to slippage are counts, sums and averages over the trades. The rows from max closed profit to % years profitable are computed from a curve built for the column: the capital plus the gross P&L of the column’s closed trades, each booked on its exit date. That curve is what makes a long-only or short-only Sharpe, Calmar or drawdown possible, and it is why the All column is a closed-trade view beside the mark-to-market tiles.
So the table’s net profit is not the headline one. Here the closed trades made $37,637.50 gross; with the open trades’ -$15,797.50 and less $1,085.00 of commission, that is the headline $20,755.00. The pairing residual, the gap between trade P&L and the account, is shown in the metrics table, and is zero here: each stitched trade’s P&L carries the slippage of the roll legs it was held through (GLE-1337). Metric reference defines each row.
The symbols table

A run that traded two or more symbols gets one row per symbol: its closed trades and win rate, long, short and net P&L (gross), profit factor, maximum drawdown and net profit over it, average trade, average bars held, time in market (the share of that symbol’s bars with a position) and Sharpe. The drawdown, its ratio and Sharpe come from the symbol’s own closed-trade curve, as in the trade statistics. A run that held margin adds the symbol’s largest initial margin. Click a heading to sort.
The metrics table

The full list of the run’s headline figures, including those without a tile: closed equity and open P&L, gross profit and loss, averages, largest trades, streaks, average excursions, costs, margin, drawdown, the maximum and minimum closed profit, the curve ratios, the share of months, quarters and years that were profitable, time in market and the pairing residual. Every curve figure here is on open equity.
The trade list

One row per trade, in the order the trades closed, with open trades last. Click a heading to sort by it and again to reverse; dates sort by time and open trades sort after every closed one. P&L is gross; Slippage is a memo, since it is already in the prices; Net is P&L less commission. MFE and MAE are the trade’s maximum favourable and adverse excursions in price points per unit; Rolls counts the contract rolls a continuous-futures trade was held through. The Totals row adds up P&L, slippage, commission and net over every trade in the table.
When the trades carry their orders (GLE-666), an Entry order column follows the Entry time and an Exit order column the Exit time. Each cell shows the order’s name (Naming orders), with (roll) or (expiry) after an exit on a roll’s leg or on a contract’s settlement, and hovering over it shows the order’s label, attempt N and its type. An open trade’s exit order cell is empty. Trades recorded without their orders keep the table as it was.
The page lists the first 500 trades and says so when there are more; trades.csv always has all of them. A run with combo orders adds a Combo trades table, one row per combo entered and exited as a unit; its legs are also in the trade list.
Run details and printing

The last section records what made the run: the engine build, run id and name, config file, strategy binary and inputs, data adapter, series, the requested and observed ranges, the continuous-futures method and held rank, the order-lifetime profile, cache mode, capital, commission, slippage and the point value of every contract. Empty settings are left out. With this record and the same data, the run can be repeated.
Print the page, or save it as a PDF, from the browser. The layout fits the page: the chart is resized, the run details print open, and the theme button and the portfolio filter note are left off. A benchmark’s folded trade list prints only if it was opened first.
The portfolio report
A config of two or more runs also writes portfolio/report.html, the report of the runs combined. Each run’s capital is committed from the start of the portfolio, its equity is carried forward between its bars, and a run that ends keeps its final equity, so the joint curve is the sum of the runs’ curves. Every statistic is recomputed on that curve and on the union of the runs’ trades.

The page has the same header, tiles, chart and benchmark section as a run’s, then two sections of its own:

- Contribution: each run’s capital, long and short profit, net profit, return, maximum drawdown, trades, win rate and Sharpe.
- Correlation: the correlation of each pair of runs’ daily returns over the days both were running. Positive values are tinted red, since those pairs add to each other’s risk, and negative ones green.
The monthly grid, trade statistics and symbols table follow, over all the runs; there is no separate metrics table. The trade list gains a Run column, and has the Entry order and Exit order columns when any run’s trades carry their orders. The last section records the details of every run, one block each.
The contribution table also chooses what the page shows:
- Click a run to take it out of the portfolio, or put it back.
- Click a Long profit or Short profit cell to take out, or put back, just that side of the run.
- Double-click a run to show it alone. Double-clicking it again brings back the others.

Every figure on the page is then recomputed in the browser for the selection: the chips, tiles, chart, benchmark comparison, monthly grid, trade statistics, symbols table and trade list. The note above the table says what is shown. The last run or side cannot be taken out. With a side taken out, the chart and its ratios use the closed-trade curve, since a run’s mark-to-market equity cannot be split into long and short, and the difference from buy and hold is withheld because the two would be on different bases. The page’s figures come from a JavaScript copy of the Go calculations, which the tests check against the Go, and with every run selected they match the figures the engine wrote. The filter itself is checked too: a test runs the page’s script under node and compares its figures, for subsets and for sides taken out, with what algo report --runs and --without compute. The filter works for up to 12 runs; a portfolio of more is shown complete. To keep a subset as files, use algo report --runs; to print one with a side taken out, algo report --without.
Benchmarks
Every run is compared against one or more benchmarks you choose. A --config run whose configuration names none is compared against three built in, and a single run of flags against none:
| Name | What it is |
|---|---|
Long ES | Buy and hold the S&P 500 E-mini, rolled, from the first bar to the last. The primary. |
ES/NQ 50:50 | Half the capital in ES, half in NQ, both rolled. |
Cash (3M T-Bill) | The capital left in cash, earning the published 3-month bill rate, compounded monthly. |
Name your own with report.benchmarks:
Inside the run configuration’s global object:
"report": {
"benchmarks": [
{"name": "Long ES", "hold": {"fut:XCME:ES": 1.0}, "primary": true},
{"name": "60/40", "hold": {"fut:XCME:ES": 0.6, "fut:XCBT:ZN": 0.4}},
{"name": "Cash", "rate": "macro:FRED:DGS3MO"}
]
}Weights are relative — they are renormalised over the sleeves that actually priced — and a negative weight is a short sleeve, so a market-neutral pair is a legal basket. Symbols are ordinary wire symbols, class:venue:ticker; FRED/DGS3MO is FRED’s own notation and will not resolve. Exactly one benchmark is primary: it drives the headline comparison, the chart overlay and the benchmark column in equity.csv.
Choosing benchmarks
--benchmark gives a run, or every run of a set, its benchmarks (GLE-1374). Each is written out as its sleeves, each an optional share then a symbol, separated by commas or by a + with a space either side:
bin/algo run ... --benchmark fut:XCME:ES # Long ES
bin/algo run ... --benchmark '-100% fut:XCME:ES' # Short ES
bin/algo run ... --benchmark '60% fut:XCME:ES + 40% fut:XCBT:ZN' # both held
bin/algo run ... --benchmark '60% fut:XCME:ES + macro:FRED:DGS3MO' # the rest in cash at the 3M bill
bin/algo run ... --benchmark 'fut:XCME:ES, fut:XCME:NQ, fut:XCME:YM' # a third each
bin/algo run ... --benchmark '50% fut:XCME:ES + macro:FRED:DGS2 + macro:FRED:DGS10'A share is a percentage, 60%, or a fraction, 0.6. Sleeves without one share equally what the others leave, or the whole capital when none has one. When every sleeve has one, they are scaled to the capital together, so 3 fut:XCME:ES + 1 fut:XCME:NQ is 75% and 25%. A negative share is a short sleeve; cash cannot be short. Repeat --benchmark for several: the first is the primary. --benchmark off turns benchmarks off. With --config, --benchmark replaces the configuration’s benchmarks, its report.benchmark switch included.
A sleeve is held, bought at the first bar and sold at the last as above, or it is cash, its share earning an interest rate, compounded monthly at ACT/365 as the 3M-T-Bill benchmark is. A sleeve is cash when it can only be a rate, or when it names how it reads as one, its quote, after a bar: fut:XCBT:ZN|bond, fut:XCME:SR3|imm.
| Sleeve | Read as |
|---|---|
macro:FRED:DGS3MO, any release series | A rate in percent a year, as published, on the day it describes. |
5%, 4.25%, -0.5% | That rate every day; nothing is fetched. |
fut:XCME:SR3 with quote imm | 100 less the price: a future on a short rate (SOFR, Fed Funds, Eurodollar, SONIA, Euribor, the ASX’s bills). |
fut:XCBT:ZN with quote bond | The yield of the bond the future is priced on: a 6.5-year bond paying 6% for ZN, the shortest it delivers, so its yield is near the market’s. |
fut:XCBT:ZN with quote bond:10:6 | The yield of a bond of the years and coupon named. |
eq:XNAS:BIL with quote rate | Its price as a rate in percent a year, as it is. |
|imm and |bond without a bond name the quote of a future whose quote is known: SR1, SR3, ED and ZQ on CME and CBOT, SO3, L and I on ICE, EU3 on Eurex and IR, YT and XT on the ASX are 100 less the rate; ZT, ZF, ZN, TN, ZB and UB, Eurex’s Schatz, Bobl, Bund, Buxl, BTP, OAT and Bono futures, the Long Gilt, Canada’s 5- and 10-year and the JGB are bonds. A future read as a rate is read daily and unadjusted, since a back-adjusted level is no price. A spread or a ratio, a composite, a COT report and an FX rate are refused as rates. These rules are AlgoChart’s, so a cash curve drawn there compounds the same here. Without its quote a future is held: fut:XCBT:ZN is the bond future bought and rolled. Before a rate series’ first observation its cash earns nothing, so a rate that begins after the run does, such as SR3 in 2018, says less than one that covers it.
A benchmark given on the command line is named for its sleeves: Long ES, Short ES, Cash at DGS3MO, 60% ES + 40% cash at DGS3MO. To name one yourself, or give several from a file, give --benchmark a JSON file: one benchmark, a list of them, or {"benchmarks": [...]}. A benchmark in a file, or in the configuration, is an object or a benchmark written out:
{"benchmarks": [
{"name": "Stocks and bonds", "mix": "60% fut:XCME:ES + 40% fut:XCBT:ZN"},
{"name": "Balanced", "mix": {"fut:XCME:ES": 60, "macro:FRED:DGS3MO": 40}},
{"name": "Bills", "rate": "macro:FRED:DGS3MO"},
"fut:XCME:NQ"
]}A mix names every sleeve, held and cash, as a benchmark written out or as an object of sleeve and share. hold and rate are as before. The configuration takes the same in report.benchmark, in place of true or false: a benchmark written out, a file’s path, one benchmark’s object or a list of them. report.benchmarks takes a list whose elements may be written out too; give one of the two. Benchmarks the run is given, on the command line or in its configuration, are chosen: the slice tables show them, and their result.json entries carry Chosen, MaxDDPeakPct and, for two sleeves or more, each leg’s Weight and Figures (its own drawdown, CAGR and Sharpe). The three built in are not chosen. Paths are relative to the current directory.
A benchmark does not have to be something the strategy traded, and usually shouldn’t be. Holding what a strategy traded stops meaning anything as soon as the strategy goes short — “you made less than buying what you were selling” compares nothing. Any named instrument the run never trades is fetched separately, purely for the report; it never reaches the strategy or the simulator, so adding a benchmark cannot change a backtest’s results. It can currently stop one: on marketfeed, a futures sleeve the adapter refuses fails the whole run, and the default set’s futures sleeves are refused whenever the run’s wire is DBN (see Report benchmark findings).
The comparison appears as a block of lines in the stdout report, a table in report.html with a value and a difference column per benchmark, a legs table and transaction ledger for each, a dotted reference line on the equity chart for the primary (click the legend chip to hide it), and the primary’s benchmark column in equity.csv. Turn the whole feature off with report.benchmark: false.
A sleeve that could not be priced is named on the page rather than dropped, because dropping it would silently reweight the basket you asked for.
Under the per-instrument table is a folded trades accordion listing every buy-and-hold round trip — the opening buy to the first roll, each roll to the next, and the last roll to the closing sell — with the dated contract, quantity, entry and exit prices, P&L, slippage, commission and net. Costs follow the same convention as the strategy’s trades: slippage is inside the fill prices, so each trade’s P&L already carries it and the Slippage column is a memo, while commission is charged on top and Net is P&L minus commission alone. The totals row foots to the buy-and-hold figures printed above it, so the comparison can be checked rather than taken on trust. It stays folded for printing unless you open it first; the full list is also in result.json.
The benchmark pays the run’s own commission and slippage on every entry, exit and roll leg, and the report shows the roll count, the leg count and the cost separately. This matters more than it sounds: a held position rolls on every boundary, while a strategy pays a roll only when it happens to have a position on. On an 11-year fut:XCME:ES run that is 46 rolls (92 legs) for buy & hold against four for a strategy that is usually flat.
Because comparing on capital alone is fair only when both sides risk the same, the report also states exposure — what the benchmark holds every day against the strategy’s average and peak simultaneous notional, and how much of the time it was in the market — and adds a net profit at equal drawdown row, which solves for the leverage at which buy-and-hold’s percentage drawdown matches the strategy’s. That row is the like-for-like answer. It is omitted entirely when no leverage reaches the strategy’s drawdown — which is itself worth knowing, because it means the strategy took a risk holding could not take at any size. Note the direction is not always the one you expect: a strategy that is levered but rarely on takes more drawdown than holding, so equalising risk scales the benchmark up.
Two things the benchmark deliberately is not, both stated on the page: cash earns nothing — neither the benchmark’s collateral nor the strategy’s idle cash — so a fully collateralised futures benchmark is understated by whatever the collateral would have yielded, which over a long run is usually far larger than the roll bill; and a corporate-action-adjusted instrument reinvests its dividends, making that sleeve a total-return figure while the strategy receives them as cash. Continuous futures are held as a constant contract count, sized and marked in the raw contract frame, so the figure does not depend on the back-adjustment method.
A benchmark and the strategy roll on the same schedule. A futures sleeve the run does not trade is fetched as marketfeed’s :cont composite, so it rolls on marketfeed’s served roll schedule: ES and NQ 12 calendar days before expiry. A continuous strategy follows the same served schedule (see Continuous run conventions), so a fut:XCME:ES strategy and its Long ES benchmark roll together. A sleeve the run itself trades is priced from the run’s own marks and rolls with the strategy.
Slices
Every run set also holds its results cut three ways (GLE-1354), each cut a slice:
- Strategy: one strategy, or all of them, the portfolio. A strategy is its name, its inputs and the intervals and sessions of all its series, so runs that differ only in symbol, date range, capital, costs or director are one strategy.
- Symbol: one symbol, as
trades.csvkeys it, or all of them. - Side: both, long or short.
The set holds every slice: the portfolio, the portfolio by symbol, each strategy and each strategy by symbol, each of both sides, then long, then short. Each has its trades, its curve marked to market at every bar close, and the same figures as a run. Two runs of one strategy on one symbol make one strategy-by-symbol slice. A slice’s capital is the sum of the capital of the runs it draws on, whatever its side or symbol, so a symbol’s slice of a run that trades several has the run’s whole capital, as the symbols table does.
A slice of one run’s whole curve is the run: its curve, trades and figures. A slice of every symbol and both sides draws on whole runs, and so does a symbol’s slice of a run that trades only that symbol. Any other slice draws on the runs’ books (books.csv), each run’s capital plus the P&L of the books it takes. A slice of several runs combines them as the portfolio does. Benchmarks stay with the runs and the portfolio.
Slices add up. A slice’s long and short slices sum to it, and its slices by symbol, or by strategy, sum to it, in P&L. Whatever a run’s books cannot account for, such as a foreign currency’s realized P&L translated at a later rate, is the slice’s residual, reported beside it as PairingResidual is for a run’s trades. For a run in one currency the residual is rounding.
The results folder keeps them in slices.json and slices-equity.csv, and the export in its books, slices and slice_chunks tables (The export file). algo report builds them again from the runs’ books, for whichever runs it reports. A set saved before GLE-1354 has no books, and so no slices. --plate strategies, symbols and sides print them (The slice tables), and algo report --format json lists them.
Reading saved results again: algo report
algo report reads a results directory, or an export file, and prints the reports again, without running anything:
bin/algo report results # every run, then the portfolio
bin/algo report results --runs term-carry-es,cot-trend-es # a subset, recombined
bin/algo report results --format json # the same as one JSON document
bin/algo report results --runs term-carry-es,cot-trend-es --out subset
bin/algo report sample.algorun # the same, from an export
bin/algo report sample.algorun --tier bar # recombined from every bar's equity
bin/algo report results --without es-nq-spread:short # without one run's short book
bin/algo report results --plate summary # the portfolio's summary plate
bin/algo report results --plate sides # the set by strategy, symbol and side
bin/algo report results # a terminal: symbols, equity, returns| Flag | Meaning |
|---|---|
--runs id1,id2 | Only these run ids, in the index’s order. An id that is not in the set is an error. |
--partial | Read whichever run directories hold a result.json, ignoring index.json, and skip unreadable runs with a warning. For a set that stopped at a failed run, or an index left over from an earlier set. |
--out DIR | Also write the recombined portfolio’s files to DIR/portfolio/: result.json, equity.csv, trades.csv and report.html. |
| `–format text | json` |
--plate P[,P...] | With --format text, the plates as algo run prints them, in the order named, with no footer, since the report reads results rather than running anything: symbols, strategies and sides the slice tables, which --without refuses; equity, returns and summary one run’s or the portfolio’s; notes the runs’ data notes; stats and full the tables, which are all the report has, so they print the same. --plates is another name for it. The default is symbols,equity,returns on a terminal (summary with --without, which leaves no slices) and full anywhere else. Refused with --format json. |
| `–color auto | always |
| `–chart braille | blocks |
--position-cost | The position cost line on the equity chart, as for algo run; off by default. |
--risk-free-rate R | The rate for the recombined portfolio’s Sharpe and Sortino; by default the first run’s recorded rate. |
| `–tier daily | bar` |
--without RUN:long,RUN:short | Take those books out of the portfolio (see below). Not with --out. |
The flags may come before or after the directory. Each run’s tables are rebuilt from its result.json and equity.csv in the layout the run printed them in, and the text ends with the runs’ data notes, rebuilt from each run’s degradation.json (GLE-1360). Two or more runs are recombined into a portfolio, so --runs with two ids answers “what would these two have done together?” without running either again; one run is printed alone. A run the set kept going past (When a run of a set fails) left nothing to report: algo report skips its row and says so on stderr:
algo report: skipping sma-es-fast-10-slow-10: it failed: run "SMA ES Fast=10 Slow=10": engine: smacross reported error init_failed: OnInit: Fast (10) must be less than Slow (10)
Three things it does not do. It never rewrites a run’s report.html, which is written by the run; to change a run’s page, run it again. --out writes the set’s files only: the portfolio’s, when two or more runs are selected, and the slices’. And the recombined portfolio is computed from the runs’ equity.csv files, at their sampling, daily by default, where the run computed its portfolio on every bar, so its drawdown can come out a little shallower: the example set’s is 82,357.50 (8.37%) from algo report against 86,877.50 (8.83%) from the run. The slices are rebuilt from the runs’ books.csv at the same sampling, so the slice tables of an intraday set can differ in the same way. Write the runs with report.equity-sampling set to bar, or --equity-sampling bar, to make the two agree. An export holds every run’s per-bar equity whatever its sampling, so algo report FILE.algorun agrees with the run without running it again.
From an export file, algo report prints what algo run printed when it wrote the file (GLE-1354), in every plate: the statistics plate byte for byte, the set’s other plates but for their footer, and the full plate as the statistics plate: the run’s full plate without its diagnostic lines, its BENCH line and the portfolio’s capital, fills, realized and equity lines. Each run is read back from the file as the run recorded it, its every mark included (Reading it back), and --format json prints the runs and the portfolio the run set held. It skips a failed run as a results folder’s report does. With --tier daily it prints what the set’s results folder prints when the runs sampled daily, byte for byte, in text and in JSON. --partial belongs to folders and is refused.
Taking a book out. --without RUN:short recombines the portfolio without that run’s short trades, and RUN:long without its long ones, as clicking the run’s Short or Long cell on the portfolio page does. A run’s mark-to-market equity cannot be split into its long and short halves, so the portfolio is then on its realized basis: its curve is the capital plus the closed P&L of the books kept, and every figure drawn from the curve follows it. The text says so on a basis: realized line, and the JSON’s Portfolio has "Realized": true. The trade statistics come from the books kept. A run with a book out is described by that book’s closed trades on its own realized curve, its Contribution row naming the book it kept in Side. Buy and hold has no books, so its curve does not move, and the differences from it are withheld: a realized curve and a marked one are not comparable. Taking out a book a run never traded changes nothing. A run keeps at least one book; to leave a run out, use --runs. One run with a book out is printed as a portfolio of one.
Artefact formats
All times are RFC 3339 in UTC. Amounts are in the account’s base currency; ratios and percentages are decimals (0.0692 is 6.92%). Numbers are written in the shortest form that reads back exactly, so the files are byte-for-byte reproducible.
equity.csv has one row per sample, daily by default (the last bar of each UTC date) or every bar with report.equity-sampling: "bar" or --equity-sampling bar:
| Column | Meaning |
|---|---|
ts | The bar’s close time. |
open_equity | Mark-to-market net liquidation: cash plus open positions at the close. |
closed_equity | Capital plus realized P&L less commission. |
in_market | What was held at that close, as bit flags: 1 any position, 2 a long one, 4 a short one. 0 is flat, 3 long, 5 short and 7 both (long one symbol and short another). |
benchmark | The primary benchmark’s equity. Present only when the run has a benchmark. |
intra_low, intra_high, intra_drop | The sample’s bar marks (GLE-1358): what the bars up to it add to its open_equity inside them. intra_low (0 or less) is the lowest open equity stood, intra_high (0 or more) the highest before that low, or the close when that is higher, both relative to open_equity, and intra_drop (0 or more) the deepest fall from one point to a later one. A daily row folds every bar of its date, the closes included, so the maximum intraday drawdown read from a daily file is the one read from a file at every bar. Present for runs recorded since GLE-1358. |
position_cost | What the open positions tied up (GLE-1396): a future’s initial margin, an equity’s market value, in the base currency (The position cost line). A daily sample carries the most the day’s positions tied up. The last column, present only when the run tied anything up. |
How the walk prices a bar: a position held through a bar without fills is worth its worst price, the low for a long and the high for a short. A bar with fills, or with an intra-bar path, is walked: from the open to the high and the low, the nearer to the open first, to the close, sub-bar by sub-bar along a path, and print by print at tick resolution. A fill sits where the walk first reaches its price less its slippage, at the start for a fill at the open and at the end for one at the close, and pays its price, slippage and commission there. A roll leg pays its commission and slippage at the start of the bar it rolls on. A run’s keys that close at the same instant add their marks, as if their lows coincided.
trades.csv has one row per trade, closed trades in the order they closed and then any still open:
| Column | Meaning |
|---|---|
key | The symbol the trade is paired on: the symbol the strategy traded, which for a continuous run is the logical symbol, not the dated contract. |
symbol | The symbol of the entry fill. |
dir | 1 long, -1 short. |
qty | Units, always positive. |
entry_time, exit_time | Fill times. exit_time is empty for an open trade. |
entry_bar, exit_bar | 1-based bar numbers in the trade’s own series. |
entry_price, exit_price | Fill prices, slippage included; an open trade’s exit price is its symbol’s last close. A continuous run’s prices are on the adjusted series. |
bars_held | exit_bar - entry_bar + 1. |
mfe, mae | Maximum favourable and adverse excursion from the entry price, in points per unit; mfe is never negative and mae never positive. The entry bar’s high and low count; the exit bar’s do not. |
profit_points | (exit_price - entry_price) * dir, per unit. |
profit_currency | profit_points * qty * point value, less the slippage of the roll legs a stitched trade was held through (GLE-1337): the gross P&L, gross of commission only. The entry and exit prices carry their own fills’ slippage; a roll leg’s is in neither price, so it is taken off here, and the trades’ P&L then adds up to the account’s. |
commission, slippage | The trade’s share of its fills’ commission and slippage, roll legs included. |
rolls | Contract rolls the trade was held through (stitched continuous trades only). |
open | true for a position still open at the end. |
run | Empty in a run’s own file; in the portfolio’s, the name of the run the trade came from. |
currency, fx_rate, profit_local | Only when some trade is quoted in another currency: its currency, the rate into the base currency and the P&L in its own currency (Currencies). |
entry_series, entry_bar_time, entry_fill | The entry’s bar anchor (GLE-669): the label of the series whose bar the entry filled in, that bar’s open, and where in the bar it filled. Written when some trade has one, after the other columns. |
exit_series, exit_bar_time, exit_fill | The exit’s, empty for an open trade. |
entry_label, entry_attempt, entry_name, entry_type | The entry’s order (GLE-666): the entry fill’s label (its ClientID) and attempt, its order’s name and its order’s type. Written when the trades carry their orders, after the bar anchors. |
exit_label, exit_attempt, exit_name, exit_type | The exit’s, empty for an open trade. |
exit_kind | How the trade closed: order, roll, expiry or end_of_data (below). |
A fill’s place in its bar (entry_fill, exit_fill) is one of:
| Place | The fill |
|---|---|
open | At the bar’s open price: a market order, or a stop or limit the bar opened through. |
intrabar | At a level inside the bar’s range: a stop or limit the bar reached after its open. |
close | At the bar’s close: a market-on-close order (on the bar covering its send time under lifetime v2, on the bar it was decided on under v1), or a combo limit met only at the close. |
tick | At one of the bar’s prints, at tick resolution. |
cut | At a continuous series’ roll: its legs, and the orders moved across with them, are anchored on the outgoing contract’s last bar. |
settlement | A contract’s settlement at its expiry, anchored on its last bar. |
The series is the bar’s: an order of a symbol the run reads at two intervals fills on the next bar of that symbol the simulator advances, of either series, and is anchored there.
The order columns name the order behind each side of a trade. A label is the fill’s ClientID, empty when the order had none, and an attempt is the fill’s Attempt; an attempt of 0, a legacy fill’s, is written empty. A name is the order’s name or, when the strategy gave it none, its effect on the trade: Buy, Sell Short, Sell or Buy to Cover (Naming orders). A type is the order’s type in the lifecycle trace’s words: market, limit, stop, stop_limit, stop_trailing, moo, moc, loc or stop_touch, and order_type_<n> for any other value. Labels and names are the strategy’s text, so a field that holds a comma, a quote or a line break is quoted, its quotes doubled (RFC 4180). Trades recorded without their orders, in a result.json written before GLE-666, leave the file without these columns.
How a trade closed (exit_kind) is one of:
| Kind | The trade |
|---|---|
order | Closed on a fill of an order. |
roll | Closed on a roll’s leg, under --roll-trades split: the exit’s label starts roll/. |
expiry | Closed on the contract’s cash settlement at expiry. It wins over a label that starts roll/. |
end_of_data | Was still open at the end of the run. Its four exit order columns are empty. |
A corporate action’s legs do not reach the trade list, so no kind names them. A stitched trade, held through rolls, keeps its entry fill’s order, and its exit is the fill that finally closes it. A partial exit, or an exit that closes several entries, gives each trade its own entry and its own exit fill.
result.json is one object. A run’s holds its header — SchemaVersion, RunID, RunName, Strategy and StrategyName, Inputs, Series, FirstBar, LastBar, Capital, RiskFreeRate, FinalOpenEquity, FinalClosedEquity, the cost settings, PointValues, BuildID, the config, adapter and strategy paths, the requested range, the order lifetime and the other run settings — then Metrics, every figure of the report, and Trades, the trade list with the same fields as trades.csv, the bar anchors as EntrySeries, EntryBarTime, EntryFill, ExitSeries, ExitBarTime and ExitFill, and the orders as EntryLabel, EntryAttempt, EntryName, EntryType, ExitLabel, ExitAttempt, ExitName, ExitType and ExitKind, each left out when empty (ComboTrades too, on a run with combos). Metrics.All, .Long and .Short are the three columns of the trade statistics, Metrics.Symbols the symbols table, Metrics.Monthly the grid and Metrics.Benchmarks the comparison. A figure that could not be computed is null, and a date that never happened, such as the recovery from a drawdown that did not recover, is 0001-01-01T00:00:00Z. The portfolio’s result.json holds the joint Metrics, Contribution and Correlation. The field names are those of the Go types in engine/report/types.go and artefacts.go. SchemaVersion versions the layout, and algo report refuses a file whose version it does not know.
Each entry of a run’s Series describes one series the run read, in the run’s order: the strategy’s declared series come after the run’s own. Fields that do not apply are left out, and a run written before GLE-665 has only the first three.
| Field | Meaning |
|---|---|
Symbol, Interval, BarKind | The series’ symbol, its interval (empty for activity bar kinds) and its bar kind. |
Continuous, Method, HeldRank | A continuous future: its adjustment method and the rank its served schedule holds (F, B1). |
Label | The engine’s series identity: SYMBOL@INTERVAL[-SESSION], such as ES@1d-rth, or the construction key for activity bars, such as MSFT@volume:t=1000. |
Role | traded when the run can place orders on the series: the run’s own series, and a declared one the strategy names in TradeableSymbols. reference otherwise. |
Declared | config for the run’s own series, an auto-lineage successor included; strategy for one the strategy declared at init. |
Name | The series id the config or the strategy names it by. |
Session | A 1d or 1w series’ trading-day container: eth, rth, session or custom:HHMM-HHMM. A continuous series on the session clock names the session its composite was read from, eth when the run named none. |
Boundary | An intraday grid’s boundary: utc-day, eth, rth or session. A series has a Session or a Boundary, not both. |
Clock | A continuous series’ clock: session or epoch (--continuous-clock). |
WarmupStart | The first bar the run delivered on the series, its warm-up included: the bar’s open, or its close when it has none. |
Snapshot | A continuous series’ adjustment snapshot: At, the instant it was taken at (the run’s end); Anchor, the contract it holds; Token, the feed’s snapshot token. |
Chart | The feed’s mf-chart query for the series (GLE-670): a nested JSON object of mf-chart /api/v1/bars query parameters, as the final bars request’s GetDataResponse.chart_query carried it. For a plain series it is the main (non-warm-up) request’s, the one over the run window; for a continuous series the composite read its build came from. Left out when the feed supplied none, as a file adapter does. |
Description | The instrument’s name for people (GLE-1358), as the adapter’s instrument metadata serves it: E-Mini S&P 500 for fut:XCME:ES. Left out when the adapter serves none, and a result written before it has none. |
A run from a config also records where in it it came from: ConfigEntry is the entry it expanded from (runs[0], strategies[1].runs[2]), Sweep its swept inputs with the values it took, as the config gave them ({"Fast": 5, "Slow": 20}), and Template the placeholder row of a template expansion ({"sym": "ES"}). Sweep siblings share ConfigEntry. A backtest’s header records FillPath, how the simulator filled its orders (GLE-1360): tick path, or bar path (P) with the intra-bar path it walked (Tick resolution). A result written before it has none.
degradation.json, written by a run with data notes, is a JSON array of the run’s notes, one object each: its kind, its note in full, the series it concerns on a run of several series, and its contract (empty when it names none). A data degradation adds the span it covers (earliest, latest, gap_spans; a continuous run’s records are described under Continuous futures). Since GLE-1360 a backtest saves every note, the informational ones under their own kinds:
| Kind | The note |
|---|---|
margin_unavailable, director_input_missing | A margin, or an input of the trade director, the run could not read. |
tick_fallback | Why auto resolution filled on bars. |
expiry_unknown, final_settlement_unread, currency_unknown | A contract’s expiration, final settlement or currency the adapter did not give. |
combo_pricing | An exchange spread the run could not price combos at. |
calendar_unavailable | A root or symbol with no exchange calendar. |
benchmark_skipped | A benchmark sleeve left out. |
lead_in_unreported | A lead-in served from the bar cache without its report. |
coverage_segments_missing, lineage_unavailable | An older adapter’s missing coverage segments; corporate actions auto-lineage could not read. |
config_note, config_file_note | A run-config note, and one of the config file’s own, which every run of the set saves. |
cache_disabled | Why the series cache was off. |
plots.json, written only by a run whose strategy plotted (Plotting from a strategy), holds its plots and annotations. Plots lists each plot, in the order first plotted, as its Series label, Name, Style (kind, pane and color) and two columns: Times, the bars’ opens as integer nanoseconds since the Unix epoch, UTC, and Values, with null for a gap. Annotations lists each note with its Series, BarTime (nanoseconds, the bar’s open), Text, Position, Price (with at only), Shape and Color.
books.csv holds the run’s books (GLE-1354). A book is one symbol’s long or short side through the run. Each row is the book at a sample of equity.csv where it changed; between rows it holds its last values, and before its first row it is flat at 0:
| Column | Meaning |
|---|---|
key | The symbol, as trades.csv keys it. |
dir | 1 the long book, -1 the short one. |
ts | The sample’s time, a row of equity.csv. |
open | The book’s P&L marked to market: its realized P&L and the move of its open position to the symbol’s last close, net of the commission it has paid. |
closed | Its realized P&L, net of the commission it has paid, open positions’ entry commission included. |
qty | The units it held open. |
intra_low, intra_high, intra_drop | The book’s bar marks at the sample, relative to its open, as equity.csv’s. Present for runs recorded since GLE-1358. |
The books of a run sum to its curve’s P&L, less what no symbol or side can be held to, such as a foreign currency’s realized P&L translated at a later rate. A run that traded nothing writes the header alone.
slices.json lists the set’s slices (Slices), in order, one object each: N, numbering them from 1; Strategy and Name, absent for the portfolio; Symbol, absent for every symbol; Side, 1 long, -1 short or 0 both; Runs, the run ids it draws on; Capital, RiskFreeRate, FirstBar, LastBar, FinalOpenEquity, FinalClosedEquity and AvgHoldSeconds; Metrics, the same figures as a run’s result.json; and Residual, what its parts leave unaccounted (Side, Symbol and Strategy, each Open and Closed). A slice that shares an earlier one’s curve and figures names it in SameAs and has no Metrics. slices-equity.csv holds the curves, as equity.csv does, with a first column, slice, the slice’s N, and no benchmark column. A slice’s trades are its runs’ trades of its symbol and side.
index.json lists the set: its SchemaVersion, ConfigPath and, for each run in config order, Name, RunID, Status, Strategy, Capital, FirstBar and LastBar, and a config run’s ConfigEntry, Sweep and Template. Status is ok, or failed for a run the set kept going past (report.keep-going, GLE-672), whose row adds Error, the message that stopped it (When a run of a set fails).
Metric reference
The figures are computed in engine/report; Reporting calculations describes the design. The headline figures, in the terminal block, the tiles and the metrics table, are computed on the open-equity curve and all closed trades.
| Metric | Definition |
|---|---|
| Net profit, return | Final open equity minus capital, and that over capital. Open positions count at their last close. |
| Closed equity | Capital plus the P&L of closed trades less all commission. |
| Open trade P&L | The gross P&L of the trades still open at the end, marked at their symbols’ last closes. |
| Gross profit, gross loss | The sums of the gross P&L of the winning and of the losing closed trades. |
| Profit factor | Gross profit over the size of gross loss; n/a without a losing trade (inf in the symbols table when every trade won). |
| Win rate | Winning closed trades over all closed trades. A trade whose gross P&L is exactly zero is break-even, neither a win nor a loss. |
| Average trade, win, loss | Gross P&L over closed trades, winners and losers. |
| Ratio avg win : avg loss | Average win over the size of the average loss; needs at least one of each. |
| Largest win, largest loss | The best and worst closed trades. |
| Max consecutive wins, losses | The longest runs of winners and losers among closed trades in the order they closed; a break-even trade ends both. |
| Average bars held | bars_held averaged over closed trades, in bars of each trade’s own series. |
| Average MFE, MAE | The excursions in currency (points times quantity times point value), averaged over closed trades. |
| Commission, slippage | Over every fill, roll legs and still-open positions included. |
| Max margin, return on margin, margin calls | The largest initial margin the positions needed at any mark, net profit over it, and the times net liquidation fell below the maintenance margin (Margin). |
| Max drawdown | The largest fall of open equity from its running high, measured on every bar, with the high starting at the capital, so a loss on the first bar is already a drawdown. The amount and the percentage are located separately and can come from different falls. |
| Max intraday drawdown | TradeStation’s “max strategy drawdown (intraday peak to valley)”: as max drawdown, but with each bar’s marks inside it (equity.csv’s intra_ columns): its highest mark can raise the running high, its lowest deepen a fall, and a fall within the bar counts on its own. Never less than max drawdown, and equal to it when every bar is held through and closes at its worst. IntradayDD in result.json, in currency; absent for a run recorded before GLE-1358 and for a set or slice that includes one. IntradayDDPct is the same fall over the equity at the peak it fell from, a fraction (GLE-1373). |
| Max closed profit, min closed profit | The highest and lowest closed equity, less capital. |
| Sharpe | The mean daily return in excess of the risk-free rate (the annual rate over 252) over its sample standard deviation, times the square root of 252. Needs 20 daily returns; n/a if equity ever falls to zero or below, or never moves. |
| Sortino | As Sharpe, over the downside deviation instead: the root mean square of the negative excess returns, over all days. n/a without a losing day. |
| CAGR | (final equity / capital) ^ (365.25 / days) - 1 from the first bar to the last; -100% when the final equity is at or below zero, a total loss or worse (GLE-1394); n/a over less than a day. |
| Calmar | CAGR over the maximum percentage drawdown. |
| Ulcer index | The root mean square of the daily percentage drawdown, as a fraction: 0.061 is 6.1%. Rewards shallow, short drawdowns. |
| R-squared, Pearson | The correlation of daily equity with time, and its square: 1 is a straight line upward, -1 straight down. |
| Months, quarters, years profitable | The share of calendar periods whose last daily equity is above the previous period’s (the first period against capital). |
| Time in market | The share of bars at which any position was open; the Long and Short columns count long and short positions. |
| Pairing residual | Closed gross P&L plus open P&L less commission, minus net profit. Zero unless something sits between the trades and the account, such as the translation of a balance in another currency (Currencies). A continuous run’s roll seams leave none: a trade’s P&L carries its roll legs’ slippage (GLE-1337). |
| Vs buy & hold | Net profit minus the primary benchmark’s (Benchmarks). |
The All, Long and Short columns of the trade statistics use the same definitions over their own trades, with these differences: net profit is the gross P&L of the column’s closed trades; open P&L, commission and slippage are the column’s share; and the curve rows — max and min closed profit, max drawdown (closed basis), net profit over max drawdown, the fit, Sharpe, Sortino, Calmar, the Ulcer index, CAR and the profitable periods — are computed from the column’s closed-trade curve: capital plus each closed trade’s gross P&L on its exit date, on the daily grid. CAR is CAGR on that curve. The two rows the headline lacks are the largest winner as a share of gross profit and the largest loser as a share of gross loss, which show how much of a result rests on one trade.
The BENCH line
The last line of every run is machine-readable: space-separated key=value pairs with the same numbers as the human report (records, bars, orders, fills, final equity, throughput). It exists so scripts and benchmark harnesses can parse results without scraping the pretty report; scripts/bench.sh is built on it. You can ignore it entirely.