Small Group Tutorials

Here to help students catch up, keep up, and move ahead. Book a consultation here.

How Roll Bid–Ask-Spread Algorithms Infer Trading Costs from Price Covariance: Bid–Ask Bounce, Serial Dependence, Effective Spreads, Positive-Covariance Failure and Bias Tests

Reader question: If historical data contain transaction prices but no bid and ask quotes, can an algorithm infer the effective bid–ask spread from the way prices move?

Page role: This is a market-microstructure estimation article. It does not replace our Kyle’s lambda page, which estimates price impact, or our Lee–Ready page, which classifies trade direction. The Roll estimator asks a different mathematical question: can the spread be recovered from first-order covariance in transaction-price changes?

Educational mathematics only. This is not trading advice, execution advice or a recommendation to transact in any security.

The fingerprint left by bid–ask bounce

Imagine an unobserved efficient value m_t at the midpoint of a constant effective spread s. A transaction occurs either at the ask m_t+s/2 or at the bid m_t-s/2. Represent that side with q_t ∈ {+1,-1}. Then the observed transaction price can be written

p_t = m_t + (s/2) q_t.

If new information makes the efficient value follow an innovation process while successive trade sides are sufficiently random, observed transaction prices “bounce” around the efficient value. A trade at the ask followed by one at the bid creates a negative price change; the reverse creates a positive change. This mechanism can produce negative first-order serial covariance even when changes in fundamental value themselves are uncorrelated.

The famous square-root formula

Under Roll’s assumptions, the first-order covariance of transaction-price changes is

Cov(Δp_t, Δp_{t-1}) = -s²/4.

Solving for s gives

s = 2 √[-Cov(Δp_t, Δp_{t-1})].

The elegance comes from using only a sequence of traded prices. No quote feed is required. But the simplicity also exposes the estimator’s weak point: if the estimated covariance is positive, the classical square-root expression has no real-valued spread.

A miniature worked example

Suppose a stock’s efficient value is roughly stable over a short interval and transactions alternate around a four-cent effective spread: 50.02, 49.98, 50.02, 49.98, and so on. The successive price changes are near −0.04, +0.04, −0.04, +0.04. Adjacent changes therefore tend to have negative products.

If an estimated first-order covariance were -0.0004 dollars squared, the Roll estimate would be 2√0.0004 = 0.04 dollars. In a textbook model, the covariance has recovered the four-cent spread that was never supplied directly.

Real data are far less clean. News, momentum, stale prices, discreteness, changing spreads and irregular trade arrival all enter the same price series. That is why the worked example proves the mechanism, not the universal accuracy of the estimator.

Inputs and outputs

  • Inputs: a time-ordered sequence of transaction prices, a sampling interval, rules for missing observations and corporate actions, and a window over which stationarity is assumed.
  • Intermediate quantities: price changes, their sample means, lagged pairs and first-order sample covariance.
  • Output: an implied effective spread in price units; with return-based approximations, a percentage spread can also be estimated.

The word effective matters. Roll’s quantity is intended to relate to transaction prices actually observed, not mechanically to the posted maximum distance between the best bid and ask. Trades may execute inside quoted spreads, so quoted and effective spreads answer different questions.

Why covariance, not correlation?

Correlation divides covariance by the variance of price changes. But variance is heavily affected by news. For the spread mechanism, the covariance itself is the more direct object: in the idealized Roll model, new-information innovations raise variance but do not generate the negative lag-one covariance attributed to bid–ask bounce.

This distinction illustrates a broader mathematical lesson. Normalizing a statistic can improve comparability while destroying the particular scale information needed by the model. The spread has units of price; the covariance carries squared-price units, and the square root restores the price unit.

The two core assumptions are doing most of the work

Roll’s original derivation rests on strong assumptions. First, the efficient value incorporates information so that its innovations do not create the same kind of lag-one serial dependence. Second, the relevant distributional behaviour is sufficiently stationary over the estimation window.

If short-term returns have momentum or reversal unrelated to spreads, the covariance mixes those effects with bid–ask bounce. If the spread changes rapidly, a single window average may hide regime changes. If trading is sparse, consecutive sampled observations may not represent consecutive market-side decisions.

Positive covariance is not a small inconvenience

Suppose the sample covariance is positive. One implementation might clip it to zero and report a zero spread. Another might preserve the sign inside an ad-hoc transformation. Those choices may be computationally convenient, but they should not be confused with the original estimator.

A positive covariance is a diagnostic signal: either sampling noise has overwhelmed the spread effect, one or more Roll assumptions fail, or the estimation window is unsuitable. Lawrence Harris showed in 1990 that noise can make estimated serial covariances positive even under the Roll model, and that the square-root transformation creates substantial small-sample bias. Therefore “undefined” can be more informative than a forced number.

Small-sample bias: the square root is nonlinear

The spread estimator applies a square root to an estimated covariance. Because square roots are nonlinear, E[√X] is generally not equal to √E[X]. Jensen’s inequality therefore matters. Even if the covariance estimator behaves reasonably, transforming it can introduce bias in the spread estimate.

This is a classic numerical-statistics connection: an unbiased estimator of an intermediate quantity does not guarantee an unbiased estimator after a nonlinear transformation.

