Reading backtest results
What the summary card, the equity and drawdown charts, the comparison lines, the positions and the monthly returns tell you, and what they cannot.
On this page
A finished backtest fills the backtest view. A Result line names the file, the dates, the bar size, the cash and the data, and says whether the run was saved. Under it sit the summary card and the equity chart, then the sections: Positions, Monthly returns, Robustness and costs, Data and assumptions, Compare and Saved runs. Read the verdict and the warnings before the profit: they say how far the number can be trusted.
The summary card#
It starts with “In-sample: one replay of this window of past data.” and the verdict in one plain sentence with its numbers (for example “Made $12.40 before costs and lost $3.10 after them.”). Then:
- Net after costs
Final value minus starting cash, after every fee, spread and slippage the replay charged. Positions still open at the end are valued at the bid. Next to it, ▲ or ▼ and the return as a share of the starting cash, which depends on the cash you chose, so compare runs by their net. Under it, Before costs: the same fills with every cost, fees included, at zero.
- Win rate
The share of positions with a net gain after costs. The note under it says what win rate would break even, which depends on how the positions ended. When at least half of the contracts were held to settlement, it is about the average entry price: at an average entry of 70¢, held to settlement, you need to be right about 70% of the time just to break even before costs. When most were closed by a sale (a stop, a target or a time exit), the entry price says little, so the note gives the average win and the average loss after costs and the win rate that breaks even at those sizes (the loss divided by the win plus the loss, both as positive amounts), for example “average win +$1.50, average loss −$1.71 after costs: at those sizes breaking even needs about 53% wins”. When no position made money, it says so.
- Max drawdown
The largest fall from a high point to a later low, in dollars, with its share of the peak equity under it. It is the worst stretch you would have sat through.
- Positions · fills
How many positions the replay opened (a position runs from its first fill until it is sold or settles) and how many fills, with the number of independent events under them.
- Fees paid
The venue fees the replay charged in total. The note says how much of it was on resting orders, or that all of it was on market orders.
- Robustness checks · in-sample
Six checks, each with ✓, ✗ or – and its number: Both halves, At 2× all costs, Without the top 3 events, Independent events (for example “12 of 30 needed”), 90% range per contract (it says when the range includes zero; under 30 events it is never a ✓) and Tested on unseen data. Under 30 events a line under the checks says what to do: add markets on other events (one backtest takes up to 100, fewer over long windows) or repeat it on other windows. Colour marks only gains and losses; there are no pass badges. Robustness checks and the verdict.
The card ends with the line “This replays past data with modelled fills and costs. It does not show the strategy will make money live.” and the Ask the assistant why button. A run with no trades reads “No trades in this window: nothing to judge.” and adds a Why it did not trade panel with the reasons your strategy gave through ctx.why().
The equity chart and its comparison lines#
The main line is your strategy's value over time, with the starting cash as a thin solid line. The extra lines are Other settings. A switch between Other settings and Monte Carlo appears above the chart only when the engine ran its Monte Carlo, which needs 30 or more independent events: a backtest over 30 or more markets on different events (see Monte Carlo). Legend chips turn each line on and off (hovering a chip highlights its line), each line's last value is tagged on the right, and hovering the chart lists every visible line's value at that moment.
Other settings#
Real replays of the same strategy with one setting changed. Every backtest has Realised and the two cost replays (unless its replays were skipped). Harsher fills and the nearby-setting lines appear only when you ask for them: switch on Comparison lines under Costs and fills before the run, or click Add comparison lines under the chart, which re-runs this window with them. Each is one more replay, up to six, within a time budget, so a long window can cut them short.
- Realised
Realised P&L from the starting cash: each position's net counted when it exits (open ones at the end of the window). The gap between it and the main line is the value of positions still open.
- ×0 spread (fees kept)
The spread, price impact and slippage set to zero; venue fees are still charged. If this line loses too, the strategy loses before trading costs.
- ×2 spread (fees kept)
The spread, price impact and slippage doubled, fees unchanged. A result that turns negative here depends on costs staying low. The drawdown chart draws this replay's drawdown in grey.
- Harsher fills
Orders arrive 30 seconds later (the order delay stops at 120 seconds, so less when yours is above 90; the line's label gives the real difference), and where resting orders filled on a touch (venue history's default), they fill only when the market trades through their price. Shows how much the result leans on getting filled. Only when asked for.
- Nearby settings (labelled “setting = value”)
One line for each nearby value of a number in your project's
config.tomlthat your code reads, labelled with the setting and the value tried (for example “threshold = 0.12”): each setting one step (about 20%) up and down. A result that only works at one exact setting is fragile. Only when asked for, and only for a project: a single file has noconfig.toml, so it gets Harsher fills only. The chart draws at most three of them, in blue, amber and violet; a note under it counts the others, which are in the table under Robustness and costs. A line that matched this run exactly is grey and its chip reads “same”.
Monte Carlo#
Monte Carlo draws this run's own positions again at random, by event and with replacement, up to 1,000 times. The chart shows Realised, 8 of the resamples as faint lines (one chip, “8 resamples”), and a bar at the right-hand end for the middle 90% of the final P&L, with a sentence such as “Over 1,000 resamples the final P&L ran from −$56.91 to $44.69 (90%); 54% of them lost money.” It needs 30 or more independent events, because with fewer the range would look tighter than it is. Markets of one event count once, so it takes a backtest over 30 or more markets on different events (one backtest takes up to 100 markets, fewer over long windows: at most 2,300 market-days, for example 76 markets over 30 days). Under 30 the chart shows no Monte Carlo switch, and Robustness and costs says why it did not run.
The drawdown chart#
Under the equity chart, on the same time axis and hover, Drawdown shows how far below its running peak the strategy was at each moment, in $ or % of peak. A grey line shows the ×2 spread replay's drawdown. When Monte Carlo ran (never in one sandbox backtest), two thin lines mark the max drawdown when the same positions come in a random order: the median and the 95th percentile.
None of these lines is a forecast: other settings show how sensitive the result is to your assumptions, and Monte Carlo shows how much it could vary with a different draw of similar events in the same window. Monte Carlo and other settings.
Positions#
Three tabs. Positions has one row per position: the market, the side, when and at what price it was entered, how it ended (Sold, Settled YES, Settled NO, Void (refunded) or Open at the end (bid mark)), when, the costs and the net, in columns you can sort. Filter it by market, side, how it ended or how it was entered (resting or market order). It lists 200 rows, then Show all. Fills lists each fill, and Orders gives the engine's order counts and order warnings. Click a position or a fill to go back to the code at the line that names its market. The positions list is one stop for Tab: the arrow keys move between its rows, and Enter opens one.
Monthly returns#
By month and By week list each period's starting value, dollar P&L and return. By day is a Monday-to-Sunday calendar (UTC) with each week's total. Cells are tinted by the size of the move, and the sign is written too. A line at the bottom shows that the days, the weeks and the months each add up to the total. A backtest covers at most 92 days, so the weeks and days usually tell you more than the months: look for a result that comes from one good day.
Robustness and costs#
It starts with the Verdict in one plain sentence and what costs took; the engine's own verdict and report, in its technical wording, are behind The engine's own report. Then the two halves and the time folds, the Cost line (the same trades with every cost, fees included, at 0×, 1× and 2×) next to the Cost replays (real replays at 0×, 1× and 2× spread, impact and slippage, fees always charged), Concentration (the result without the best markets, events and days), Nearby settings and fills, the Monte Carlo tables (or why it did not run), and how prices moved after resting orders filled. Below them, a form to re-run with other costs (with separate Kalshi and Polymarket half-spreads), and the settings sweep. Robustness checks and the verdict.
Data and assumptions#
Fills and costs in one phrase (the engine's full wording behind a toggle), Why it did not trade (the reasons your code gave with ctx.why()), the Warnings in the engine's own words, grouped into “Changes the result”, “Data quality” and “Other”, Data coverage per market, linked news, the positions Open at the end of the window, Reproducibility and the run log. Reproducibility gives two short codes, an input hash and a results hash: the same input always gives the same result, so a later run can be checked against this one. Backtest warnings.
Saved runs and compare#
Each finished backtest is saved to your account: up to 100, 50 MB of results in total and 30 an hour. Past a limit the result line says “not saved”, with a note that starts “Not saved:” and names the limit; the result stays on screen until you leave. Saved runs (a section, and a button at the top of the view) reopens or deletes them. Compare draws up to three runs on one chart, without marking any as the best. A very large result may be saved trimmed: a reopened run then says “The saved copy keeps less than the engine produced:” and lists what, for example “positions: 143 of 180 kept”; its totals, verdict and warnings are kept.
Ask the assistant why#
Ask the assistant why, at the bottom of the summary card, sends this result's summary to the sandbox assistant and opens it beside the results. It explains in plain words what the replay showed, whether it made or lost money before costs, what the costs took, what the verdict means, and what to test next (a longer window, other markets, thresholds above the round-trip cost). It never says a strategy will make money.