I’ve been a steady dollar-cost averager for years—investing $500 every two weeks into index funds regardless of market conditions. But I realized I wasn’t actually tracking this strategy in a meaningful way in Beancount.
Why DCA Works
The math is simple: by investing a fixed amount regularly, you automatically buy more shares when prices are low and fewer when prices are high. Over time, your average cost per share tends to be lower than the average price.
I want to answer: “What’s my true average cost basis across all purchases?”
SELECT
sum(units(position)) AS total_shares,
sum(cost(position)) AS total_invested,
sum(cost(position)) / sum(units(position)) AS avg_cost_per_share
WHERE account = 'Assets:Investments:Taxable:VTI'
Questions for the Community
Do you track DCA “streaks” (consecutive months of contributions)?
Anyone compare their DCA average to the market’s average over the same period?
How do you handle months when you invest more or less than usual?
I’m wondering if there’s a way to visualize my DCA journey—showing how my average cost compares to spot prices over time.
The #reduced tag helps me track how often I had to cut back.
Query for Streak Analysis
SELECT
YEAR(date) AS year,
MONTH(date) AS month,
sum(cost(position)) AS invested
WHERE 'dca' IN tags
AND account ~ 'Assets:Investments'
GROUP BY year, month
ORDER BY year, month
This shows me my investment history by month—any gaps would be obvious.
From a numbers perspective, I want to push back a bit on the “DCA always wins” narrative.
The Math Reality
Research consistently shows that lump sum investing beats DCA about 2/3 of the time. Markets go up more often than down, so being fully invested sooner typically produces better returns.
When DCA Still Makes Sense
Regular income - You don’t have a lump sum; you’re investing as you earn
Behavioral discipline - DCA keeps you investing regardless of market conditions
Risk management - If you can’t stomach volatility, DCA smooths the ride
Tracking DCA vs Lump Sum
I actually track both scenarios in Beancount. When I get a bonus:
; What I did (DCA over 6 months)
2026-01-15 * "Bonus DCA 1/6"
Assets:Investments:Taxable:VTI 44 VTI {225.00 USD}
Assets:Bank:Checking -9,900.00 USD
; What I could have done (lump sum) - virtual tracking
2026-01-15 * "Bonus lump sum - HYPOTHETICAL" ^lumpsum-tracking
Assets:Tracking:Hypothetical:VTI 264 VTI {225.00 USD}
Equity:Tracking:Hypothetical -59,400.00 USD
After 6 months, I compare actual vs hypothetical to see which strategy won this time.
My Conclusion
DCA is primarily a behavioral tool, not an optimization strategy. And that’s okay—behavior drives more returns than optimization for most investors.