Mid price
The mid price is the average of the best bid and the best ask. It is the simplest estimate of what the asset is worth at this instant.
01The formula
- the mid price: the halfway point of the market
- the best bid: the highest price anyone is willing to pay right now
- the best ask: the lowest price anyone is willing to sell at right now
02See it move
03Where it is used
- Market makerCentres its own bid and ask around the mid (or a better fair price) and measures its edge on each fill against it.
- Execution traderBenchmarks fills against the mid at the moment the order was sent, to measure how much of the spread was paid.
- Quant researcherUses mid-to-mid price changes as the clean return series for short-horizon signals, avoiding the noise of trades bouncing between bid and ask.
04Why traders use it
Trade prices jump between the bid and the ask even when nothing has changed. The mid strips out that bounce, so it is the standard reference for marking positions, measuring costs and building signals.
05Worked example
With a best bid of $99.99 and a spread of 2 ticks, the best ask is $100.01 and the mid is $100.000. Anyone who buys at the ask pays $0.010 more than the mid: half the spread.
06How it is built
- Read the top of the book: the highest bid and the lowest ask .
- The true value is somewhere in between, otherwise someone would trade.
- With no other information, take the halfway point: .
- The distance from mid to either side, , is the half-spread: what a market order pays for immediacy.
07The common mistake
Treating the mid as a price you can trade at. You buy at the ask and sell at the bid; the mid is only a reference. It also ignores size, so a book with 100 shares on the bid and 10,000 on the ask has the same mid as a balanced one.
08In Python and LaTeX
b, a = 99.99, 100.01 mid = (b + a) / 2 print(round(mid, 3), 'half-spread', round((a - b) / 2, 3))
m = \frac{b + a}{2}09Where it fits
Rather not code the maths yourself? Describe your trading idea and let AI build the bot.
Build a bot with AgenKitThe worked example and the model run the same code, so every number matches. Models simplify markets on purpose. This is education, not financial advice.