STRASMORE/EXPLORE 2,170 QUERIES 22Y EQUITIES · 12Y OPTIONS

2,170 answered market questions

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

Why Your RSI Differs Between Platforms
One session, one formula, different amounts of warm-upranking · 2026-08-17 · 10×3Preview: 10 ranked values, largest first. Where the minute bars actually are, by ET hourranking · 2026-08-17 · 16×3Preview: 16 ranked values, smallest first. RSI(14) on identical closes: Wilder's smoothing against a simple averageseries · 2026-08-17 · 60×4Preview: a 16-point series, ending lower. Two definitions of one daily close, side by sideseries · 2026-08-17 · 21×4Preview: a 16-point series, roughly flat.
How OHLCV Bars Are Built From Ticks
Odd lot share of prints and of volume, minute by minuteseries · 2026-08-08 · 15×4Preview: a 15-point series, ending lower. How many of the 390 session minutes each US symbol traded inranking · 2026-08-08 · 10×2Preview: 10 ranked values, largest first. Trade condition codes that restrict high, low, and lastranking · 2026-08-08 · 7×3Preview: 7 ranked values, smallest first. SPY volume by minute into the close, June 10 2026series · 2026-08-08 · 25×3Preview: a 16-point series, ending higher. One-minute AAPL bars rebuilt from individual trades, June 10 2026series · 2026-08-08 · 15×6Preview: a 15-point series, ending lower.
One session, one formula, different amounts of warm-up

One session, one formula, different amounts of warm-up

most recentas of ranking 10×3read in context →
One session, one formula, different amounts of warm-up — 10 rows by 3 columns, computed from US exchange, SIP and OPRA data.
warmup_barsrsi_wilderrsi_simple
049.0749.07
142.3549.07
239.7349.07
538.0349.07
1043.0849.07
2046.9549.07
4047.1449.07
8046.9249.07
16046.9149.07
25046.9149.07
the exact SQL behind every number
WITH
    daily AS
    (
        SELECT arraySort(groupArray((day, px))) AS pts
        FROM
        (
            SELECT
                date                  AS day,
                toFloat64(max(close)) AS px
            FROM global_markets.stocks_daily_aggs
            WHERE ticker = 'AAPL'
              AND date >= '2025-01-02'
              AND date <= '2026-06-30'
            GROUP BY day
        )
    ),
    steps AS
    (
        SELECT arrayPopFront(arrayDifference(arrayMap(p -> p.2, pts))) AS chg
        FROM daily
    ),
    grid AS
    (
        SELECT
            arrayMap(x -> greatest(x, 0.0),  chg) AS up,
            arrayMap(x -> greatest(-x, 0.0), chg) AS dn,
            toInt64(length(chg))                  AS e,
            toInt64(arrayJoin([0, 1, 2, 5, 10, 20, 40, 80, 160, 250])) AS warmup
        FROM steps
    ),
    seeded AS
    (
        SELECT
            warmup,
            (arraySum(arraySlice(up, e - warmup - 13, 14)) / 14) * pow(13.0 / 14.0, warmup)
                + arraySum(arrayMap((g, j) -> g * pow(13.0 / 14.0, toInt64(j) - 1),
                      arrayReverse(arraySlice(up, e - warmup + 1, warmup)),
                      arrayEnumerate(arraySlice(up, e - warmup + 1, warmup)))) / 14 AS up_wilder,
            (arraySum(arraySlice(dn, e - warmup - 13, 14)) / 14) * pow(13.0 / 14.0, warmup)
                + arraySum(arrayMap((g, j) -> g * pow(13.0 / 14.0, toInt64(j) - 1),
                      arrayReverse(arraySlice(dn, e - warmup + 1, warmup)),
                      arrayEnumerate(arraySlice(dn, e - warmup + 1, warmup)))) / 14 AS dn_wilder,
            arraySum(arraySlice(up, e - 13, 14)) / 14 AS up_simple,
            arraySum(arraySlice(dn, e - 13, 14)) / 14 AS dn_simple
        FROM grid
    )
SELECT
    toString(warmup)                                                      AS warmup_bars,
    round(100 - 100 / (1 + up_wilder / greatest(dn_wilder, 0.000001)), 2) AS rsi_wilder,
    round(100 - 100 / (1 + up_simple / greatest(dn_simple, 0.000001)), 2) AS rsi_simple
FROM seeded
ORDER BY warmup
$