← Market microstructure

Trading · Lesson 1 of 12

The order book: how a price is actually formed

11 min read · Free preview

In this lesson · 7 sections

Ask most investors what the price of Nestlé is and they will name a single number. That number is the last trade — a historical record of a transaction that has already happened, between two counterparties, for a specific quantity, and it may be seconds or minutes stale. It is not a price at which you can transact. It is not even a price at which anyone can currently transact.

What exists instead is a pair of queues. On one side, resting buy orders sorted by price. On the other, resting sell orders. The best buy price and the best sell price are separated by a gap, and every trade in a continuous market is one participant crossing that gap to consume someone else's resting order. Understanding what determines the width of the gap, how deep the queues are, and what happens to both when you arrive with size is the whole subject of market microstructure. It is also the difference between a strategy that works on paper and one that works after execution.

The mechanism: a continuous double auction

Modern equity venues, including SIX Swiss Exchange, operate a central limit order book under price-time priority. Two order types do all the work.

A limit order specifies a price and a quantity and rests in the book until filled or cancelled. It supplies liquidity; the trader who places it is the maker. A market order specifies only quantity and executes immediately against the best available resting orders. It consumes liquidity; that trader is the taker.

Price-time priority means the book sorts first by price — the highest bid and the lowest ask stand at the front — and, among orders at the same price, by the time they arrived. That second rule matters more than it sounds. Queue position at the best price is an asset with real value, because being early in the queue means you get filled before the price moves away, and being late means you get filled mainly when the price is about to move against you.

Here is a book for a stock trading around CHF 100, with a one-centime tick:

Bid sizeBidAskAsk size
800100.02100.04400
1,200100.01100.05900
2,500100.00100.061,500
3,00099.98100.105,000

The best bid is 100.02, the best ask 100.04, the spread 0.02 — two ticks, or about 2.0 basis points of the CHF 100.03 mid-price. The half-spread, roughly 1 basis point, is what one side of the trade costs; a small round trip — buy at the ask, sell at the bid — costs the full spread, two ticks or about 2 basis points, before anything has happened.

The mid is a convenient reference, not a forecast. A better one-step forecast is the microprice, which weights each side by the size on the opposite side:

(800 × 100.04 + 400 × 100.02) / 1,200 = 100.0333

There are twice as many shares bid as offered at the touch. The queue of buyers will take longer to clear than the queue of sellers, so the next tick is more likely to be up than down. Order book imbalance is one of the most robust short-horizon predictors in high-frequency data, and the microprice is its simplest expression.

What a large order actually costs

Now send a market order to buy 2,000 shares. There are only 400 at the best ask, so the order walks the book:

  • 400 shares at 100.04 = CHF 40,016
  • 900 shares at 100.05 = CHF 90,045
  • 700 shares at 100.06 = CHF 70,042

Total consideration: CHF 200,103, an average fill of 100.0515.

Measured against the 100.03 mid at the moment of arrival, that is 0.0215 per share of implementation shortfall, or CHF 43.00 in total — about 2.15 basis points. Note that the quoted half-spread was only 1 basis point. Walking the book more than doubled the cost, and this was a modest order in a liquid name.

The book is also now different. The best ask is 100.06 with 800 shares remaining, and the spread has widened from two ticks to four. Be precise about what moved: the best ask rose from 100.04 to 100.06, two basis points, and the mid from 100.03 to 100.04, one basis point. The spread doubled. None of it happened with any news, no change in Nestlé's cash flows and no change in anyone's opinion. It moved because inventory was consumed. Anyone reading the tape sees a price rise; what actually happened was that liquidity was removed.

One Swiss detail bounds how deep that book can ever be. Depth is not a property of a company's size; it is drawn from the shares that actually circulate. SIX's Listing Rules make the minimum explicit: for admission, the securities in public ownership must amount to at least 20% of the issuer's outstanding securities in that category, and the capitalisation of that free float must be at least CHF 25 million. That is a floor for admission, not a description of the typical Swiss issuer — and plenty of listings sit far closer to it than their headline market capitalisation suggests, because founding families, foundations and long-term anchor shareholders hold the balance and do not trade it. Two companies of similar market value can therefore present completely different books at the touch. Before assuming a Swiss listing can absorb your order, check what fraction of it is genuinely in circulation.

Why the spread exists at all

Market makers do not quote a two-sided price out of civic duty. Three costs have to be recovered, and the academic literature separates them cleanly.

Order processing. Connectivity, clearing, capital, technology. Small and largely fixed.

Inventory risk. A maker who gets filled on the bid now holds shares they did not want and bears price risk until they can offload them. Ho and Stoll modelled this in 1981: the maker skews quotes away from their current inventory to induce trades that flatten it. If a maker is long, they shade both bid and ask lower to attract buyers. This is why the mid can drift with no information whatsoever.

Adverse selection. This is the dominant term and the intellectually important one. Some of the traders lifting your offer know something you do not. Glosten and Milgrom showed in 1985 that even a risk-neutral, perfectly competitive market maker with zero costs must quote a spread, purely because a fraction of incoming orders are informed. The maker loses to the informed and must recover it from the uninformed. The spread is a tax the liquidity-seeking public pays to fund the maker's losses to insiders.

Kyle's 1985 model gives the continuous version: price impact λ, where the price moves linearly in signed order flow, and λ is increasing in the amount of private information and decreasing in the volume of uninformed "noise" trading. Two consequences follow directly. Spreads widen before scheduled announcements, because the probability of informed flow rises. And a market with more retail participation can support tighter spreads, because there is more noise flow across which to spread the losses.

