Dollar-Cost Averaging: Tracking Regular Investment Contributions

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.

Basic Recording

Here’s how I record my biweekly investments:

2026-02-01 * "Biweekly DCA - VTI"
  Assets:Investments:Taxable:VTI  2.1834 VTI {228.95 USD}
  Assets:Bank:Checking            -500.00 USD

2026-02-15 * "Biweekly DCA - VTI"
  Assets:Investments:Taxable:VTI  2.2472 VTI {222.50 USD}
  Assets:Bank:Checking            -500.00 USD

Tracking My Average Cost

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

  1. Do you track DCA “streaks” (consecutive months of contributions)?
  2. Anyone compare their DCA average to the market’s average over the same period?
  3. 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.

I love this topic! I’ve been DCA’ing for 8 years now and have built up quite a system.

Tracking Contribution Streaks

I use tags to mark my DCA transactions, which makes streak analysis easy:

2026-02-15 * "Monthly DCA" #dca #streak-month-96
  Assets:Investments:Taxable:VTI  2.2472 VTI {222.50 USD}
  Assets:Bank:Checking            -500.00 USD

The #streak-month-96 tag tells me I’ve invested for 96 consecutive months. It’s motivating to see that number grow!

My “Never Miss” Rule

One thing I’ve learned: consistency matters more than amount. If I can’t do $500 one month, I do $100. The streak continues.

2026-01-15 * "Monthly DCA - reduced" #dca #streak-month-95 #reduced
  Assets:Investments:Taxable:VTI  0.45 VTI {222.22 USD}
  Assets:Bank:Checking            -100.00 USD

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

  1. Regular income - You don’t have a lump sum; you’re investing as you earn
  2. Behavioral discipline - DCA keeps you investing regardless of market conditions
  3. 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.

New to investing here! These replies are super helpful.

I just started DCA last month and have a question: how do I know if my DCA average is good compared to the market?

What I’m Trying to Track

I want to compare:

  • My actual average purchase price (weighted by dollars invested)
  • The simple average price over the same period

My Attempt

My purchases so far:

  • 2026-01-15: 225.00 USD per share
  • 2026-02-01: 222.50 USD per share
  • 2026-02-15: 228.00 USD per share

My weighted average: 225.17 USD per share

Is there a way to pull historical prices and calculate what different timing strategies would have achieved? Or is that unnecessary complexity?

I’m also wondering if I should diversify my DCA across multiple funds (VTI + VXUS + BND) or keep it simple with one fund for now.

Starting small feels less overwhelming, but I want to make sure I’m building good habits from the beginning.