STRASMORE/EXPLORE 2,648 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-09-26, from msft-premarket-and-after-hours-prices.

as of ranking 11×4read in context →
gap_by_year — 11 rows by 4 columns, computed from US exchange, SIP and OPRA data.
yearsessionsmedian_abs_gap_pctover_1pct_share_pct
20162510.3111.6
20172510.244
20182510.4416.3
20192520.4315.9
20202530.6531.2
20212520.3917.5
20222510.6433.5
20232500.4818.8
20242520.3413.5
20252500.417.2
20261660.6630.7
Rows × columns
11 × 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 text 11 distinct values (2016, 2017, 2018…)
sessions number 166 to 253
median_abs_gap_pct number 0.24 to 0.66 percent
over_1pct_share_pct number 4 to 33.5 percent

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 bars AS
(
    SELECT
        date,
        any(open)  AS open_px,
        any(close) AS close_px
    FROM global_markets.stocks_daily_aggs
    WHERE ticker = 'MSFT'
      AND date >= '2016-01-01'
      AND date <  '2026-09-01'
    GROUP BY date
),
gaps AS
(
    SELECT
        date,
        round((toFloat64(open_px) / prev_close - 1) * 100, 3) AS gap_pct
    FROM
    (
        SELECT
            date,
            open_px,
            lagInFrame(toFloat64(close_px)) OVER (ORDER BY date ASC ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) AS prev_close
        FROM bars
    )
    WHERE prev_close > 0
)
SELECT
    toString(toYear(date))                                                                      AS year,
    count()                                                                                     AS sessions,
    round(quantileDeterministic(0.5)(abs(gap_pct), toUInt64(toYYYYMMDD(date))), 2)               AS median_abs_gap_pct,
    round(100.0 * countIf(abs(gap_pct) > 1) / count(), 1)                                        AS over_1pct_share_pct
FROM gaps
GROUP BY year
ORDER BY year ASC
⌘/Ctrl + Enter

在你的 AI 助理中使用這些資料

開啟即可查詢,已帶入本頁資料。免費,無需帳號。