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×4
Lag-one autocorrelation of daily returns: twelve household names, July 2021 to June 2026ranking ·
2026-07-31 · 12×4
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
| year | index_return_pct | median_stock_return_pct | stocks_measured | pct_beating_index |
|---|---|---|---|---|
| 2021 | 28.7 | 18.9 | 34 | 38.2 |
| 2022 | -20 | -13.3 | 34 | 58.8 |
| 2023 | 24.8 | 9.8 | 34 | 41.2 |
| 2024 | 24 | 12.7 | 34 | 32.4 |
| 2025 | 16.6 | 10.1 | 34 | 35.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
More from this analysisWhat Is the Efficient Market Hypothesis?
Lag-one autocorrelation of daily returns: twelve household names, July 2021 to June 2026
ranking 12×4
→
What followed each kind of session: next-day outcome by the prior day's move, same twelve names
ranking 5×4
→
Executed volume by price level: the traded ladder (KO, 30 minutes)
table 63×3
→
Underlying names with converged daily IV, by quarter
table 49×2
→
See all 2,173 queries →