Using OHLC Data to Model Sell Prices in Backtests
Summary
The document discusses how to approximate a sell execution price when backtesting with one-minute OHLC bars. It offers simple proxies: the bar close as a representative price, the low as a conservative scenario, or the mean of the four OHLC values. The answers emphasize that the choice depends on asset liquidity and order size; a large order or a thinly traded asset may execute near or below the bar low, while finer-grained data can reduce uncertainty for liquid instruments.
These are rough conventions rather than execution models. A bar does not reveal the order book, the path of prices within the interval, or the market impact of the hypothetical trade. The document also cautions that backtests omit live-trading variables and suggests weighing liquidity modeling against refinement of a single assumed fill price. Any proxy should be checked against empirical execution data where available.
Key ideas
- A bar close can serve as a basic proxy for the interval’s representative price.
- Using the low provides a conservative scenario, though actual execution can be worse.
- Fill prices depend on asset liquidity and order size.
- Finer-grained data can reduce uncertainty for liquid assets.
- OHLC prices do not capture order-book conditions or market impact.
Tags
Full text
# How to estimate probable seeling pricegiven OHLC data for backtesting? # How to estimate probable seeling pricegiven OHLC data for backtesting? I'm relative new to this, so I might be asking something that doesn't make sense. Here is my scenario: I have intraday day at 1 minute intervals. This data has ohlc data and I want to compute for any given interval what the likely sell price would be. I could just assume the worst case and take the low price, but I'm assuming there is something a little more accurate than that. I get that there is no way to accurately predict what the sell price would be, since an actual order potentially changes the outcome. I just want to know if there is a best practice for predicting what the sell price would be if I tried to execute an order on a given interval using historical data. ## Answer by d0rmLife (score 0, accepted) https://quant.stackexchange.com/a/21204 It sounds like you are trying to backtest a strategy and want to simulate actual trading conditions. If this is the case, I make the suggestion that liquidity concerns are of more relevance than nailing a hypothetical order price in a 1-minute interval. If you're really concerned about the price, you could simply average the prices. Note that this is mathematically equivalent to weighing each value at 25%. You could get more industrious and estimate the variance within the interval and make a guess about what that says about the hypothetical price, but you would need to verify that assumption empirically, anyways. To me that sounds like a lot of unnecessary work. When you live-test a strategy there are many variables that are present that are not easily modeled in a backtest. So to really work at resolving just one (that is minor IMO) is perhaps not the best use of your energy. ## Answer by Shahar (score 0) https://quant.stackexchange.com/a/21180 It probably depends on the liquidity of your asset and the size of the sell order: if you want to trade a heavily traded [and thus liquid] ETF such as SPY for example, your sell order would probably fill almost instantly - unless it is a very big order. In that case, obtaining second or tick data would remove most uncertainty from the question. However, if the asset is not liquid and/or a very large order is sent, the sell would certainly be filled around the low [and yes, possibly lower]. Finally, lacking any additional information, I would either use the Close price, which usually is representative of the time period, or the low, as a [proxy] worst-case scenario [keeping in mind that it is not exactly worst-case].
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.