STRASMORE/EXPLORE 2,173 QUERIES 22Y EQUITIES · 12Y OPTIONS

2,173 answered market questions

every one with its exact SQL, its result and the date it was computed · free, no signup

What Is the Efficient Market Hypothesis?
The index against the names inside it: calendar years 2021 to 2025, a 34-name large-cap baskettable · 2026-07-31 · 5×5 What followed each kind of session: next-day outcome by the prior day's move, same twelve namesranking · 2026-07-31 · 5×4Preview: 5 ranked values, largest first. Lag-one autocorrelation of daily returns: twelve household names, July 2021 to June 2026ranking · 2026-07-31 · 12×4Preview: 12 ranked values, smallest first.
The index against the names inside it: calendar years 2021 to 2025, a 34-name large-cap basket

The index against the names inside it: calendar years 2021 to 2025, a 34-name large-cap basket

most recentas of table 5×5read in context →
The index against the names inside it: calendar years 2021 to 2025, a 34-name large-cap basket — 5 rows by 5 columns, computed from US exchange, SIP and OPRA data.
yearindex_return_pctmedian_stock_return_pctstocks_measuredpct_beating_index
202128.718.93438.2
2022-20-13.33458.8
202324.89.83441.2
20242412.73432.4
202516.610.13435.3
the exact SQL behind every number
WITH daily AS (
    SELECT ticker,
           toDate(toTimeZone(window_start, 'America/New_York')) AS dt,
           argMax(toFloat64(close), window_start) AS close_px
    FROM global_markets.delayed_stocks_minute_aggs
    WHERE ticker IN ('SPY','AAPL','MSFT','NVDA','AMZN','GOOGL','META','TSLA','JPM','XOM','JNJ','WMT','PG','KO','PEP','HD','MRK','LLY','COST','CVX','ORCL','CSCO','INTC','VZ','MCD','NKE','DIS','CAT','HON','TXN','AMD','NFLX','MO','LMT','UNH')
      AND toDate(toTimeZone(window_start, 'America/New_York')) >= toDate('2021-01-01')
      AND toDate(toTimeZone(window_start, 'America/New_York')) <= toDate('2025-12-31')
      AND (toHour(toTimeZone(window_start, 'America/New_York')) * 60
           + toMinute(toTimeZone(window_start, 'America/New_York'))) BETWEEN 570 AND 959
    GROUP BY ticker, dt
),
per_year AS (
    SELECT ticker, toYear(dt) AS yr,
           argMin(close_px, dt) AS first_px,
           argMax(close_px, dt) AS last_px
    FROM daily
    GROUP BY ticker, yr
),
perf AS (
    SELECT yr, ticker, (last_px / first_px - 1) * 100 AS ret_pct FROM per_year
),
bench AS (
    SELECT yr, ret_pct AS index_pct FROM perf WHERE ticker = 'SPY'
)
SELECT toString(perf.yr) AS year,
       round(any(bench.index_pct), 1) AS index_return_pct,
       round(median(perf.ret_pct), 1) AS median_stock_return_pct,
       countIf(perf.ticker != 'SPY') AS stocks_measured,
       round(100 * countIf(perf.ticker != 'SPY' AND perf.ret_pct > bench.index_pct)
             / countIf(perf.ticker != 'SPY'), 1) AS pct_beating_index
FROM perf
INNER JOIN bench ON perf.yr = bench.yr
GROUP BY perf.yr
ORDER BY perf.yr
$