STRASMORE/EXPLORE 2,469 QUERIES

surface

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 open-source-tradingview-optimizer.

as of ranking 6×4read in context →
surface — 6 rows by 4 columns, computed from US exchange, SIP and OPRA data.
fast_masharpe_slow_50sharpe_slow_100sharpe_slow_200
50.680.70.93
100.70.830.84
150.610.780.82
200.610.630.74
250.570.460.78
300.650.60.71
Rows × columns
6 × 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 surface, derived from the stored result.
ColumnTypeRangeNotes
fast_ma number 5 to 30
sharpe_slow_50 number 0.57 to 0.7
sharpe_slow_100 number 0.46 to 0.83
sharpe_slow_200 number 0.71 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
    ),
    scored AS
    (
        SELECT
            fast,
            slow,
            arrayAvg(rets)
                / sqrt(arrayAvg(arrayMap(r -> r * r, rets)) - pow(arrayAvg(rets), 2))
                * sqrt(252) AS sharpe
        FROM
        (
            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
    fast                                 AS fast_ma,
    round(maxIf(sharpe, slow = 50), 2)   AS sharpe_slow_50,
    round(maxIf(sharpe, slow = 100), 2)  AS sharpe_slow_100,
    round(maxIf(sharpe, slow = 200), 2)  AS sharpe_slow_200
FROM scored
GROUP BY fast
HAVING countIf(slow = 50) > 0
   AND countIf(slow = 100) > 0
   AND countIf(slow = 200) > 0
ORDER BY fast_ma
⌘/Ctrl + Enter
More from this analysisopen-source-tradingview-optimizer
walk_forward ranking 24×4 ma_grid ranking 24×2 yearly_sharpe ranking 9×2 Top 25 weekly-options underlyings by distinct contracts traded, with expiration weekdays ranking 25×4 Annualized volatility vs total return, 25 large caps, calmest to wildest (~2 years) ranking 25×3 SPY options median spread by expiration date, near-the-money strikes only ranking 25×4 See all 2,469 queries →