Agentic Trading Index

Cost of execution for trading agents: a weekly checklist

Trading workstation displaying bid and ask quotes while measuring agent execution costs
Photo by AlphaTradeZone on Pexels

A tight spread does not make an unattended trade cheap.

An agent pays through the quoted spread, explicit fees, price movement while an order is routed, and market impact. Those costs can turn a small expected edge negative. A backtest that subtracts one fixed fee per trade will miss costs that change with order type, time of day, liquidity and execution delay.

Use this checklist to get a usable estimate from the orders the programme actually sends. The aim this week is not to prove that a strategy works. It is to establish what each order costs, which conditions worsen that cost, and whether the agent can measure it reliably.

Define what the agent counts as cost

For a first pass, calculate implementation shortfall against the midpoint just before the agent submits an order. For a buy, multiply the difference between the volume-weighted fill price and the arrival midpoint by filled quantity.

For a sell, reverse the subtraction. Add commissions and other fees, then convert the result to the strategy's reporting currency. A partial fill uses its volume-weighted price and actual filled quantity.

This measure combines the spread paid, price movement during routing and market impact. Keep a separate record of the quoted spread at arrival if the agent needs to diagnose which component changed.

Do not add the full quoted spread to shortfall measured from the midpoint: that counts the spread twice. For a simpler component view, record half the quoted spread and compare the fill with the midpoint at the time of the fill. State which definition the report uses.

Include the fees that reach the account, not just the broker's headline commission. These can include exchange, clearing, regulatory or venue charges, plus currency conversion. Record maker rebates as a separate credit. A rebate is conditional on a maker fill and should not be assumed for an order that may execute as taker.

Compare costs with gross strategy value on the same basis. If a signal expects 2 pips on a standard EUR/USD lot, a 0.8-pip spread, 0.2 pips of adverse movement on each side and round-trip commission equivalent to 0.6 to 1.4 pips leaves roughly 0.2 to 0.6 pips before other effects.

That is a narrow margin. Convert commissions using the contract's pip value and the account's currency, rather than treating a dollar fee as the same cost across instruments.

Set a benchmark before tuning the strategy

Use these as typical market ranges for liquid instruments under ordinary conditions, not as a broker quote or a promise about a particular venue. Instrument, order size, session, account type and routing all change the result. Slippage ranges below are per side against an arrival reference for modest orders; news, illiquid periods and larger orders can produce much higher costs.

MarketSpread, typical rangeCommission, typical rangeSlippage, typical range
Major FX pairs0.1 to 1.5 pips$3 to $7 per side per standard lot on commission-based accounts0 to 0.5 pips in liquid sessions; often wider around releases or thin hours
Liquid US equities0.1 to 5 basis points during core hours$0 to $0.005 per share per side, plus applicable pass-through fees0 to 5 basis points for modest orders in ordinary conditions
Liquid futures1 to 2 ticks$0.50 to $3 per contract per side for broker commission, with exchange and clearing fees potentially extra0 to 1 tick in liquid conditions; more around fast markets
Liquid crypto spot1 to 20 basis points1 to 10 basis points per side, depending on tier and maker or taker status0 to 20 basis points for modest orders; size and book depth matter

These ranges are useful for spotting a unit error or an implausibly optimistic model. They are not a substitute for measuring the intended route. A spread-only FX account may show no explicit commission but charge through a wider spread. Equity fees can depend on routing and venue.

Futures commission figures often exclude exchange and clearing charges. Crypto fees may change with volume tiers or order classification.

Before comparing instruments, normalise cost to basis points of notional, ticks, pips or another contract-specific unit, and also retain the amount in account currency. Report median and 90th-percentile cost, not only the mean. A mean can conceal a small set of expensive fills that dominate a strategy with frequent trading.

Log each order from decision to fill

Execution data needs a stable link between the strategy decision, the order request and every resulting event. Store timestamps in UTC and retain the exchange or broker timestamp alongside the agent's local timestamp. Measure clock and network latency where possible. If quote and fill timestamps come from different clocks, note the uncertainty rather than reporting a precise slippage figure.

