LZLZL/Prediction markets/Market making
FREEBUILD IT B · RebatesSimulation

Queue position
and conservative assumptions

2026-08-21 · when in doubt, assume against yourself

Whether a resting order fills depends on where it sits in the queue — and a simulator cannot know that. So the question is not "how do I model the queue accurately" but "which way should I be wrong". The answer is always the same: against yourself, because the two errors have wildly asymmetric costs.

1Why the queue is unknowable

What you would needReality
How much size sat ahead when you postedvisible — but not who cancels
Which of those ahead cancel before the sweepunknowable
Whether the sweep clears your level entirelysometimes; sometimes it stops short
Whether faster participants jumped aheadunknowable

Two unknowables, and both push the same way: the optimistic assumption is much easier to make. "They cancelled and I moved up" is a comfortable thing to believe, and there is no data contradicting it.

2The rules I use

assume all displayed size at the time of posting sits ahead of you assume cancellations ahead of you do not advance your position both are pessimistic, deliberately
RuleReal-world equivalent
All displayed size ranks aheadyou are the last to arrive at that price
Cancellations do not promote youthe queue never shortens in your favour
A partial sweep reaches you lastyou fill only if the level is fully cleared

This is more pessimistic than reality. That is the point — the resulting number is a lower bound, and a lower bound is something you can make a decision with.

3★ The bias is not symmetric, and that is the whole argument

⚠ Optimistic queue assumptions do something worse than inflate returns

They change which fills you get. In a simulation that lets you fill easily, you collect benign flow — the fills a real queue would have given to someone faster.

Real queues do the opposite: you miss the good fills and receive the toxic ones, because informed traders sweep through everything while uninformed traders take the top of the book.

So an optimistic queue model is not "the same result, a bit too high". It is a different and better distribution of fills than you will ever receive. That is why market-making backtests fail live far more dramatically than taker backtests do.

AssumeIf wrongCost
Optimisticbacktest positive, live negativediscovered with real money; unbounded
Conservativebacktest negative, live might worka missed opportunity; bounded

4What the conservative version produced

Running a full replay of recorded books and complete tape under those rules — naive static laddering across the board:

TenorBoardsPair rateNet ¢/share
5 minutes6036.3%−3.12
15 minutes2433.6%−9.79
1 hour654.9%+4.58 *

* and that positive figure is a lottery: one board out of six contributed +$667 while the other five had a median of −$19. Static laddering lost money on the typical board at every tenor tested.

5★ Report a range, not a point

Knowing the direction of your bias unlocks something useful: quote both bounds.

SourceResultDirection
Full simulation, conservative queue−3¢/sharepessimistic lower bound
Measured performance of a skilled operator+0.1¢/shareoptimistic upper bound
the conclusion is a range: −3¢ to +0.1¢ per share which turns the question into something specific

Namely: is there any evidence I would land at the good end? There was not, so the line was never started. With a single mid-point number that question cannot even be asked — you would believe you had an answer when all you had was an unattributed point estimate.

6A checklist

AskFailing answer
How does a resting order get filled in this model?"whatever the framework does by default"
Do cancellations ahead promote me?"I think so"
Where do unfilled orders go?"filtered out" — the sample is now contaminated
Is this an upper or a lower bound?cannot say → unusable for a decision

The third row is worth stressing: dropping unfilled orders is selection on the outcome. No-fills must be reported as a rate, never silently removed.

7One line to keep

You cannot model the queue accurately, so do not try — decide which way to be wrong. Optimism does not merely inflate the number; it hands you a better class of fill than the market will ever give you. Assume against yourself, then ask whether there is evidence you deserve better.

EvidenceCheck it yourself

The rules all displayed size at posting ranks ahead; cancellations ahead do not promote you. Both deliberately pessimistic.
Conservative simulation recorded real books plus complete tape, naive static laddering: 5m 36.3% pair / −3.12¢ (60 boards) · 15m 33.6% / −9.79¢ (24) · 1h 54.9% / +4.58¢ (6).
The hourly positive is a lottery one of six boards contributed +$667; the other five had a median of −$19.
Range not point −3¢/share (conservative lower bound) to +0.1¢/share (skilled upper bound); no evidence of reaching the upper bound, so the line was not run.
Checked 2026-07 to 2026-08.
Not included my own wallet addresses, hosts, or any strategy parameters.

NextWhere to go

F · METHOD
Replays must state their bias
B · REBATES
Pair rate and naked legs
G · ENGINEERING
Walking the book
E · UP/DOWN
What the conservative numbers concluded
This is an educational and research record. It is not investment advice, promises no returns, and offers no personalised trading recommendations. Rules and API behaviour are per the official documentation; this page states when it was checked and both can change without notice. Prediction markets are restricted or unavailable in some jurisdictions — confirm your own before taking part.