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

Does Dollar-Cost Averaging Work?
$500 a month into SPY vs one lump sum, 2016 to 2026 (portfolio value, $ thousands)series · 2026-07-16 · 126×4Preview: a 16-point series, ending higher. Five-year, $30,000 plans by start year: dollar-cost averaging vs lump sum ($ thousands)ranking · 2026-07-16 · 6×3Preview: 6 ranked values, smallest first. Same $500-a-month plan vs a lump sum across five stocks, 2016 to 2026 ($ thousands)ranking · 2026-07-16 · 5×3Preview: 5 ranked values, largest first.
$500 a month into SPY vs one lump sum, 2016 to 2026 (portfolio value, $ thousands)

$500 a month into SPY vs one lump sum, 2016 to 2026 (portfolio value, $ thousands)

most recentas of series 126×4read in context →
$500 a month into SPY vs one lump sum, 2016 to 2026 (portfolio value, $ thousands) — 126 rows by 4 columns, computed from US exchange, SIP and OPRA data.
monthdca_valuelumpsum_valueinvested
2016-01-010.5630.5
2016-02-01160.71
2016-03-011.562.11.5
2016-04-012.164.82
2016-05-012.665.22.5
2016-06-013.165.93
2016-07-013.665.83.5
2016-08-014.2684
2016-09-014.768.14.5
2016-10-015.267.65
2016-11-015.666.15.5
2016-12-016.368.86
2017-01-01770.66.5
2017-02-017.571.47
2017-03-018.575.17.5
2017-04-018.873.88
2017-05-019.474.88.5
2017-06-0110.176.39
2017-07-0110.6769.5
2017-08-0111.377.510
2017-09-0111.877.710.5
2017-10-0112.579.111
2017-11-0113.380.711.5
2017-12-0114.182.912
2018-01-0114.984.312.5
2018-02-0116.188.313
2018-03-0115.883.913.5
2018-04-0115.780.714
2018-05-0116.683.114.5
2018-06-0117.785.815
2018-07-0118.185.215.5
2018-08-0119.288.116
2018-09-0120.390.916.5
2018-10-0120.991.417
2018-11-0120.185.717.5
2018-12-012187.518
2019-01-0119.378.418.5
2019-02-0121.484.719
2019-03-0122.787.919.5
2019-04-0123.689.620
2019-05-0124.691.520.5
2019-06-0123.786.121
2019-07-012692.721.5
2019-08-0126.492.422
2019-09-0126.591.122.5
2019-10-0127.391.923
2019-11-01299623.5
2019-12-013097.724
2020-01-0131.8101.824.5
2020-02-0132.2101.625
2020-03-0131.296.925.5
2020-04-0125.377.126
2020-05-0129.688.626.5
2020-06-0132.595.827
2020-07-0133.597.327.5
2020-08-013610328
2020-09-0139.1110.528.5
2020-10-0137.9105.629
2020-11-0137.6103.529.5
2020-12-0142.2114.730
2021-01-0143115.630.5
2021-02-0144.4117.931
2021-03-0146.5122.131.5
2021-04-0148.3125.532
2021-05-0150.9131.132.5
2021-06-0151.6131.533
2021-07-0153.4134.933.5
2021-08-0154.8137.234
2021-09-0157.1141.634.5
2021-10-0155.3136.135
2021-11-0159.1144.235.5
2021-12-0158.4141.236
2022-01-0162.4149.836.5
2022-02-0159.714237
2022-03-0157.2134.837.5
2022-04-0160.714238
2022-05-0156.1129.938.5
2022-06-0155.9128.439
2022-07-0152.5119.539.5
2022-08-0157.1128.740
2022-09-0155.6124.340.5
2022-10-0151.9114.941
2022-11-0155120.541.5
2022-12-0158.7127.742
2023-01-0155.4119.442.5
2023-02-0160.3128.843
2023-03-0158.4123.743.5
2023-04-0161.3128.844
2023-05-0162.5130.244.5
2023-06-0163.9132.245
2023-07-0167.8139.145.5
2023-08-0170.2143.146
2023-09-0169.9141.446.5
2023-10-0166.713447
2023-11-0166.5132.547.5
2023-12-0172.7143.948
2024-01-0175.3148.148.5
2024-02-0178.5153.349
2024-03-0182.8160.749.5
2024-04-0184.8163.750
2024-05-0181.7156.850.5
2024-06-0186.7165.451
2024-07-0190.1170.951.5
2024-08-0190.2170.252
2024-09-0192.2173.152.5
2024-10-0195.5178.353
2024-11-0196.417953.5
2024-12-01102.4189.254
2025-01-0199.7183.254.5
2025-02-01102.4187.355
2025-03-01100.518355.5
2025-04-0197.1175.956
2025-05-0197.217556.5
2025-06-01103.6185.857
2025-07-01108.5193.657.5
2025-08-01109.7194.958
2025-09-01113.5200.758.5
2025-10-01119209.559
2025-11-01122.1214.259.5
2025-12-01122.1213.260
2026-01-01123.1214.160.5
2026-02-01125.821861
2026-03-01124.6215.161.5
2026-04-01119.5205.462
2026-05-01131.9225.962.5
2026-06-01139.3237.763
the exact SQL behind every number
WITH
monthly AS (
    SELECT toStartOfMonth(dt) AS mo, argMin(c, dt) AS px
    FROM (
        SELECT toDate(toTimeZone(window_start, 'America/New_York')) AS dt,
               argMax(toFloat64(close), window_start) AS c
        FROM global_markets.delayed_stocks_minute_aggs
        WHERE ticker = 'SPY'
          AND window_start >= '2016-01-01 00:00:00' AND window_start < '2026-07-01 00:00:00'
          AND (toHour(toTimeZone(window_start, 'America/New_York')) * 60
               + toMinute(toTimeZone(window_start, 'America/New_York'))) BETWEEN 570 AND 959
        GROUP BY dt
    )
    GROUP BY mo
),
agg AS (
    SELECT argMin(px, mo) AS first_px, sum(500.0) AS total_invested FROM monthly
)
SELECT mo AS month,
       round(sum(500.0 / px) OVER (ORDER BY mo) * px / 1000, 1) AS dca_value,
       round((total_invested / first_px) * px / 1000, 1) AS lumpsum_value,
       round(sum(500.0) OVER (ORDER BY mo) / 1000, 1) AS invested
FROM monthly CROSS JOIN agg
ORDER BY mo
$