Learning objectives
- Track quantity ahead of a passive order under explicit assumptions.
- Separate cancellation ahead from cancellation behind the order.
Prerequisites: Understand FIFO, displayed depth and passive order placement.
Mechanism and interpretation
A passive order's fill depends on how much eligible quantity has priority ahead of it and what events remove that quantity. Under a simplified FIFO model, executions consume the front of the queue. Cancellations ahead improve position; cancellations behind do not. A total-depth reduction therefore cannot be translated directly into progress toward a fill without knowing where it occurred.
Represent the state as quantity ahead, own remaining size and quantity behind. Update each with the event stream and venue rules. A market-by-price feed may not reveal the needed order identities, so simulations should show optimistic and conservative queue assumptions rather than claim exact fills. Fill probability is conditional on market state, and fills may occur more often when prices are about to move adversely.
Worked case · synthetic data
A synthetic buy has 300 units ahead and own size 50. Seller-initiated executions remove 180 from the front, leaving 120 ahead. A known cancellation of 80 ahead leaves 40. A further 50-unit execution consumes those 40 and fills 10 of the order, leaving 40 own units. If the 80 canceled units had instead been behind, the order would still have 70 ahead after that final execution.
Failure modes and context
Reserve replenishment, priority changes and hidden orders can alter the simple queue. Local placement time is not necessarily exchange acceptance time. A simulator that assumes every cancellation improves its own position can exaggerate fills. A high fill rate alone may be undesirable if filled orders systematically precede adverse moves.
Practice assignment
There are 200 units ahead and your order size 30. Executions consume 150. A40-unit cancellation is confirmed behind you. Another 60 units execute. Calculate your fill under the simplified FIFO model. Then repeat if the cancellation had been ahead instead.
Worked answer
With cancellation behind,50 remain ahead after the first execution; the next 60 fill 10 of your 30. With cancellation ahead, only 10 remain ahead; the next 60 fill all 30 and continue into later orders. Cancellation location changes the outcome even though aggregate canceled volume is identical.
Check your understanding
Question 1
Does cancellation behind improve your FIFO priority?
- No
- Yes by the full canceled amount
- Only if your order is small
Reveal answer and reasoning
A. No
It removes quantity that was not ahead of you.
Question 2
What is filled when 40 are ahead and 50 execute?
- 50 of your units
- None
- 10 of your units
Reveal answer and reasoning
C. 10 of your units
The first 40 executions remove prior quantity; the remaining 10 reach your order.
Question 3
Why report fill-model assumptions?
- Every feed contains trader identities
- Aggregate depth may not reveal exact queue position
- They guarantee profitable fills
Reveal answer and reasoning
B. Aggregate depth may not reveal exact queue position
Unobserved priority details make exact historical fill claims unreliable.
