Methodology

The exact rules behind every number on dcaretro.com. Read this before quoting results in a discussion — it covers the data sources, the execution policy, and the limitations you should know about.

Data sources

All prices come from Yahoo Finance via the yahoo-finance2 library, refreshed daily by a GitHub Action that commits the updated JSON files back to the repo at roughly 02:00 UTC. The fetched series uses adjusted close prices, which apply dividend reinvestments and stock splits, so the returns reflect what a real long-term holder would have experienced.

S&P 500 → ^GSPC (index), from 1985-01-02

NASDAQ 100 → ^NDX (index), from 1985-10-01

Bitcoin → BTC-USD (spot), from 2014-09-17

Gold → GLD (SPDR Gold Trust ETF), from 2004-11-19

MSCI World → URTH (iShares MSCI World ETF), from 2012-01-11

For the two index series (S&P 500 and NASDAQ 100), Yahoo's adjusted close already includes dividend reinvestment. For the ETF-backed series (GLD, URTH), we use the ETF's adjusted close — there is a small but non-zero tracking error versus the underlying index.

Schedule generation

From the user's start date, end date, and frequency (daily, weekly, monthly), we generate a sequence of scheduled investment dates. Monthly defaults to the 1st of each month; weekly defaults to Monday. The schedule is generated in UTC with no timezone adjustment.

T+1 execution policy

When a scheduled investment date falls on a market holiday or weekend, the purchase executes at the next trading day's closing price (T+1). This matches how a real automated investment plan with most US brokers actually behaves. Bitcoin is exempt: BTC markets are open 24/7, so BTC schedules execute on the exact scheduled date.

For daily and weekly schedules, when multiple scheduled dates roll forward to the same trading day (e.g., a Saturday and a Sunday both rolling to Monday), we record only one purchase on that day. The semantic of "daily DCA" on stocks is one investment per trading day, not one per calendar day. Daily DCA on stocks therefore averages ~252 executions per year. Daily DCA on Bitcoin averages 365.

Return metrics

We report four numbers and they are computed in this order.

  • Total invested — the sum of all executed periodic purchases. If a scheduled date is after the last available price, that purchase is dropped and not counted.
  • Final value — total accumulated units multiplied by the latest closing price within the selected window. Holdings are valued using the same adjusted-close series used for buys.
  • Total return — final value minus total invested. Expressed in dollars and as a percentage of the amount invested.
  • Annualized return (IRR) — the internal rate of return on the irregular cashflow series. We solve it via bisection on the net present value: find the discount rate r where the sum of every purchase cashflow (positive in, negative out at the final value) equals zero, then annualize. IRR is the right metric for irregular cashflows because it accounts for the actual timing of each purchase, unlike CAGR.

Date clamping

If a user enters a start date earlier than the first available price for an asset, we clamp to the asset's first date and surface a warning on the page. If they enter an end date later than our latest data point, we clamp to the latest date silently. The actual window used is always shown in the breakdown section.

Known limitations

  • No transaction fees. Real DCA pays commissions or spreads. On commission-free brokers the gap is small. On crypto exchanges the cumulative drag from spreads can be meaningful.
  • No taxes. Results are pre-tax. Dividends in taxable accounts are taxed annually in many jurisdictions, which compounds against the long-run return. Hold tax-advantaged where possible.
  • No currency conversion. All numbers are USD. Non-US investors face additional FX risk and ETF-domicile considerations.
  • Index versus ETF tracking error. The gold and MSCI World calculators are ETF-backed, not pure index series, so a small tracking error relative to the underlying index is baked in.
  • Survivorship. The five assets shown are all survivors. The site does not model a strategy where you might have picked a different asset that subsequently failed or stagnated.
  • Historical performance does not predict future returns. This is the single most important rule and the easiest one to forget.

Source code

The DCA computation is open and lives in lib/dca/compute.ts. The bisection IRR solver lives in lib/dca/irr.ts. The math is covered by unit tests in tests/dca.test.ts, including golden cases cross-verified against external calculators within a 0.5 percent tolerance.

Found a problem?

If a number on the site looks wrong or you spot an edge case we missed, please tell us. Email hello@dcaretro.com. Data correctness is the single most important property of this tool.