STRASMORE/EXPLORE 3,293 QUERIES
Full options quote history: clean NBBO bid/ask snapshots for any US option contract at the interval you choose, by SQL API, $79 a month. See the options quotes plan

A 24-cell moving-average grid on SPY, ranked by Sharpe

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-22, from The Open-Source TradingView Optimizer.

as of ranking 24×2read in context →
A 24-cell moving-average grid on SPY, ranked by Sharpe — 24 rows by 2 columns, computed from US exchange, SIP and OPRA data.
cellsharpe
5 / 2000.93
5 / 1500.88
10 / 2000.84
10 / 1000.83
15 / 2000.82
25 / 2000.78
15 / 1000.78
20 / 2000.74
10 / 1500.74
15 / 1500.73
30 / 2000.71
5 / 1000.7
10 / 500.7
5 / 500.68
20 / 1500.66
30 / 1500.66
30 / 500.65
25 / 1500.64
20 / 1000.63
15 / 500.61
20 / 500.61
30 / 1000.6
25 / 500.57
25 / 1000.46
Rows × columns
24 × 2
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 A 24-cell moving-average grid on SPY, ranked by Sharpe, derived from the stored result.
ColumnTypeRangeNotes
cell text 24 distinct values (10 / 100, 10 / 150, 10 / 200…)
sharpe number 0.46 to 0.93

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
    series AS
    (
        SELECT arraySort(r -> r.1, groupArray((date, toFloat64(close)))) AS rows_sorted
        FROM global_markets.stocks_daily_aggs
        WHERE ticker = 'SPY'
          AND date >= '2016-01-04'
          AND date <= '2025-06-30'
    ),
    grid AS
    (
        SELECT
            arrayMap(r -> r.2, rows_sorted) AS px,
            g.1                             AS fast,
            g.2                             AS slow
        FROM series
        ARRAY JOIN
        [
            (5, 50), (5, 100), (5, 150), (5, 200),
            (10, 50), (10, 100), (10, 150), (10, 200),
            (15, 50), (15, 100), (15, 150), (15, 200),
            (20, 50), (20, 100), (20, 150), (20, 200),
            (25, 50), (25, 100), (25, 150), (25, 200),
            (30, 50), (30, 100), (30, 150), (30, 200)
        ] AS g
    ),
    cells AS
    (
        SELECT
            fast,
            slow,
            arrayMap(
                i -> if(arrayAvg(arraySlice(px, i - fast + 1, fast)) > arrayAvg(arraySlice(px, i - slow + 1, slow)),
                        px[i + 1] / px[i] - 1,
                        0.0),
                range(200, length(px))
            ) AS rets
        FROM grid
    )
SELECT
    concat(toString(fast), ' / ', toString(slow)) AS cell,
    round(arrayAvg(rets)
          / sqrt(arrayAvg(arrayMap(r -> r * r, rets)) - pow(arrayAvg(rets), 2))
          * sqrt(252), 2)                         AS sharpe
FROM cells
ORDER BY sharpe DESC
⌘/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 analysisThe Open-Source TradingView Optimizer
In-sample rank versus out-of-sample Sharpe, same 24 cells ranking 24×4 → Buy-and-hold SPY: the same rule, scored year by year ranking 9×2 → The parameter surface: Sharpe by fast length, one line per slow length ranking 6×4 → US tickers trading in a June week, and how many still traded in June 2026 ranking 11×4 → A 20/50 moving-average crossover on SPY, year by year, against holding ranking 9×4 → Same rule, prior-session signal against same-session signal, SPY by year ranking 9×4 → See all 3,293 queries →