STRASMORE/EXPLORE 3,293 QUERIES

gap_by_year

Answered against 22 years of US equities and 12 years of US options data and published with the query that produced it. This result is stored as of 2026-10-16, from tase-vs-us-trading-days.

as of ranking 18×4read in context →
gap_by_year — 18 rows by 4 columns, computed from US exchange, SIP and OPRA data.
yearspy_avg_abs_gap_pctqqq_avg_abs_gap_pctspy_weekend_count
20030.320.5716
20040.290.4144
20110.780.8345
20120.40.4246
20130.330.3647
20140.280.2946
20150.420.5245
20160.340.3844
20170.230.2845
20180.420.5947
20190.450.5847
20201.281.2345
20210.420.5244
20220.620.6844
20230.30.3844
20240.360.547
20250.680.9146
20260.460.6634
Rows × columns
18 × 4
Computed
Completeness
No missing values
Source
US exchange, SIP and OPRA market data
Licence
Strasmore terms · free, no signup
Formats
JSON · CSV · the SQL below

What each column holds

Column definitions for gap_by_year, derived from the stored result.
ColumnTypeRangeNotes
year number 2,003 to 2,026
spy_avg_abs_gap_pct number 0.23 to 1.28 percent
qqq_avg_abs_gap_pct number 0.28 to 1.23 percent
spy_weekend_count number 16 to 47 count

Computed from Strasmore's warehouse of US exchange, SIP and OPRA market data. Equity prices are delayed; options greeks and implied volatility are end-of-day. This result is stored, not recomputed on load — it is exactly the numbers that were returned on , and the query below is what returned them.

Run it yourself

This is the exact query behind the result above. Change a ticker, a date or a column and run it against the warehouse — no account, no key. The no-signup tier is smaller than the one this page was computed on; a query that reaches past it comes back saying which plan runs it.

WITH deduped AS
(
    SELECT
        ticker,
        date,
        max(toFloat64(open))  AS open_px,
        max(toFloat64(close)) AS close_px
    FROM global_markets.stocks_daily_aggs
    WHERE ticker IN ('SPY', 'QQQ')
    GROUP BY ticker, date
),
chained AS
(
    SELECT
        ticker,
        date,
        open_px,
        lagInFrame(close_px) OVER (PARTITION BY ticker ORDER BY date ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) AS prev_close,
        lagInFrame(date)     OVER (PARTITION BY ticker ORDER BY date ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) AS prev_date
    FROM deduped
),
weekend AS
(
    SELECT
        ticker,
        date,
        abs(100 * (open_px / prev_close - 1)) AS abs_gap_pct
    FROM chained
    WHERE prev_close > 0
      AND open_px > 0
      AND toDayOfWeek(prev_date) = 5
      AND toDayOfWeek(date) = 1
)
SELECT
    toYear(date)                                 AS year,
    round(avgIf(abs_gap_pct, ticker = 'SPY'), 2) AS spy_avg_abs_gap_pct,
    round(avgIf(abs_gap_pct, ticker = 'QQQ'), 2) AS qqq_avg_abs_gap_pct,
    countIf(ticker = 'SPY')                      AS spy_weekend_count
FROM weekend
GROUP BY year
HAVING countIf(ticker = 'SPY') > 0
   AND countIf(ticker = 'QQQ') > 0
ORDER BY year
⌘/Ctrl + Enter

Work with this data in your AI assistant

Opens ready to query, with this page's data. Free, no account.