Roll showed in 1984 that you can back out the effective spread from transaction prices alone, since bid-ask bounce induces negative serial covariance in successive price changes: spread ≈ 2√(−cov(Δpₜ, Δpₜ₋₁)). It is a neat demonstration that the spread is not an artefact of quotation conventions but a measurable property of the price series itself.

Impact scales as the square root, not linearly

If you need to trade far more than the visible book, the relevant empirical regularity is the square-root law of market impact: the price impact of executing a quantity Q is approximately proportional to σ·√(Q/V), where σ is daily volatility and V is average daily volume. The coefficient is of order one and is estimated from broker data rather than derived from theory, so treat it as a scale, not a precision instrument.

Work an example. A stock with 2% daily volatility, and you must trade 10% of average daily volume. Impact ≈ 2% × √0.10 ≈ 0.63%, or 63 basis points. That is thirty times the quoted spread. For a fund running CHF 50 million into a mid-cap listed on SIX, this term dominates every other cost in the strategy, including management fees.

Two practical implications fall out. First, the visible book is a poor guide to available liquidity — most of the real supply is latent, held by participants who will only show it when price moves toward them. Second, impact is why execution is spread over time via schedule-based algorithms, and why the trade-off is explicit: trading slowly reduces impact but increases the risk that the price drifts away while you wait. Almgren and Chriss formalised that trade-off as an efficient frontier between expected cost and execution variance.

Auctions, hidden liquidity, and the Swiss venue landscape

Continuous trading is not the only mechanism. SIX runs an opening auction, continuous trading, and a closing auction. In an auction, orders accumulate without executing, and at uncrossing a single clearing price is chosen — the price that maximises executable volume — with every participant trading at that same price. Auctions eliminate the queue race entirely and concentrate liquidity into one instant. The closing auction has become a large and growing share of the trading day's volume across European venues, driven by index funds that must transact at the official close to minimise tracking error. If you are trading size in a Swiss listed stock and do not need immediacy, the close is usually where the liquidity is.

Beyond the lit book, part of the volume executes in dark venues — SIX operates SwissAtMid, which matches at the midpoint of the lit book. Midpoint matching removes the spread cost entirely for both sides, which is the attraction. The trade-off is uncertainty of execution and the risk of being matched precisely when the midpoint is about to move, which is adverse selection reappearing in a different suit. Iceberg orders serve a related purpose in the lit book: they display a small portion and refill from a hidden reserve, reducing information leakage at the cost of losing time priority on each refill.

One practical consequence for anyone reading a Swiss order book: since 2019, trading in Swiss blue chips has been concentrated on SIX rather than dispersed across competing European venues, so the depth you can see at SIX is much closer to the whole picture than it would be for a German or French large cap. The lesson on exchanges and dark pools explains why, and what fragmentation does to the numbers elsewhere.

What to take away

  • The last traded price is a historical record, not an executable price; what you can actually transact at is the best bid, the best ask, and however deep the queues run behind them.
  • Compute the true cost of an order as implementation shortfall against the arrival mid, not as the quoted spread — in the worked example a 2,000-share order cost 2.15 basis points against a quoted half-spread of 1 basis point, and it left the spread twice as wide as it found it.
  • The depth behind the touch comes from the free float, not from market capitalisation, and SIX's admission threshold of 20% in public ownership worth at least CHF 25 million is a floor rather than a norm — so check what actually circulates before sizing an order in a Swiss listing.
  • Expect impact on large orders to scale roughly as σ·√(Q/V): trading 10% of daily volume in a stock with 2% daily volatility implies impact around 60 basis points, which will dominate the economics of any strategy that requires it.
  • Order book imbalance carries genuine short-horizon information — the microprice, weighting each side by the opposite side's size, is a better next-tick estimate than the mid — but that information decays in seconds and is not a signal for position-holding.

Sources

  • Lawrence R. Glosten and Paul R. Milgrom, "Bid, Ask and Transaction Prices in a Specialist Market with Heterogeneously Informed Traders", Journal of Financial Economics, 1985.
  • Albert S. Kyle, "Continuous Auctions and Insider Trading", Econometrica, 1985.
  • Richard Roll, "A Simple Implicit Measure of the Effective Bid-Ask Spread in an Efficient Market", Journal of Finance, 1984.
  • Thomas Ho and Hans R. Stoll, "Optimal Dealer Pricing under Transactions and Return Uncertainty", Journal of Financial Economics, 1981.
  • Maureen O'Hara, Market Microstructure Theory — the standard graduate text.
  • Joel Hasbrouck, Empirical Market Microstructure.
  • Robert Almgren and Neil Chriss, "Optimal Execution of Portfolio Transactions", Journal of Risk, 2000.
  • Jean-Philippe Bouchaud, Julius Bonart, Jonathan Donier and Martin Gould, Trades, Quotes and Prices: Financial Markets Under the Microscope — on empirical impact and the square-root law.
  • SIX Swiss Exchange trading rules and guidelines on trading models, auctions and SwissAtMid; SIX Exchange Regulation, Listing Rules, on the capitalisation and free-float conditions for admission to trading; Swiss Federal Council ordinance on the protection of Swiss stock exchange infrastructure, in force from 1 July 2019.

Keep your place as you learn. A free account unlocks every lesson and saves your progress.

Create a free account / sign in →