# 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?

• Are you familiar with the "event study"? It is a widely used research technique that seems promsing for your problem. – noob2 Mar 23 at 16:50

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