Skip to content
All library documents

Designing a Study of Overnight Price Gaps in US Equities

Article Quant Q&A · Author: user1433167

Summary

The document proposes studying whether daily gaps in stock prices predict returns after the gap day. It defines a gap as a daily high, low, and close range that does not overlap the previous session’s range, then demonstrates how to identify upward and downward gaps from adjusted price bars using prior-session highs and lows. A small set of Tesla examples illustrates the extraction, but it does not test whether those gaps forecast subsequent performance.

The response emphasizes that gap detection is straightforward while interpretation is harder. Researchers should consider filtering or controlling for earnings announcements and broad market exposure, since these may explain observed moves. A credible predictive study also needs a theory for why some overnight gaps contain stock-specific information; without that rationale, the signal may be random. The document offers no tested model, statistical procedure, or measured result, so it provides study-design cautions rather than evidence that gaps are profitable or predictive.

Key ideas

  • A gap can be identified by comparing a session’s price range with the previous session’s range.
  • Use split- and dividend-adjusted OHLC data when extracting historical equity gaps.
  • Consider earnings events and market beta as possible explanations for gap-related returns.
  • A theory for which gaps carry idiosyncratic information is needed before treating gaps as predictive.
  • The examples demonstrate extraction only and do not establish forecasting power.

Tags

Full text
# Approach for studying price gaps in US equities


# Approach for studying price gaps in US equities












A price gap is defined as any day when the high / low / close price bar for that day does not overlap the previous day’s high / low / close price bar. I am interested in studying stock price gaps given that gaps represent the availability of new information and that price jumps to a new level to reflect that information.

Any ideas/direction on how to design a study to determine if gaps can be used to predict future price movements beyond the day of the gap? Assume a relational database containing time series stock price data has been created. What would be the best way to determine if price gaps are predictive of future performance? Are there any recommended research techniques and Python programming tools that would be best to determine this? Also are there any papers/studies already out there that can be referred to?

## Answer by Sergei Rodionov (score 1)

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

Extracting the gaps is rather trivial. You just need to use split- and dividend-adjusted OHLC bars from Yahoo Finance, IEX Cloud, polygon.io, Alpha Vantage etc.

But gaps happen all the time. Maybe some additional processing is needed to filter out earnings dates, and to remove market impact (beta). The important part is to have a solid theory predicting which overnight gaps carry idiosyncratic information. Otherwise, it's random at best. For example, here are the gaps for TSLA since 01-Jan-2021. Not sure what they explain or predict.

```
| datetime   | symbol | prev_low | prev_high |    low |   high | gap_sign |
|------------|--------|---------:|----------:|-------:|-------:|---------:|
| 2021-01-06 | TSLA   |   719.20 |    740.84 | 749.10 | 774.00 |        1 |
| 2021-01-07 | TSLA   |   749.10 |    774.00 | 775.20 | 816.99 |        1 |
| 2021-01-08 | TSLA   |   775.20 |    816.99 | 838.39 | 884.49 |        1 |
| 2021-01-28 | TSLA   |   858.66 |    891.50 | 801.00 | 848.00 |       -1 |
| 2021-02-02 | TSLA   |   795.56 |    842.00 | 842.20 | 880.50 |        1 |
| 2021-02-22 | TSLA   |   777.37 |    796.79 | 710.20 | 768.50 |       -1 |
| 2021-03-22 | TSLA   |   624.62 |    657.23 | 668.75 | 699.62 |        1 |
```

```
SELECT * FROM (
SELECT datetime, symbol, LAG(low) AS prev_low, LAG(high) AS prev_high, low, high,
    CASE WHEN low > prev_high THEN 1 WHEN high < prev_low THEN -1 END AS gap_sign
FROM atsd_session_summary
WHERE class = 'IEXG' AND symbol = 'TSLA'
AND datetime > '2021-01-01'
WITH ROW_NUMBER(symbol ORDER BY time) >= 0
) WHERE gap_sign != 0
```

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.