← Back to blog

Order Fill Analysis for Traders: Survival Models, 3 Metrics, Workflow

September 13, 2026
Order Fill Analysis for Traders: Survival Models, 3 Metrics, Workflow

An order fill is the execution of all or part of a submitted order, and a partial fill happens when only some of the requested size trades before the rest is canceled or left working. Order fill analysis measures what that execution actually cost you, using three numbers: slippage against the mid or touch price, time-to-fill, and post-trade markouts. This article walks through how to calculate each one, how modern survival-analysis models estimate fill probability, and how to build a repeatable measurement workflow with your own trade data.


TL;DR:

  • Slippage should be measured against both mid and touch prices to distinguish overall cost from spread effects, with sign conventions kept consistent for buys and sells.
  • Time-to-fill analysis must incorporate censored data through survival analysis to avoid bias from unfilled or canceled orders.
  • Markouts provide insights into order quality by comparing post-trade price movements and identifying adverse market conditions or stale liquidity issues.
  • Order types and instructions significantly influence fill probabilities and costs, requiring detailed tagging and analysis to understand their effects accurately.
  • Building a structured, repeatable workflow with proper data collection and analysis tools is essential for ongoing order fill performance improvement and effective decision-making.

Disciplineaiapp
Make Better Trading Decisions
Discipline AI analyzes market structure, liquidity, volatility, and historical patterns to support more informed trading decisions.
Explore Discipline AI

Table of Contents

Order Fill Analysis: The Core Metrics You Need to Track

Three numbers do almost all the work in order fill analysis: slippage, time-to-fill, and markouts. Get comfortable calculating these three, and you can diagnose most execution problems without touching a statistics textbook.

Slippage is the difference between your average fill price and a reference price, usually the mid-quote or the near-touch price at the moment you submitted the order. The standard way to express it is basis points of notional, which normalizes across price levels and instrument types. The formula for a buy order looks like this:

Slippage (bps) = ((Fill Price − Reference Price) / Reference Price) × 10,000

For a sell order, you flip the sign so a positive number always means the trade cost you money and a negative number means you got price improvement. If you buy slightly above the mid-price, that represents positive slippage in basis points. Selling at the same price against the mid represents negative slippage, meaning price improvement. Topstep's guide to order types and fills uses this same sign convention, and it is worth adopting because it keeps your cost ledger consistent across long and short positions.

You have a choice of reference price, and the choice changes what the number tells you. Slippage versus mid measures your total distance from the fair-value midpoint, capturing both the cost of crossing the spread and any additional adverse movement. Slippage versus the near touch (the best bid or offer on your side) isolates just the cost beyond the quoted spread, which is more useful when you want to know whether your order type or routing choice, rather than the market's spread, is driving the cost.

Time-to-fill measures how long an order sits live before it fills, cancels, or times out. This sounds simple until you hit the problem of censoring: some orders in your sample never fill at all, they get canceled or expire. If you only average the fill times of orders that actually filled, you throw away the information contained in every order that did not, and your estimate becomes biased toward fast, easy fills. Survival analysis exists specifically to handle this, and it comes up again in the next section.

Markouts track how the price moves after your fill, typically measured at fixed intervals like 1 second, 10 seconds, and 60 seconds post-execution. A markout is calculated the same way as slippage, but the reference price is sampled after the trade instead of before it. If you buy and the price keeps drifting up in the following seconds, your markout is positive and you likely got a good fill relative to where the market was heading. If the price reverses against you right after the fill, that is a sign your order may have been picking off stale liquidity or trading into a moving market.

Here is how the three metrics compare when you are deciding which one explains a specific execution problem:

MetricWhat it measuresBest used to diagnose
Slippage vs midTotal distance from fair value at entryOverall execution cost, spread-crossing cost
Slippage vs touchCost beyond the quoted spreadRouting quality, order-type aggressiveness
Time-to-fillDuration until execution or cancellationIlliquidity, order placement too far from touch
MarkoutsPrice drift after the fillAdverse selection, information leakage

