Dollar Cost Averaging
Comparing lump sum vs dollar cost averaging is a bit weird since the cash flows are so different. One way you can do it is to compute the internal rate of return. Let’s look at five year investment horizons and what the value of a dollar cost averaging strategy would give us, versus a lump sum investment
We see that there’s a improvement in using DCA although it’s quite small — an additional return of about 25 basis points every year. However the simulation shows that dollar cost averaging actually is more likely to be in the red five years later, 12.9% compared to 11.0% for a lump sum investment.
If you look at it a bit closer, it turns out none of these differences are statistically significant. The conclusion here is that the difference, if it exists, must be very small
How to compute IRR
Computing internal rate of return (also called annual percentage rate) is a fun little numerical problem. You want to find the ratesuch that the cost of payment stream is equal to zero:
where is the payment/income at time . Or if you use continuously compounding rates you have the equivalent relation . Either way, it’s the same problem as finding the roots of a polynomial.
numpy.irr has a pretty terrible implementation of this that’s extremely slow. I ended up open sourcing a very simple implementation that uses binary search.
Originally posted at erikbern.com