STRASMORE/EXPLORE 3,256 QUERIES 22Y EQUITIES · 12Y OPTIONS

3,256 answered market questions

every one with its exact SQL, its result and the date it was computed · free, no signup

The Open-Source TradingView Optimizer
Buy-and-hold SPY: the same rule, scored year by yearranking · 2026-09-22 · 9×2Preview: 9 ranked values, smallest first. In-sample rank versus out-of-sample Sharpe, same 24 cellsranking · 2026-09-22 · 24×4Preview: 16 ranked values, smallest first. The parameter surface: Sharpe by fast length, one line per slow lengthranking · 2026-09-22 · 6×4Preview: 6 ranked values, smallest first. A 24-cell moving-average grid on SPY, ranked by Sharperanking · 2026-09-22 · 24×2Preview: 16 ranked values, largest first.
Can an LLM Find Alpha Factors?
Training rank against holdout result: 240 trials cut into fifthsranking · 2026-08-02 · 5×3Preview: 5 ranked values, largest first. 240 coin flip factors scored on real prices: annualized Sharpe, Jan 2016 to Jun 2021ranking · 2026-08-02 · 8×3Preview: 8 ranked values, largest first. The twelve best trials in training, re-scored on five untouched years (Jul 2021 to Jun 2026)ranking · 2026-08-02 · 12×3Preview: 12 ranked values, largest first. The best score climbs with the size of the search: best and average Sharpe by trials runranking · 2026-08-02 · 9×3Preview: 9 ranked values, smallest first.
Buy-and-hold SPY: the same rule, scored year by year

Buy-and-hold SPY: the same rule, scored year by year

most recentas of ranking 9×2read in context →
Buy-and-hold SPY: the same rule, scored year by year — 9 rows by 2 columns, computed from US exchange, SIP and OPRA data.
yearspy_sharpe
20160.77
20172.67
2018-0.3
20192.08
20200.62
20211.9
2022-0.78
20231.73
20241.73
the exact SQL behind every number
WITH daily AS
(
    SELECT
        d,
        px / prev_px - 1 AS ret
    FROM
    (
        SELECT
            date                AS d,
            toFloat64(close)    AS px,
            lagInFrame(toFloat64(close)) OVER (ORDER BY date ASC ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) AS prev_px
        FROM global_markets.stocks_daily_aggs
        WHERE ticker = 'SPY'
          AND date >= '2015-12-31'
          AND date <= '2024-12-31'
    )
    WHERE prev_px > 0
)
SELECT
    toString(toYear(d))                                        AS year,
    round(avg(ret) / stddevPop(ret) * sqrt(252), 2)            AS spy_sharpe
FROM daily
GROUP BY year
ORDER BY year
$