A few practical notes when you build your own calculations:

  • Always include commissions, exchange fees, and any rebate or fee schedule in your total bps figure. Two brokers can show identical slippage but very different all-in costs once fees are added back.
  • Keep sign conventions consistent across buys and sells before you aggregate anything. Mixed signs will make an average look artificially small.
  • Sample your reference price at the exact order-entry timestamp, not the timestamp you happen to have logged in your own system, since even a one-second lag can distort slippage on volatile names.
  • Report slippage in both bps and dollar terms. Basis points let you compare across instruments; dollars tell you what it actually cost your account.

The pfolio-execution-quality harness formalizes this exact breakdown, outputting per-trial rows that log slippage versus mid, fill status, and post-fill drift, then rolls them up into bps-of-notional totals per strategy. That structure is worth copying even if you build your own tooling from scratch.

How Order Types and Instructions Shape Your Fills

The order type you choose is the single biggest lever you control before an order ever reaches the book, and it determines both how likely you are to fill and how much that fill will cost you.

A market order trades immediately against whatever liquidity sits on the book, guaranteeing a fill but leaving the price uncertain. It is the fastest instruction available, which is precisely why it tends to produce the worst average slippage: you are paying for certainty of execution, not certainty of price. A limit order guarantees the price but not the fill. Placed at or better than the current touch, it may fill instantly; placed inside the spread or away from the market, it waits, and that waiting time is exactly what time-to-fill analysis is built to measure.

Beyond the basic market/limit split, several instructions modify how an order interacts with the book:

  • Immediate-or-cancel (IOC): executes whatever quantity is immediately available and cancels the rest. Useful when you want partial execution without leaving a resting order exposed to information leakage.
  • Fill-or-kill (FOK): must execute the entire order size immediately or the whole order is canceled. Investor makes the tradeoff explicit: FOK guarantees all-or-none execution, but that requirement raises the odds of a full cancel compared with an IOC or a plain marketable limit, since the available size at your price has to match your full order.
  • All-or-none (AON): similar intent to FOK but does not require immediate execution, allowing the order to rest until the full size can be matched.
  • Pegged orders: automatically adjust their limit price to track a reference, often the midpoint or the near touch, keeping the order competitive without manual repricing.
  • Midpoint-limit orders: rest at the midpoint of the current spread, capturing half the spread cost in exchange for uncertain, often slower, fills.
  • Hidden and iceberg orders: display only a portion of total size on the book, reducing information leakage but sometimes reducing queue priority depending on venue rules.

Each of these instructions changes what you should expect to see in your fill-analysis output. An IOC order that never fills is not evidence of illiquidity in the same way a resting limit order's slow fill is. A pegged order that fills quickly but shows poor markouts might be chasing a moving price rather than capturing genuine liquidity. If you lump all order types together in one slippage average, you erase the very distinctions that would tell you which instruction is actually working.

That is why the operational habit matters more than the analysis: tag every order at the point of submission with its order type, venue, and routing destination. Without that tag, you cannot later separate "IOC orders routed to venue A filled in 400 milliseconds with 2 bps slippage" from "resting limit orders on venue B took 40 seconds and cost 8 bps in markouts." That granularity is the whole point of order fill analysis. Skip the tagging step and you are stuck analyzing an undifferentiated blob of fills that tells you almost nothing about which instruction to use next time. Our guide to market versus limit orders goes deeper into the practical tradeoffs between the two most common instructions if you want the fundamentals before layering on the more exotic order types.

Predicting Fill Probability With Survival Analysis and Machine Learning

Fill probability is not a single number. It is a distribution over time, and the modeling framework built to handle exactly that kind of distribution is called survival analysis.

The core problem survival analysis solves is censoring. In any sample of limit orders you pull from your trading history, some filled and some got canceled before they ever traded. If you calculate average time-to-fill using only the orders that filled, you are systematically ignoring every order that timed out or got pulled, and your estimate skews optimistic. Survival analysis treats every order, filled or not, as a data point with either an observed fill time or a censoring time, and models the full distribution of "time until fill" rather than a single mean.

