Calculating average return on an investment with intermingled purchases and sales

Calculating average annual return is straightforward when you just have gains/losses and dividends to deal with. But how do you approach this when you have sales and purchases?

I want to look at all transactions for a given investment over a given time period, given some starting and ending balance, with dividends, sales, and purchases, and determine an average annualized return.

I am thinking you would have to break it into periods delimited by each sale or purchase, so you can determine growth in each of those subperiods based on the starting and ending balance. But I’m not sure how you aggregate those into a single number.

I may not be understanding your questions, but the REASON for income/outgo isn’t important to the calculation of rate of return. You just have money at the beginning, money coming in, and money going out.

I calculate annual rate of return by using a monthly calculation: that is, I make the simplifying assumption that every transaction (income or outgo) during a month happens on the same date; it’s easiest to use the 1st day or last day, but you can use the 15th. That’s an approximation that works fine given the numbers I’m dealing with. If you’re dealing with tens of millions, then you may want to go daily.

So, for a year, and assuming all transactions happen on last day of the month. For simplicity, assume you have $N income in March and $M outgo in September.
(1) - Start with amount B0 for beginning balance.
(2) - Add and subtract each income and outgo, without regard to when they happened during the year. In my example, that’s B0 + N - M = E. This is the Expected Value – it’s the amount you would have if there were no earnings at all, if the money were all kept in cash in a non-interest-bearing checking account.
(3) - Compare this to your actual balance at end of year (call it B1.) The difference B1 - E is the earnings (positive or negative.)

(4) - Come up with a weighted each monthly amount by the amount of time from the transaction to end of year. So, for example, if you have N as income in March, you’d use N9/12; if you have M income in September, you’d take M3/12. The idea is that you are weighing each monetary amount by the length of time that amount is actively earning.
(3)- Sum: B0 + N*(9/12) - M*(3/12) = W, the Weighted Amount.
(5) Divide: Earnings by Weighted Amount. That’s your (approx) rate of return.

Hope that’s clear.

There are a couple different methods. Take a look at these slides for definitions and some sample calculations.

It’s important if increase in the value is from a gain vs. a purchase. I don’t understand your explanation because you discuss only “income” and “outgo” which I take to mean gains and losses, not purchases and sales.

To illustrate in a more concrete way, if I buy $1000 worth on Jan 1 and have a balance of $1100 on June 1, and I make no purchases or sales, my annualized ROR is 20% (without taking compounding into account). Doesn’t matter what happened in between.

But take those same figures and say that I also made a purchase of $1000 on March 1, and a sale of $900 of May 1. Then things are trickier. My return is no longer 20% because from Jan 1 to March 1, my returns were based on my initial investment of $1000, but March 1-May 1, returns are based on my initial investment of $1000, my purchase of $1000, plus any gains/losses from Jan 1-Mar 1. Similarly for the period after May 1.

Slide 3 of the presentation linked by **ultrafilter **explains how to do this, and I think is exactly what I need.

The example I gave was the dollar-weighted rate of return from ultrafilter’s link to the Society of Acturaries report. I used two points of cash flow (Cj’s in the more general formula.)

Yes, but you can also think of this series as:
$1000 from Jan 1 to June 1
($1000) [that is, -$1000] from March 1 through June 1
+$900 from May 1 to June 1.

It’s basically thinking of starting with an initial amt (V[sub]0[/sub] in the actuarial formula, with lots of pluses and minuses (C[sub]j[/sub] with j = 1, 2, … n). It doesn’t matter (from the point of view of rate of return) whether the outgo is dividend or purchase: it’s not earning anything from the point of payout until there’s some income/sales.