Skip to content
All library documents

Estimating Bid-Ask Spreads from Daily Stock Data

Article Quant Q&A · Author: Lee Schmidt

Summary

The document considers how to account for trading costs when backtesting Nasdaq stocks using daily OHLCV data that does not identify bid and ask quotes. It questions assigning all observed prices as bids and estimating the ask with a fixed percentage of the previous day’s high, noting that excluding low-priced stocks does not by itself establish that this spread assumption is reasonable.

It introduces the Roll model, which infers a spread estimate from the covariance of consecutive returns, but cautions that the model relies on simplifying assumptions and has performed poorly as a practical cost proxy. It points to later methods by Hasbrouck and by Corwin and Schultz, including an approach based on daily highs and lows. The discussion offers no comparative tests or calibrated estimates for the proposed fixed spread, and stresses that daily-price inference is an approximation; actual bid-ask data is preferable when available.

Key ideas

  • Daily OHLCV prices do not reveal whether observations correspond to bids, asks, or another trade price.
  • A fixed spread defined as a percentage of the previous day's high is not validated by the discussion.
  • The Roll model estimates spread costs from the covariance of consecutive returns.
  • The Roll model's assumptions and empirical limitations make it a weak practical proxy.
  • Later estimators use daily data, including high-low prices, while observed quote data is preferable when available.

Tags

Full text
# How to account for bid/ask spread when backtesting?


# How to account for bid/ask spread when backtesting?












I'm backtesting an algorithm for trading nasdaq stocks, and would like to take into account the spread. I am using historical data from yahoo, which contains:

open, high, low, close, volume, adj. close

All of my trading signals are based off of those prices as they are (without regard to whether they are bid, ask, best bid, best ask, etc.)

To attempt to take into account the bid/ask spread when executing a trade, I have treated all the prices above as the bid prices. To estimate the ask price, I decided to set the spread always equal to 1% of the previous day's high. So the ask price is just estimated by adding that spread to the bid price (and again, the bid price is equal to the yahoo prices given).

Under what conditions is this a reasonable estimate for the spread? For example, very low priced stocks have larger spread percentages so I exclude those stocks completely from my backtesting.

Any better way to do this?

Thanks

## Answer by Shane (score 4)

https://quant.stackexchange.com/a/4310

As @babelproofreader mentioned, I recently blogged about the Roll model (see the original paper), which provides a very simple method for inferring the bid/ask spread based on trade prices. In short, you can estimate the cost using using the covariance: $c = \sqrt{\gamma_1}$. Where $\gamma_1$ is the $Cov(r_t, r_{t-1})$. (The R code is provided in my post).

The Roll model makes many simplifying assumptions and is an empirical failure (although still theoretically important), so I would not advise using it as a real proxy for costs. There have been many advancements since that original paper. Two better options:

- Joel Hasbrouck (2009) "Trading costs and returns for U.S. equities: Estimating effective costs from daily data"

- Shane Corwin and Paul Shultz (2012) "A Simple Way to Estimate Bid-Ask Spreads from Daily High and Low Prices"

[I may blog further on this topic in the future, but it doesn't seem as important as other topics given the ready availability of actual bid/ask spread data.]

## Answer by babelproofreader (score 0)

https://quant.stackexchange.com/a/4291

This recent Statalgo blog post outlines a simple theoretical model of bid/ask prices: the Roll model, and also shows how the bid/ask spread can be derived from prices using this model. Included in the post are links to papers that show how this model might be improved.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.