STRASMORE/EXPLORE 3,256 QUERIES

Same-bar decision vs a one-session lag: SPY, average session gain, 2016-2025

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-07-31, from Look-Ahead Bias: The Backtest Killer.

as of table 10×5read in context →
Same-bar decision vs a one-session lag: SPY, average session gain, 2016-2025 — 10 rows by 5 columns, computed from US exchange, SIP and OPRA data.
yearsignal_dayssame_bar_avg_pctlagged_avg_pctgap_pp
20161400.447-0.0080.455
20171390.2450.0330.212
20181270.5740.0070.567
20191380.4260.0720.354
20201470.742-0.1650.907
20211370.4850.0390.446
20221270.979-0.0281.007
20231470.5330.0540.479
20241350.4220.0060.416
20251310.636-0.030.666
Rows × columns
10 × 5
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 Same-bar decision vs a one-session lag: SPY, average session gain, 2016-2025, derived from the stored result.
ColumnTypeRangeNotes
year number 2,016 to 2,025
signal_days number 127 to 147
same_bar_avg_pct number 0.245 to 0.979 percent
lagged_avg_pct number -0.165 to 0.072 percent
gap_pp number 0.212 to 1.007

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,
           toFloat64(open) AS o,
           toFloat64(close) AS c,
           toFloat64(close) > toFloat64(open) AS up_day
    FROM global_markets.stocks_daily_aggs
    WHERE ticker = 'SPY'
      AND date >= toDate('2015-12-01')
      AND date <= toDate('2025-12-31')
),
lagged AS (
    SELECT date, o, c, up_day,
           any(up_day) OVER (ORDER BY date ROWS BETWEEN 1 PRECEDING AND 1 PRECEDING) AS prior_up
    FROM bars
)
SELECT toYear(date) AS year,
       countIf(up_day) AS signal_days,
       round(100 * avgIf(c / o - 1, up_day), 3) AS same_bar_avg_pct,
       round(100 * avgIf(c / o - 1, prior_up), 3) AS lagged_avg_pct,
       round(100 * (avgIf(c / o - 1, up_day) - avgIf(c / o - 1, prior_up)), 3) AS gap_pp
FROM lagged
WHERE date >= toDate('2016-01-01')
GROUP BY year
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.

More from this analysisLook-Ahead Bias: The Backtest Killer
Survivorship in the universe: names trading each year, share still listed in July 2026, and median return table 10×6 → The hindsight ceiling: SPY buy and hold, the same year without its biggest up days, and perfect one-day foresight table 10×5 → One rule, two fill conventions: SPY equity curves through 2024 series 12×4 → Median shares per executed print, 2024 ranking 5×2 → Distance from the signal close to the next session's open, 2024 ranking 5×3 → How far SPY travels after the minute your signal fired (June 2024) ranking 5×3 → See all 3,256 queries →