Illustration of filled and censored orders over time

A 2023 paper on deep attentive survival analysis in limit order books applies this framework directly to fill-time prediction. The approach uses a convolutional-transformer encoder to process time-varying limit order book features, feeding into a monotonic decoder that outputs a full survival curve for each order rather than a point estimate. The features that matter most in this kind of model are queue position, order book imbalance, and short-horizon volatility, all measured continuously rather than as static snapshots taken at order entry. That continuous framing matters because a limit order sitting still is not experiencing a static environment. The book around it is constantly reshuffling, and an order's fill odds five seconds in can look very different from its fill odds five minutes in.

Compare that to the simpler approach most traders start with: a historical fill rate, calculated as the percentage of similar past orders (same instrument, similar size, similar distance from touch) that eventually filled. That simple rate is a reasonable starting point and costs you almost nothing to compute. Its weakness is that it collapses the entire time dimension into one number, telling you nothing about whether a typical fill takes two seconds or two minutes, and it handles censoring poorly unless you are careful to build it as a proper survival estimator rather than a naive completion percentage.

When each approach makes sense:

  • Use a simple historical fill rate when you need a fast, directional read and your sample size per bucket is small. It is transparent and easy to explain to a risk desk.
  • Use a survival-model approach when you are optimizing execution algorithms at scale, need the full time distribution (not just "did it fill"), or are dealing with instruments where fill dynamics change quickly with volatility regime.
  • Treat model output as a probability distribution, not a guarantee. Even a well-fit survival curve tells you the odds an order fills within a given window. It does not tell you your specific order will.

Modern fill-probability models are typically evaluated with the Brier score, which measures the accuracy of probabilistic predictions by penalizing confident wrong answers more heavily than confident right ones, and interpreted using Shapley values, which attribute a model's prediction back to individual input features so you can see whether queue imbalance, volatility, or order size drove a given fill-probability estimate.

Statistically speaking: the arXiv research found that survival-based models trained on time-varying order book features outperformed simpler completion-rate baselines on predictive accuracy, precisely because they model censoring explicitly instead of discarding canceled orders from the sample.

None of this is free of caveats. Fill-probability models trained on historical data carry the same risk any market model carries: the relationship between order book features and fill outcomes is not stationary. A model trained during a low-volatility regime can misprice fill odds badly once volatility spikes and queue dynamics change. Small sample sizes compound the problem. If you are estimating fill probability for a thinly traded instrument or an unusual order size, you may only have a handful of comparable historical orders to learn from, and any estimate built on that few data points will bounce around with the next few observations rather than converging to something stable. Treat model-based fill probabilities as one input into a decision, not a number to trade against blindly.

Building a Repeatable Fill-Analysis Workflow

Good fill analysis requires the right raw data, and most traders discover the gaps in their data only after trying to run the calculation for the first time.

At minimum, you need your own execution records (timestamp, price, size, order type, venue), a National Best Bid and Offer (NBBO) feed to establish reference prices at order entry and at each markout interval, and ideally Level 1 or Level 2 book snapshots if you want to measure queue position and spread context at the moment you submitted the order. Timestamp precision matters more than most traders expect. If your execution timestamps are only accurate to the second, you cannot reliably match them against a fast-moving NBBO feed, and your slippage numbers will carry noise that has nothing to do with your actual execution quality.

Matching your own fills against the public tape, sometimes called tape matching, is where most of the practical friction shows up. A useful heuristic set, documented in a technical walkthrough on execution matching, retrieves candidate trades within roughly a one-second window of your fill timestamp, then narrows the match using price and size, and falls back on venue information when multiple trades match on price and size alone. Even with these heuristics, some fills will not match cleanly, especially on venues or feeds where timestamps lack millisecond resolution. Accept that some percentage of your sample will be unmatched rather than forcing a bad match.

