Estimate the bid-ask spread from trades alone: classify a tape into buys and sells, compute Roll's measure and the effective spread, and see where they disagree.
Quotes are not always available, but trade prices usually are. Spread estimators recover the bid-ask spread from the trades themselves. Roll's measure uses the fact that trades bounce between the bid and the ask: buys print high and sells print low, so consecutive price changes are negatively correlated. If the true value follows a random walk, the spread is s = 2√(−cov(Δp_t, Δp_{t−1})). When quotes are available, the effective spread measures what each trade really cost: 2|p − mid|, twice the distance of the trade price from the mid. This lab lets you classify a tape by hand and compare both measures.
Because of bid-ask bounce. If the last trade was a buy at the ask, the next trade is equally likely to be a buy or a sell, so on average the next price change is downward. After a sell at the bid it is upward on average. Even when the true value does not move at all, the trade price zigzags between the two quotes and the changes have negative autocovariance.
With a constant half-spread c and random buy/sell directions, the covariance of consecutive price changes is −c². Solving for the spread gives s = 2c = 2√(−cov). You only need a series of trade prices. If the sample covariance happens to be positive, the formula has no real answer; that is common in short samples and a sign the estimate is unreliable.
It measures the cost of a single trade against the mid quote at the time: effective spread = 2 × |trade price − mid|. A trade at the ask has an effective spread equal to the quoted spread; a trade inside the quotes has a smaller one. Averaging over many trades gives the cost that traders actually paid, which can differ from the quoted spread on the screen.
Roll assumes buys and sells are independent of future price moves. Informed traders break that: after a buy the value tends to rise, which adds positive correlation to the price changes and cancels part of the negative bounce. The covariance becomes less negative and Roll's estimate falls below the true spread. The lab lets you raise the informed share and watch the gap open.