Reading the output¶
Part of the User Guide.
A run prints one line per question. Five of them are worth watching on every run, and each has a red flag that is mechanical rather than a matter of taste:
| line | field to read first | red flag |
|---|---|---|
[PNL] |
breakeven_maker_rate |
negative: no fee schedule makes the window flat |
[EXECUTION] |
fill_rate, queue_ahead_consumed |
fills=0 with a live book, or strategy_position_mismatches>0 |
[RISK] |
fat_finger_rejections, rate_limited_orders |
any, unless the run was meant to trip that control |
[RECON] |
status, and on a live run the position line's position_break |
break: the statement and the account disagree, or the venue holds a quantity the ledger does not; unknown on a live line: the venue did not answer, or the two sides counted their quantity differently (venue_units_per_coin/venue_coin say how) |
[VENUE] |
reports, dropped, refused_by_adapter |
dropped>0, or orders>0 with reports=0; a refused_by_adapter close to the submission count says the adapter's own bound, not the venue, is what the run hit |
[RISK]prints only when--fat-finger-bpsor--max-orders-per-secondis named, and[VENUE]only on a run with a venue leg. A live venue prints up to five[RECON]lines on the same run: the broker's statement against the account, then an equity line and a position line atat=startand the same pair atat=end(venue_equity_usdis the venue's USDT equity,details[ccy=USDT].eq, not its account-widetotalEq;ledger_equity_usd,equity_break_usd,tolerance_usd; andvenue_units/ledger_units/position_breakwith a zero tolerance, because a quantity is exact). The position line's number is only comparable within one unit convention, so the relay states the one it converted with -- engine units per coin and the coin -- and the line printsvenue_units_per_coin/venue_coinand saysunknownwhen the two statements differ: a difference across two conventions is not a break, and a magnitude for it would be a number about nothing. Abreakatat=endcan also be the run's own last fill arriving after its final drain -- measured 2026-11-21,venue_units=0 ledger_units=-1800with the account flat and the ledger one late fill behind -- and[EXECUTION]'slate_fill_reportsis what says whether that is the shape.[VENUE]also carriesduplicates, an ending the adapter had already reported for that order -- the venue repeated it, which a normal run never does, because the relay answers a cancel once, with the channel's state --rate_limited, the part ofrefused_by_adapterthe rate bound took, andorders_per_second, the configured rate.[LATENCY],[LIVE]and[PERFORMANCE]answer the same question about timing and equity and are read the same way: one number, one red flag. The field-by-field reference is in the learning path.
How sure a number is¶
Every number this project quotes that is not arithmetic is a mean over a few events, and a mean without its interval is a
habit. tools/study/pnl_interval.py prints the interval instead:
The tool's other series, the line it prints, and the two habits worth taking
# a series on the command line, in whatever unit you name
python3 tools/study/pnl_interval.py --values 1.2 -3.4 0.5 2.0 --unit=bps
# one field out of runs you have already saved
python3 tools/study/pnl_interval.py --field breakeven_maker_rate data/logs/*.log --scale 1e4 --unit=bps
# one column of a CSV, which is how a per-fill series would be read if the run wrote one
python3 tools/study/pnl_interval.py --column gross_closed_per_fill_usd data/runtime/trades.csv
# the same days cut by the clock rather than by the row count, and the same-day pairs differenced
python3 tools/study/pnl_interval.py --window btc-months-span
python3 tools/study/pnl_interval.py --window btc-eth
The line it prints is [INTERVAL] n=… mean=… median=… sd=… se=… ci95_lo=… ci95_hi=… spread=… includes_zero=…
sign_consistent=… thin_sample=… unit=…, so it can be quoted in a marked block and re-derived by
tools/gate/check_docs.py; the sentence under it says the same thing in words.
Two habits are worth taking from the tool rather than reading past:
- Read the range before the interval. An interval says how well the mean is pinned; the range says how far apart the draws are. Five months of one instrument give a mean of -1.87 bps inside an interval of -2.84 to -0.90 while the draws themselves run from -3.19 to -0.44 -- the mean is tight and the population is not one thing, which is exactly what a single window cannot tell you.
- A thin sample is flagged, not hidden.
thin_sample=1is the repository's thirty-fill rule applied by the tool instead of by memory, and a tool that refused to print a small sample would be argued around rather than read. What the flag means is that the interval is what this sample supports, not what the market does.
The floor numbers need none of this, and the contrast is the point: 5.39 bps a crossing costs is fee plus half a tick, so running it twice gives the same digits and its interval has zero width. Intervals belong to estimates.
Which fields appear, and when¶
Five fields decide whether a run of this mode was any good, and all five are [EXECUTION]/[PNL] fields whose
definition is in the Learning Path field reference: fill_rate, cancel_rate,
queue_ahead_consumed, net_pnl_usd, and breakeven_maker_rate. The last is the one to read first — it is the maker fee
that would have made the window flat, so a negative value says no fee schedule can save it.
The rest of the summary is conditional, and this is the part worth knowing when running this mode, because each group appears only when a flag asks for it. It is folded because a run that did not ask for a group prints nothing about it.
The conditional groups, field by field
min_commission_orders,min_commission_paid— orders charged a schedule's floor under one order's commission and what it added, both zero unless--fee-schedule=min=...names a floor;max_exposure_limit_usd,hard_limit_rejections— the exposure cap and the orders it refused, both zero unless--max-exposure-usd=...names one;kill_switch_loss_usd,kill_switch_triggered,kill_switch_ts,kill_switch_rejected_orders, pluskill_switch_closed_quantityandkill_switch_close_bpswhen the switch actually closed something — all zero or false unless--kill-switch-loss-usd=...names a loss;fat_finger_rejections,rate_limited_orders— printed in the[RISK]line that appears only when--fat-finger-bpsor--max-orders-per-secondis named;audited_rejected_orders,invalid_order_transitions,orphan_order_reports,late_fill_reports/late_fill_quantity,cancelled_after_fill_orders/cancelled_before_fill_orders,orders_that_filled,filled_orders_by_size— the order lifecycle and state-machine health counters, appended to[EXECUTION]only when non-zero. A late fill is a fill that arrived after the report that ended its order (a live venue answers a cancel for an order it already filled before it sends the fill), so it is counted as what it is andorphan_order_reportsis left for a report the ledger could not attribute at all.filled_orders_by_sizeis a histogram ascount/quantityper bucket with the buckets<=50, 51-99, 100-199, 200-499, 500-999, 1000+: the bounds at 100 and 200 are where the two share schedules this repository has read stop charging a minimum per order, so a commission under either convention is computable from it exactly;total_order_lifetime_cycles— quote-cycle lifetime sum, not elapsed microseconds.
The same question for a whole line -- what [EXECUTION] prints and what each name means -- is in the
field reference in the learning path and, for the arithmetic, in
the glossary.
Where a run writes -- data/runtime/orders.csv, the two recorded legs, <prefix>_orders.csv and the report's PNG -- is
Scenarios and reports's, with the legacy analyser that reads the runtime files.
What a number in that line leaves out¶
[PNL] marks an open position and a strategy spends its first seconds warming up; both are honest and both are
incomplete, so the line is read with them in mind.
The warm-up, and the exit a mark is not money
The warm-up. The mainline does not quote until it has seen 16 trades and 2 valid views (warmup_trades and
warmup_views in src/strategy/maker/active_l2_market_maker.h), and trend_l2 waits for its slow average before it will act.
The book has no cold period to match: the incremental reader's first batch is the day's snapshot, so the first decision
is taken on a two-sided book. On the recorded BTC window the warm-up is shorter than a second -- 16 trades at that
window's own density of about 4,100 a minute is 0.23 s, against a 0.49 h window -- and on the two-hour SPY window about
five seconds. Those are arithmetic on the windows' trade counts, not measurements of the warm-up.
What it costs is not a biased mean but a shorter opportunity set: a strategy that warms up misses the fills at the
start, so two strategies with different warm-ups are compared over slightly different windows, and nothing in
[EXECUTION] reports how much of a window was warmed up. The baselines do not warm up at all, which is correct for them:
they need no history to quote. The one place the effect can bite is a window with so few trades that 16 of them take
minutes -- and the thin months of the interval series are exactly those windows.
The exit. A run that ends holding a position marks it at the last midpoint, and [PNL]'s gross and net count that
mark as if it were money. --close-out closes the position at the touch instead and [WIND-DOWN] prices the difference.
How large that difference is depends on the venue, not on the strategy:
| venue | exit cost | why |
|---|---|---|
| a US share | 0.18 bps | the half spread crossed and the commission are both fractions of a one-cent tick |
| a perpetual | 5.39 bps | a taker order crosses a 5 bps fee plus half a tick that is worth real basis points |
The pinned example is the SPY window: the mark
reads 262.51 and the account after the exit 257.11, with 38 of the 438 shares left unclosed because the touch showed no
size. Every net USD column in these documents that carries a position is a mark until someone runs it with --close-out.
A live venue answers asynchronously. The fill is a report that arrives after the placement is acknowledged, not a return
value, so --close-out gives a live venue a bounded wait -- one second -- to deliver it through the run's own drain
before it reads what is left. An in-process engine fills inside the call and the wait is skipped, which is why every
recorded run's [WIND-DOWN] is unchanged. On a live run closed=0 says the position did not shrink inside that second,
and the line says which of three things happened: no_liquidity=1 is the venue showing no size, refused=1 is the venue
or a pre-trade control refusing the exit outright (the refusal arrives on the same report stream and ends the wait), and
grew=<units> is a working quote filling the other way while the exit worked -- measured 2026-11-21, position=-1400
closed=0 residual=-11400 ... no_liquidity=1 was a 10,000-unit growth and an exit that never filled.
The live close also pulls the strategy's working orders first: --close-out cancels them, drains the cancels for the
same bounded second, and sizes the exit against what is left, because a quote that fills while the exit works is a
position on the other side. The order leg is drained once more after the feed stops -- a quote cancelled at the last
moment can fill at the venue a moment later -- so [WIND-DOWN] and [PNL] price the position the venue actually holds.
The live exit itself is a reduce-only market order, so its spread_bps is the cash the fill moved against the
position's notional rather than a band, and a fractional position is closed by the whole-contract round-up the venue
caps at the position.
The exit a replay cannot fill. Once a replay's input ends there is no print left to take the other side, so
--close-out finds no counterparty and the residual is marked again -- measured 2026-11-25, an eight-hour run with the
flag returned numbers identical to the run without it, to the last digit of every column. --settle-residual prices the
handover instead of performing it: the far side of the touch, one tick past it (--settle-slippage-ticks), plus a taker
fee (--settle-taker-bps, default 5), reported as [SETTLE] with settle_cost_usd, settle_cost_bps and
settled_net_usd/settled_net_bps -- the marked result with that cost taken out. It books no fill, so [PNL] keeps its
definition and the ledger keeps the position the run left; the two numbers are read side by side.