Here is a workable sequence for setting up your own experiment:

  1. Define your trial cells. Split your historical fills into groups by instrument, order size bucket, and strategy or order type. A single cell might be defined by an instrument, a range of order sizes, and instructions such as IOC.
  2. Set a minimum sample size per cell before drawing conclusions. A cell with 8 or 10 fills will show wide swings in average slippage just from randomness. Wait until you have a sufficient number of observations in a cell to trust the average, and treat early reads as directional rather than definitive.
  3. Pull reference prices for each fill. Attach the NBBO mid and touch at order entry, plus markout snapshots at your chosen intervals.
  4. Calculate slippage, time-to-fill, and markouts per fill, then aggregate to the cell level using both mean and distribution (not just the average, since tail outcomes matter for risk).
  5. Separate pre-trade estimates from realized results. Pre-trade metrics, like the spread and tick size at order entry, tell you what you expected going in; realized metrics tell you what actually happened. Keeping these separate lets you see whether a bad outcome came from a bad forecast or from execution slipping relative to a reasonable forecast.
  6. Log results in a structured format, ideally something like CSV or parquet rows with one row per trial, so you can rerun the aggregation as your sample grows without re-deriving the whole pipeline.

Pro Tip: Run initial trial cells on paper-trading data to debug matching logic, but discard that data before drawing conclusions because paper fills tend to be optimistically modeled and do not reflect live market conditions accurately.

Once you have this pipeline running, the natural next step is a cost calculator that converts raw trial rows into bps-of-notional totals per instrument and strategy, decomposing pre-trade expectations from realized costs the way TCA frameworks have done for institutional desks for years. You do not need institutional infrastructure to borrow the same logic at retail scale.

Turning Fill Metrics Into Execution Decisions

A slippage average by itself tells you almost nothing. The distribution around it tells you everything.

If your average slippage across 200 orders is 3 bps, that could mean every order cost close to 3 bps, or it could mean most orders cost near zero and a handful of outliers cost 40 or 50 bps each. Those are two completely different problems. The first case is a pricing or routing issue affecting everything you do. The second is a tail-risk problem, likely tied to specific conditions like thin liquidity, news events, or oversized orders relative to the available book depth. Look at the distribution, not just the mean, before you change anything.

Time-to-fill and slippage point to different problems, and reading them together tells you which lever to pull. A resting limit order that fills quickly but shows poor markouts suggests your price was too aggressive relative to where the market was heading, not a routing issue. An order that takes far longer than similar orders to fill, with fills eventually coming in worse than expected, points toward illiquidity in that name or venue rather than a pricing mistake on your part. Confusing the two leads traders to fix the wrong thing: repricing more aggressively when the real issue is venue selection, or switching venues when the real issue is that the order was priced too far from the market to begin with.

Sizing decisions benefit from the same square-root intuition that shows up across market-impact research: cost tends to grow roughly with the square root of order size relative to average volume, not linearly. That means doubling your order size does not double your expected slippage. It grows the cost, but at a diminishing rate relative to size, which is why splitting a large order into smaller pieces over time so often improves realized execution quality compared with sending it all at once.

  • Watch for a fat right tail in your slippage distribution before assuming your average execution cost is representative.
  • Diagnose slow fills and poor markouts as different problems: one is often a pricing issue, the other often a liquidity issue.
  • Test size reductions before assuming a routing change will fix a cost problem, since impact curves usually respond first to size.
  • Re-run the same trial cell after any execution change to confirm the improvement is real and not sample noise.

Pro Tip: Before changing your routing or algorithm, run an A/B test using the same trial-cell structure on both the old and new approach, over the same time window if possible. Comparing results from different market regimes will make almost any change look like an improvement or a regression purely by accident.

How Discipline AI Supports Order-Fill Analysis and Execution-Quality Workflows

Running the workflow above by hand, spreadsheet by spreadsheet, is doable but tedious, and that gap between knowing the framework and actually maintaining it is where most traders quietly stop measuring. There are platforms designed to help crypto, forex, and stock traders maintain the discipline of a structured execution review without building a data pipeline from scratch.

