Modeling Bid–Ask Costs in OHLC Backtests
Summary
The discussion addresses a limitation of daily OHLC data: it does not record the contemporaneous bid, ask, or available quantities needed to simulate executions directly. Treating the closing price as both the buy and sell price can make a backtest unrealistic because it omits the spread and trading costs. The question asks how to estimate bid and ask prices when only OHLC data is available.
One response recommends adding slippage to the assumed trade price when backtesting with closes. Another points to a published procedure that estimates bid–ask spreads from daily high and low prices. The discussion gives no formula, parameter choices, or comparison of these approaches, and explicitly characterizes transaction-cost estimation as a substantial modeling problem without a simple universal solution. Thus, the practical lesson is to account for execution costs and recognize that OHLC-based spread estimates are approximations; the document does not show that either approach reproduces actual market depth or fills.
Key ideas
- Daily OHLC bars do not reveal the bid, ask, or quantities available at those prices.
- Using the close as an assumed execution price omits spread and slippage effects.
- A basic backtest adjustment is to add an assumed slippage cost to trade prices.
- A cited method estimates spreads from daily highs and lows, but details are not provided.
- Transaction-cost estimates from OHLC data remain approximations rather than a complete execution model.
Tags
Full text
# How to get/estimate ask/bid price for backtesting for OHLC data? # How to get/estimate ask/bid price for backtesting for OHLC data? As you know, most of the EOD data available have only OHLC price. I used to do back-testing using the Close price as both bid and ask. however, in real world, the bid and ask spread may be huge and the bid/ask quantity is also never constant. Above that, the bid/ask price changes with every shares sold/bought. Therefore, my earlier back-test could never be implement in the real world. What approach should i use to estimate bid-ask spreads for backtesting with OHLC data? ## Answer by chrisaycock (score 7, accepted) https://quant.stackexchange.com/a/8475 If you want to backtest with closing prices, the best bet is to add a slippage to the trade price. Note, however, that transaction cost modeling is a large field within quantitative finance and there is no simple solution to estimate this. ## Answer by Black Diamond (score 1) https://quant.stackexchange.com/a/8625 There is a recent paper with a procedure to estimated the bid/ask spread from a series of daily high/low prices. Link: http://www3.nd.edu/~scorwin/papers/high-low_spreads.pdf
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.