Calculation method
How MoonMath calculates dca vs lump sum
DCA vs Lump Sum Backtest — How would DCA and lump sum have differed over this historical period?
The formula
Both strategies spend the same amount through the same purchase routine: lump sum buys once at the first observed price, spreading buys at every observed price. Both are valued at the final observed price and compared.
What it reads
- The amount to invest
- A chronological series of observed prices, oldest first
- The percentage fee and any fixed fee per purchase
What it assumes
- A fixed fee is charged on every purchase, so the spread strategy pays it many times against the lump sum's once — that asymmetry, not the price path alone, moves the outcome
- Every scheduled purchase fills at the observed close with no slippage or depth constraint
- The schedule takes the first observation at or after each interval, so real purchase dates drift with data coverage
- Costs must stay below each purchase allocation or the calculation is refused
What this does not establish
- It is a historical observation, not advice and not forward-looking
- The ranking is not stable: a different start date, pool, interval, spread or future path can reverse it
- It describes one realised path with one fee structure, not the strategies in general
- It is not an execution model — no depth, order type or fill uncertainty is represented
Run it
Backtest equal scheduled purchases against one purchase at the start of the same observed token-price window. Both strategies use the same total budget, costs and final valuation date.
Open the DCA vs Lump Sum calculatorHow the market itself works
This page describes MoonMath's arithmetic. The mechanics section describes the market: how an order book forms a price, why order-book depth is not the same thing as pool liquidity, and what a public book does and does not let you observe.
Read the market mechanics