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

3,293 answered market questions

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

Do Volume Indicators Predict Anything?
OBV and VPT rebuilt from daily closes and volume, AAPL, Q2 2026series · 2026-10-01 · 62×4Preview: a 16-point series, ending higher. Forward returns after an OBV divergence vs matched confirmation daystable · 2026-10-01 · 3×7 Divergence gap in 20-session forward return across four lookbackstable · 2026-10-01 · 4×5 20-session OBV change vs trailing and forward returns, by tickerranking · 2026-10-01 · 10×4Preview: 10 ranked values, largest first.
OBV and VPT rebuilt from daily closes and volume, AAPL, Q2 2026

OBV and VPT rebuilt from daily closes and volume, AAPL, Q2 2026

most recentas of series 62×4read in context →
OBV and VPT rebuilt from daily closes and volume, AAPL, Q2 2026 — 62 rows by 4 columns, computed from US exchange, SIP and OPRA data.
dateprice_change_pctobv_ratiovpt_ratio
2026-04-01000
2026-04-020.110.590.07
2026-04-061.261.140.7
2026-04-07-0.83-0.03-1.72
2026-04-081.280.74-0.08
2026-04-091.91.270.25
2026-04-101.90.680.25
2026-04-131.40-0.09
2026-04-141.25-0.91-0.22
2026-04-154.220.032.54
2026-04-163.04-0.791.61
2026-04-175.710.374.62
2026-04-206.811.065.33
2026-04-214.120.122.95
2026-04-226.860.935.09
2026-04-236.961.565.15
2026-04-246.040.844.53
2026-04-274.690.063.54
2026-04-285.90.824.42
2026-04-295.690.264.3
2026-04-306.151.995.06
2026-05-019.593.499.94
2026-05-048.292.618.9
2026-05-0511.173.5411.36
2026-05-0612.474.6412.65
2026-05-0712.443.7912.63
2026-05-0814.744.7814.66
2026-05-1114.493.9814.49
2026-05-1215.324.8515.11
2026-05-1316.925.8416.48
2026-05-1416.665.1716.34
2026-05-1517.456.2117.04
2026-05-1816.515.5616.52
2026-05-1916.956.3516.82
2026-05-2018.247.0717.61
2026-05-2119.317.8818.34
2026-05-2220.818.7119.38
2026-05-2620.627.819.23
2026-05-2721.68.7620.02
2026-05-2822.259.6820.51
2026-05-2922.078.3620.32
2026-06-0119.837.4418.62
2026-06-0223.38.2921.07
2026-06-0321.377.3319.57
2026-06-0421.758.1719.83
2026-06-0520.236.9418.29
2026-06-0817.965.4715.52
2026-06-0913.664.1510.71
2026-06-1014.065.1511.06
2026-06-1115.655.9512.17
2026-06-1213.895.2211.06
2026-06-1515.966.0812.63
2026-06-1617.066.8313.34
2026-06-1715.776.0312.46
2026-06-1816.587.6513.58
2026-06-2216.196.813.3
2026-06-2315.135.8212.41
2026-06-2414.654.8211.99
2026-06-257.642.8-0.37
2026-06-2611.017.7315.1
2026-06-2910.216.4814.2
2026-06-3013.197.7117.51
the exact SQL behind every number
WITH
    bars AS
    (
        SELECT
            date,
            max(toFloat64(close))  AS close,
            max(toFloat64(volume)) AS volume
        FROM global_markets.stocks_daily_aggs
        WHERE ticker = 'AAPL'
          AND date >= '2026-04-01'
          AND date <= '2026-06-30'
        GROUP BY date
    ),
    stepped AS
    (
        SELECT
            date,
            close,
            volume,
            lagInFrame(close, 1) OVER (ORDER BY date ASC ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) AS prev_close
        FROM bars
    ),
    running AS
    (
        SELECT
            date,
            close,
            first_value(close) OVER (ORDER BY date ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS first_close,
            avg(volume)        OVER (ORDER BY date ASC ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS avg_volume,
            sum(if(prev_close = 0, 0, if(close > prev_close, volume, if(close < prev_close, -volume, 0))))
                OVER (ORDER BY date ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS obv_shares,
            sum(if(prev_close = 0, 0, 100 * volume * (close / prev_close - 1)))
                OVER (ORDER BY date ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS vpt_shares
        FROM stepped
    )
SELECT
    toString(date)                            AS date,
    round(100 * (close / first_close - 1), 2) AS price_change_pct,
    round(obv_shares / avg_volume, 2)         AS obv_ratio,
    round(vpt_shares / avg_volume, 2)         AS vpt_ratio
FROM running
ORDER BY date ASC
$