Diagnostics before trusting a Roll estimate

  • Sign test: is lag-one covariance consistently negative, or does it flip sign across nearby windows?
  • Window test: estimate over several sensible windows. Large instability suggests nonstationarity or insufficient data.
  • Frequency test: compare estimates from different sampling intervals. Roll’s idealized argument implies consistency, so large frequency dependence is evidence against the simplified assumptions.
  • Quote benchmark: where quote data exist, compare the implied spread with realized/effective spread measures.
  • Trade-count test: ensure enough observations exist for covariance estimation. Calendar days are not a substitute for actual trades.
  • Corporate-action test: adjust splits and other mechanical price jumps before computing changes.
  • Autocovariance map: inspect lags beyond one. Strong longer-memory structure may indicate dynamics not explained by simple bid–ask bounce.
  • Regime test: partition high-volatility and ordinary periods to see whether one pooled estimate hides different market states.

Counterexamples and failure modes

Failure 1: momentum. Positive short-horizon serial dependence can offset the negative covariance from bid–ask bounce and make the Roll spread too small or undefined.

Failure 2: genuine price reversal. Negative serial covariance can arise for reasons other than spreads, making the estimator too large.

Failure 3: stale or infrequently traded prices. Observations sampled at fixed calendar intervals can contain zero changes and delayed information, changing the covariance structure.

Failure 4: changing tick size or price level. Market-design changes can alter microstructure during the estimation sample.

Failure 5: changing spreads. A single estimate summarizes an average mechanism and can miss intraday or event-driven widening.

Failure 6: return versus price-change confusion. The original dollar-spread derivation is naturally expressed in price changes. Return-based versions require careful scaling and interpretation.

What would falsify the claim that Roll is suitable here?

The strongest falsifiers are empirical. If a market has reliable quote/trade data and Roll estimates repeatedly disagree in direction and scale with observed effective spreads, the proxy is not doing its intended job. If estimates change radically with sampling frequency, if covariance is usually positive, or if non-spread return autocorrelation is economically large, the model assumptions are not adequate for that dataset.

Alternatives and complementary measures

  • Direct quoted spread: best when reliable synchronized bid and ask quotes are available, though it measures displayed rather than necessarily effective cost.
  • Effective spread from signed trades: compare transaction prices with contemporaneous midquotes; requires accurate trade signing and timestamp alignment.
  • High–low estimators: infer spread/liquidity from range information and different assumptions.
  • Price-impact measures such as Kyle’s lambda: estimate how order flow moves price rather than the static spread itself.
  • Information-share and price-discovery methods: answer where new information enters, not what the bid–ask toll is.

Connections to the surrounding knowledge estate

Market microstructure is a chain of different inference jobs. Matching algorithms determine how orders become trades. Lee–Ready tries to infer which side initiated each trade. Kyle’s lambda estimates price impact. Hasbrouck information-share algorithms study price discovery across venues. Roll occupies a narrower position: recover an implied trading-cost spread from the serial structure of transaction prices when quote information is absent or incomplete.

Evidence polarity and update triggers

Evidence that strengthens trust includes persistently negative lag-one covariance over an appropriate sample, stability across nearby windows and sampling choices, sufficient transaction counts, and reasonable agreement with quote-based effective-spread measures when those data are available.

Evidence that weakens trust includes positive or sign-unstable covariance, large sensitivity to the sampling interval, strong non-spread return autocorrelation, sparse trading, rapidly changing market structure, or systematic disagreement with direct spread measurements.

  • Update trigger: a tick-size, venue, market-design or data-feed change should trigger re-estimation and benchmark testing.
  • Update trigger: a volatility or liquidity regime shift should trigger shorter-window diagnostics before carrying forward an old estimate.
  • Update trigger: repeated positive covariance or persistent divergence from direct effective-spread data should retire Roll as the primary proxy for that dataset rather than force a numerical value.

Verification checklist

  • Are the observations true transaction prices and correctly ordered?
  • Have splits and bad prints been handled?
  • Is lag-one covariance negative and statistically stable?
  • Is the sample large enough for a nonlinear covariance transform?
  • Does the estimate survive reasonable window and frequency changes?
  • Is it benchmarked against quote-based spread data where possible?
  • Are positive-covariance cases reported as model failures rather than silently converted into attractive numbers?

Research anchors

  • Richard Roll, “A Simple Implicit Measure of the Effective Bid–Ask Spread in an Efficient Market,” The Journal of Finance 39(4), 1984, pp. 1127–1139: Wiley.
  • Lawrence Harris, “Statistical Properties of the Roll Serial Covariance Bid/Ask Spread Estimator,” The Journal of Finance 45(2), 1990, pp. 579–590: Wiley.
  • Hayden Le and Andreas Gregoriou, review of low-frequency liquidity measures including the Roll estimator: Journal of Economic Surveys.

Final idea

Roll’s estimator is powerful because it turns an invisible market feature into a covariance problem. Its educational value is equally important: a beautiful closed-form equation is only as strong as the mechanism that makes its assumptions true. The moment the covariance stops behaving as the model predicts, the correct response is diagnosis—not forcing the square root to produce a number.

Discover more from Bukit Timah Tutor

Subscribe now to keep reading and get access to the full archive.

Continue reading