Some trading platforms provide execution quality scoring aligned with order fill metrics, enabling structured insights on fills compared to reference prices without manual data retrieval for each trade. Automated trade journaling in certain tools captures order details and outcomes, assisting tagging by labeling fills with instrument, setup, and execution context to support cell-based fill analysis workflows.

A typical workflow with trading analytics tools involves:

  • Automatically logging trades as they execute, capturing timing and order context.
  • Reviewing performance analytics revealing patterns in trade history, execution timing, and setup types.
  • Applying trade autopsy features to analyze specific trades including market conditions.
  • Using behavioral coaching prompts to identify patterns that affect execution quality, such as poor markouts.

For traders who want the deeper conceptual grounding behind these features, the Discipline AI learning center hosts practitioner-oriented playbooks on execution and trading discipline, and the Discipline AI blog covers related ground like slippage measurement and order-flow tooling in more depth than a single app-feature overview can.

What Usually Goes Wrong: A Few Rules of Thumb

The biggest mistake I see in fill analysis is not a math error. It is trusting a number that was never designed to be trusted. Paper-fill data is the worst offender: it looks like real evidence because it comes out of a backtest engine with clean, precise numbers attached, but it is modeling an idealized fill, not a real one. The second mistake is drawing conclusions from a trial cell with eight or ten observations and treating the result as settled. And the third is ignoring censoring entirely, averaging only the orders that filled and quietly throwing away the information contained in every order that did not.

Three rules of thumb hold up across most of the traders and desks that take this seriously. First, never change your execution approach based on a single trial cell without a minimum sample size you decided on before looking at the results. Second, treat every fill-probability model, however good the underlying research, as a probability distribution rather than a guarantee, and re-check it whenever volatility regimes shift. Third, keep re-running the same trial cells over time. Execution quality is not something you measure once and file away. It drifts with liquidity conditions, and only a repeatable harness catches that drift before it costs you money.

— Tony

Turn Fill Analysis Into a Habit, Not a One-Time Project

Most traders run the calculations above exactly once, usually after a bad fill makes them curious, then never touch the workflow again. Some platforms facilitate sustained execution quality review by automatically journaling trades with timing and context, scoring execution quality, and generating trade autopsies to identify patterns beyond isolated trades.

Disciplineaiapp

That matters most for traders juggling multiple instruments or timeframes, where hand-tracking slippage and time-to-fill across dozens of setups a week simply does not scale. If you already run a structured process, Trader Gibkey's guide to execution best practices is a solid companion read on the discretionary side of the equation. If you want the measurement side automated, the Discipline AI learning center is the place to start, with playbooks that walk through setting up your first execution-quality review inside the app.

Sources

FAQ

What Is an Order Fill?

An order fill is the execution of a submitted order, in full or in part; a partial fill occurs when only some of the requested quantity trades before the remainder is canceled or continues working.

Can You Make $1,000 a Day Trading?

It is possible on a given day with a large enough account and favorable conditions, but it is not a reliable outcome, and execution costs measured through slippage and markouts are one of the biggest drags on consistently hitting a daily target.

What Is MTF versus Delivery?

MTF (margin trading facility) lets a trader take a leveraged position and typically requires closing it within a set window, while delivery trading means paying the full amount and taking outright ownership of the position with no forced timeline; the distinction affects position sizing and risk more than it affects fill mechanics themselves.

What Is the 3-5-7 Rule in Stocks?

The 3-5-7 rule is an informal risk-management guideline suggesting a trader risk no more than 3% of capital on a single trade, cap total exposure across open positions around 5%, with definitions of the exact numbers varying by source, so treat it as a directional framework rather than a fixed standard.

How Do You Measure Fill Probability for a Limit Order?

You measure it with a survival-analysis model or a historical fill-rate estimate that accounts for censored (canceled) orders, using features like queue position, order book imbalance, and volatility to estimate the odds and expected timing of a fill.