The fourth term of the return equation is trading costs, and it is subtracted: all traders bear it together, and it turns trading as a whole from a zero-sum game into a negative-sum one. The most direct of these costs is the bid-ask spread. People who want to trade immediately pay it to people who are willing to wait. It compensates three costs: the cost of processing orders, the risk of holding inventory, and the losses from trading with better-informed counterparties. The more informed traders there are, the wider the spread; and liquidity tends to vanish first at exactly the moment it is most needed.
Open the quote for any stock and you will see two rows of numbers: the prices and quantities at which people are willing to buy, and the prices and quantities at which people are willing to sell. The gap between the highest bid and the lowest ask is the bid-ask spread. In Trading and Exchanges: Market Microstructure for Practitioners, Harris describes liquidity along four dimensions: how narrow the spread is (width), how much can trade at each price level (depth), whether a trade can be done at once (immediacy), and how quickly the price recovers after a large order hits it (resiliency).
The order book: four dimensions of liquidity
Sell orders are above, buy orders below. Drag the size of a market buy order to see how many ask levels it eats through and what its average price is; then see how the book recovers.
A small market order pays only half the spread. A large order "eats" through several price levels in turn, and its average execution price moves further and further from the midpoint. For buyers and sellers alike, how good or poor liquidity is shows up directly as lower or higher trading costs.
Why does a spread exist? Demsetz gave the most basic answer in 1968: buyers and sellers do not arrive at the market at exactly the same moment. Someone in a hurry to sell might wait a long time if they insisted on waiting for a buyer to appear. A market maker stands in the middle, ready to buy or sell at any time, and bridges the mismatch in timing between the two sides; the spread is the price of this service.
Buyers and sellers do not arrive at the same time
Buyers (top) and sellers (bottom) arriving at random over one hour. Switch the market maker on and off to compare waiting times and the price paid.
The spread is therefore not a pure loss. Those in a hurry to trade pay the spread and receive immediacy in return; those willing to post orders and wait earn the spread, but bear the risk that their orders may never be filled.
The spread a market maker charges has to cover three kinds of cost. In Market Microstructure Theory, O'Hara groups the relevant theory into two broad families: inventory models (such as Garman 1976 and Stoll 1978) and information models (such as Copeland and Galai 1983). Taken together, the spread has three components:
The spread has three components
Tap any part to see what it compensates. Switch the type of stock to see how the composition changes.
In Huang and Stoll's 1997 estimates for the 20 stocks in the Major Market Index in 1992, order-processing costs made up about 60% of the spread, inventory costs about 30% and adverse selection about 10%. The composition varies widely across markets and stocks: small-cap stocks and stocks with little public information usually carry a larger adverse-selection share.
Market makers do not want to bet on the direction of prices. When sell orders keep arriving, the market maker is forced to hold more and more shares and will lose money if the price falls. Ho and Stoll (1981) and Amihud and Mendelson (1980) analysed how market makers respond: they lower both bid and ask, buying less and selling more, to push inventory back to its normal level. The more volatile the price, the riskier the inventory and the wider the spread.
In 1971 Treynor, writing under the pseudonym "Walter Bagehot", published "The Only Game in Town". He pointed out that a market maker is bound to lose when trading with informed traders and can only make the losses back from trades with the uninformed. Glosten and Milgrom (1985) turned the idea into a model. The market maker does not know who the counterparty is, but knows what share of traders are informed; each buy order that arrives makes it a little more likely that the stock is worth more. The market maker sets quotes so that the expected loss from trading with the informed is exactly offset by the gains from trading with the uninformed. The larger the share of informed traders, the wider the spread; and as trades take place one by one, quotes move step by step towards the true value. This is how information enters prices.
The same mechanism shows that part of the spread paid by ordinary uninformed investors is in effect paying for the advantage of the informed.
Since every trade costs the spread, less liquid assets need higher expected returns as compensation. Amihud and Mendelson (1986) found that stocks with wider bid-ask spreads earn higher average returns, and that the relationship flattens as the spread widens: investors who trade often naturally choose liquid assets, while long-term holders are willing to hold illiquid assets for their higher returns.
Illiquid assets must offer higher returns as compensation
Left: the spread and trading frequency determine the cost paid each year. Right: stocks with wider spreads earn higher average returns, and the increase gradually flattens.
Liquidity is not a fixed number. When the market is calm, the order book is full of quotes at every price level. When the market swings violently, the inventory risk and adverse-selection risk that market makers face rise together, and they withdraw their quotes or widen their spreads sharply. On 6 May 2010, the US stock market plunged within minutes: the Dow Jones Industrial Average fell by about 9% intraday, and most of the decline was recovered within about 20 minutes. The joint report of the Commodity Futures Trading Commission and the Securities and Exchange Commission showed that during this period the quotes for many stocks were almost entirely withdrawn, and some stocks traded at plainly absurd prices such as one cent.
Liquidity vanishes first when it is needed most
The same market sell order for 3,000 shares, filled in a calm market and in a violently swinging one. In the turmoil, market makers withdraw their quotes, and the bids left in the book are thin and far away.
This means that a market that normally looks highly liquid may, at the moment liquidity is most needed, offer no way to trade at a reasonable price. Stop orders, which usually become market orders once triggered, are especially dangerous at such moments.
Liquidity determines the true cost of a trade, and whether a position can be exited as expected in extreme moments.
Estimate the average fill price and the cost relative to the midpoint from the current order book, rather than showing only the last price.
Offer limit orders and filling in tranches so that users who are not in a hurry pay less spread, and explain the risk of not being filled.
For illiquid assets, show how much frequent buying and selling will cost each year.
Show spread and depth around the open and close, in pre-market and after-hours trading, and in violent swings; explain that a triggered stop order may be filled at a price far worse than expected.