Formulas for calculating average return

Discussion in 'Trading' started by manlycure, Nov 25, 2006.

  1. I'm pondering the correct way of calculating the average return of a sequence of trades of a given stock.

    The simple case is well defined, if I buy X number of shares for $P1/sh and sell them for $P2/sh, then the return is P2/P1.

    Now, what do you do in the more complex case where I buy X1 shares for $P1/sh, sell X2 of them for $P2/sh, then buy X3 of them for $P3/sh and finally sell all that remain for $P4/sh.

    What is the formula to calculate the average return for that sequence of trades for that one stock? For example, do you calculate an "average" basis for the stock and the net cash flows generated from the buying & selling? Or, do you treat the sequence as individual trades and then calculate a weighted average return based on the relative of the trades? etc.

    Don.
     
  2. Typo: should be "relative size of the trades".

    Don.
     
  3. piezoe

    piezoe

    for a given period:

    x = final value - ((cash in-cash out)/2)
    y = initial value +((cash in - cash out)/2)

    Average Rate of return = x/y - 1

    The formula is an approximation, but a reasonable one. It assumes cash moves in and out of the portfolio at random times over the period for which the rate of return is being calculated. Initial value is the total value of the entire portfolio, including cash, at the beginning of the period and final value is the value at the end of the period. The formula holds for both a collection of equities and an individual equity.
     
  4. Let's refer to the expression "cash in - cash out" as the net cash inflow, which is supposedly invested at any given time.

    Why would it be divided by 2 and subtracted (added) from (to) x and y respectively? If it's "in use" I wouldn't expect it to be divided by 2. I probably am missing here something.
     
  5. piezoe

    piezoe

    manly, why must you know why? It's the cocktail hour right now and i'm celebrating a rather successful day. I'll try to get back to you if i can figure the damn thing out, perhaps in the am when my geriatric brain tends to function better.
     
  6. The next drink is on me :)

    An explanation or a reference to the source of the formula will be much appreciated.

    Thanks again.

    Don.
     
  7. piezoe

    piezoe

    OK, manly, here is an explanation for the formula i gave. I don't have a reference for the formula, but i'm sure i did not just invent it out of the blue.

    You should also go to: en.wikipedia.org/wiki/Rate_of_return_on_investment

    where you will find a way of calculating the rate of return for more than one period where the rate of return differs from period to period.

    The formula i gave you makes some assumptions that are pretty good for a long period but may not be so good for a short period, because it assumes that cash flows in and out randomly over the period and is in the account, on average, only half the time; hence the division by two.

    Now using your definition of net inflow, i.e. (cash in - cashout), let us assume that the cash goes in at the very end of the period. Then you would not want to count it as part of the account when calculating the rate of return for that period, so you subtract the inflow from the final value. In that case, you would compute the net rate of return for the period simply as:

    (Fin. val. - net inflow)/( lnt. val.) -1

    Now assume the opposite. All the cash goes in at the beginning of the period. Then you do want to include the cash as being part of the initial value. So then you would compute ROR as:

    (fin. val.)/(int. val. + net inflow) -1

    Now suppose the cash flows in and out at random times during the period, so that the net inflow is present, on average, half of the time. So in that cash we add half the inflow to the denominator and subtract half from the numerator to account for that fact that the cash, on average, is present only half of the time.

    Its obvious that this simple formula will be pretty close to correct for a long period but could give a biased result for shorter periods where the assumption of the net inflow being present, on average, half the time is far from correct.

    That's my best effort at explaining considering the shriveled state of my brain. Nevertheless, and in spite of its approximate nature, i find that this formula is good enough and has the advantage of being very simple.
     
  8. I'm having CFA III flashbacks.
     
  9. In my portfolio mgmt system, cash in/out occurs rather frequently (and randomly) during positions' holding periods, so I think that simplified formula should work well indeed.

    Many thanks!