STRASMORE/EXPLORE 3,256 QUERIES

Five-year, $30,000 plans by start year: dollar-cost averaging vs lump sum ($ thousands)

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-07-16, from Does Dollar-Cost Averaging Work?.

as of ranking 6×3read in context →
Five-year, $30,000 plans by start year: dollar-cost averaging vs lump sum ($ thousands) — 6 rows by 3 columns, computed from US exchange, SIP and OPRA data.
start_yearlumpsum_finaldca_final
201654.642.2
20176045.5
201845.537
20195538.1
202055.744.3
202155.343.6
Rows × columns
6 × 3
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 Five-year, $30,000 plans by start year: dollar-cost averaging vs lump sum ($ thousands), derived from the stored result.
ColumnTypeRangeNotes
start_year text 6 distinct values (2016, 2017, 2018…)
lumpsum_final number 45.5 to 60
dca_final number 37 to 45.5

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
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
),
w AS (
    SELECT mo, px,
        sum(500.0 / px) OVER (ORDER BY mo ROWS BETWEEN CURRENT ROW AND 59 FOLLOWING) AS dca_shares,
        count() OVER (ORDER BY mo ROWS BETWEEN CURRENT ROW AND 59 FOLLOWING) AS n_ahead,
        leadInFrame(px, 59) OVER (ORDER BY mo ROWS BETWEEN CURRENT ROW AND 59 FOLLOWING) AS end_px
    FROM monthly
)
SELECT toString(toYear(mo)) AS start_year,
    round(30000.0 / px * end_px / 1000, 1) AS lumpsum_final,
    round(dca_shares * end_px / 1000, 1) AS dca_final
FROM w
WHERE toMonth(mo) = 1 AND n_ahead = 60 AND toYear(mo) BETWEEN 2016 AND 2021
ORDER BY start_year
⌘/Ctrl + Enter

Work with this data in your AI assistant

Opens ready to query, with this page's data. Free, no account.

More from this analysisDoes Dollar-Cost Averaging Work?
Same $500-a-month plan vs a lump sum across five stocks, 2016 to 2026 ($ thousands) ranking 5×3 → $500 a month into SPY vs one lump sum, 2016 to 2026 (portfolio value, $ thousands) series 126×4 → Calendar days from a record close to the next one, SPY ranking 5×4 → Record closes per year, SPY (price basis, first four years of the file excluded) table 20×7 → Deepest closing declines from a record close, SPY table 7×5 → Forward price change after record closes vs all other sessions, SPY table 3×7 → See all 3,256 queries →