For each order, capture these fields in a structured record:

  • Instrument, venue or route, side, order type, time in force, requested quantity and limit price.
  • Decision time, arrival midpoint, bid, ask, quote timestamp and observed quote age at submission.
  • Submit, acknowledgement, partial-fill, fill, cancel and reject timestamps, with the broker's order and execution identifiers.
  • Each fill's price and quantity, the weighted average fill, explicit fees, rebates and fee currency.
  • Requested versus filled quantity, remaining quantity, cancellation reason and any replacement order relationship.
  • Market state tags such as session, spread bucket, volatility bucket and whether a scheduled release was in progress.
  • Decision reference price, benchmark definition, calculated shortfall and the conversion rate used for account-currency reporting.

Keep events rather than overwriting an order row with its latest status. A request can be acknowledged, partially filled, cancelled and then replaced. Treating that sequence as one clean fill hides both exposure and cost. Deduplicate repeated broker events by execution identifier, and reconcile the agent's records to the broker's end-of-day statement.

Run a controlled test this week

Freeze the strategy rules and the order policy while collecting data. If both change during the test, a shift in cost cannot be separated from a shift in behaviour. Use live market data and paper orders first if live risk is not approved, but label simulated fills clearly: a paper fill usually cannot establish queue position, market impact or the exact slippage of a live route.

Work through this schedule and keep the output reproducible:

  • Day one: write down the shortfall formula, fee sources, instrument units and reporting currency. Check that a hand-calculated order matches the agent's output.
  • Days two and three: collect every order event without changing sizing or order type. Check that the arrival quote is fresh and that partial fills and rejects remain linked to the original decision.
  • Day four: reconcile fills and charges against broker records or the paper system's event log. Investigate missing fees, duplicate events, timestamp gaps and unconverted currencies.
  • Day five: group results by instrument, order type, session and spread bucket. Compare median and 90th-percentile cost with the strategy's expected gross edge, and inspect the most expensive orders individually.

Aim for at least 100 comparable fills if the strategy produces them in a week. If it does not, report the sample size and treat the estimate as provisional.

Do not pool different instruments or market regimes just to make a larger number. A handful of fills can validate logging and accounting, but it cannot establish a stable slippage distribution.

Paper trading is useful for checking order-state handling and whether the agent records the right fields. It cannot replicate all live execution effects. An agentic paper trading environment, available from $9.99 a month, can support that workflow; keep simulated cost assumptions separate from measured live fills.

Turn the measurements into order rules

Use the results to set limits the agent can enforce, not just metrics for a dashboard. For each instrument and order type, define a maximum acceptable spread at submission, a quote-age limit, and a maximum order size relative to visible depth or recent volume. If the spread is too wide or the quote is stale, reject or defer the order rather than sending it into an unknown market.

Choose market or limit orders based on the cost distribution and the strategy's need for immediacy. Market orders reduce uncertainty about whether an order executes, but can pay more in a fast or shallow book.

Limit orders cap the price but may not fill, may fill only partly, and can leave the agent holding unwanted exposure. Track fill rate and time-to-fill alongside cost, so the agent does not optimise fees by silently missing trades.

Set a slippage alert using a rolling percentile or a fixed cost budget in the same units as the strategy. On an alert, the agent can reduce size, switch to a defined fallback policy, or stop opening new positions and notify an operator. Do not let an automatic retry turn one rejection into multiple unintended orders. Reconcile order state before resubmitting, and use a stable client order identifier where the broker supports it.

After the week, retain the raw events, calculation version and grouped report. Re-run the calculation after a strategy or broker change, and compare like with like. The next useful improvement is usually a specific one: a stale-quote guard, a size cap, a session restriction or a corrected fee model. Choose it from the measured failure, not from a generic assumption that every order should be cheaper.

This week, instrument one strategy to record arrival midpoint, every fill and every fee for each order.

Frequently Asked Questions

How do I calculate cost of execution for a trading agent?

Compare the volume-weighted fill price with the midpoint immediately before submission, adjusting the sign for buys and sells, then multiply by filled quantity. Add actual commissions and pass-through fees, and convert to the account currency. Keep the quoted spread as a diagnostic, not an extra charge to add to midpoint-based shortfall.

What is a typical slippage range for an automated trade?

For modest orders in liquid conditions, typical market ranges can be near zero to 0.5 pips per side in major FX, 0 to 5 basis points in liquid US equities, or 0 to 1 tick in liquid futures. News, stale quotes, large size and thin order books can produce substantially more.

Can paper trading measure live execution costs?

Paper trading can test order submission, event handling and cost calculations, but it usually cannot reproduce queue position, market impact or live routing behaviour. Treat simulated fills as a check on software and assumptions, not as measured live slippage.