STRASMORE/EXPLORE 3,022 QUERIES

One rule, two fill conventions: SPY equity curves through 2024

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-04, from Event-Driven vs Vectorized Backtesting.

as of series 12×4read in context →
One rule, two fill conventions: SPY equity curves through 2024 — 12 rows by 4 columns, computed from US exchange, SIP and OPRA data.
monthsame_bar_equitynext_bar_equityequity_spread
2024-01105.5100.854.65
2024-02113.07102.5510.52
2024-03118.76103.2815.49
2024-04121.01101.8719.14
2024-05129.08105.4323.65
2024-06134.06108.1725.89
2024-07141.11108.1832.93
2024-08150.09110.9239.17
2024-09156.92113.7643.16
2024-10162.94113.3449.6
2024-11173.13117.0556.08
2024-12177.8114.663.21
Rows × columns
12 × 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 One rule, two fill conventions: SPY equity curves through 2024, derived from the stored result.
ColumnTypeRangeNotes
month text 12 distinct values (2024-01, 2024-02, 2024-03…)
same_bar_equity number 105.5 to 177.8
next_bar_equity number 100.85 to 117.05
equity_spread number 4.65 to 63.21

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.

SELECT
    mark.1                    AS month,
    round(mark.2, 2)          AS same_bar_equity,
    round(mark.3, 2)          AS next_bar_equity,
    round(mark.2 - mark.3, 2) AS equity_spread
FROM
(
    SELECT arrayJoin(month_end_marks) AS mark
    FROM
    (
        SELECT
            arrayMap(x -> x.1, bars)                                      AS dates,
            arrayMap(x -> x.2, bars)                                      AS closes,
            length(bars)                                                  AS n,
            arrayFilter(i -> (i >= 11)
                             AND (i <= n - 1)
                             AND (dates[i] >= toDate('2024-01-01'))
                             AND (dates[i] <  toDate('2025-01-01')),
                        range(1, n + 1))                                  AS idx,
            arrayMap(i -> formatDateTime(dates[i], '%Y-%m'), idx)         AS months,
            arrayMap(i -> if(closes[i] > arrayAvg(arraySlice(closes, toInt64(i) - 9, 10)),
                             log(closes[i] / closes[i - 1]), 0.0), idx)   AS same_bar_logs,
            arrayMap(i -> if(closes[i] > arrayAvg(arraySlice(closes, toInt64(i) - 9, 10)),
                             log(closes[i + 1] / closes[i]), 0.0), idx)   AS next_bar_logs,
            arrayMap(c -> 100.0 * exp(c), arrayCumSum(same_bar_logs))     AS same_bar_curve,
            arrayMap(c -> 100.0 * exp(c), arrayCumSum(next_bar_logs))     AS next_bar_curve,
            range(1, length(idx) + 1)                                     AS jj,
            arrayFilter((mo, j) -> (j = length(months)) OR (months[j + 1] != mo),
                        months, jj)                                       AS end_months,
            arrayFilter((eq, j) -> (j = length(months)) OR (months[j + 1] != months[j]),
                        same_bar_curve, jj)                               AS end_same,
            arrayFilter((eq, j) -> (j = length(months)) OR (months[j + 1] != months[j]),
                        next_bar_curve, jj)                               AS end_next,
            arrayZip(end_months, end_same, end_next)                      AS month_end_marks
        FROM
        (
            SELECT arraySort(groupArray((date, close))) AS bars
            FROM
            (
                SELECT
                    date,
                    toFloat64(any(close)) AS close
                FROM global_markets.stocks_daily_aggs
                WHERE ticker = 'SPY'
                  AND date >= '2023-12-01'
                  AND date <  '2025-01-10'
                GROUP BY date
            )
        )
    )
)
ORDER BY month
⌘/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 analysisEvent-Driven vs Vectorized Backtesting
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 → Survivorship in the universe: names trading each year, share still listed in July 2026, and median return table 10×6 → Same-bar decision vs a one-session lag: SPY, average session gain, 2016-2025 table 10×5 → The hindsight ceiling: SPY buy and hold, the same year without its biggest up days, and perfect one-day foresight table 10×5 → See all 3,022 queries →