I want to evaluate the performance of my stock market investments relative to a market index. However, I can't think of a good way to interpret the performance of my investments since I frequently transfer cash in and out of my brokerage accounts. Hence, my principal amount fluctuates drastically througout the year. I can demonstrate my dilemma with this hypothetical scenario here.

  • Let's say that on Jan 1, the S&P500 was at $2000 per share.
  • On Dec 31, the S&P500 was at $2240 per share.
  • Thus, the S&P500 increased about 12% over the year. This calculation is nice and simple.


  • Let's say that on Jan 1, I started my brokerage account and put $1000 in it.
  • On December 29, my brokerage account showed $1200 in it.
  • On December 31, I transfer another $1000 into my brokerage account. Now my brokerage account shows I have $2200.
  • Thus, my brokerage account increased about 10% over the year.

When comparing these two scenarios over the course of 1 year, it clearly shows that the S&P500 outperformed my investing efforts in my brokerage account. But this doesn't seem right to me at an intuitive level. The only reason my brokerage account under-performed is because I injected new principal amounts that did not have time to appreciate in value. If I had transferred money the day after to start off the new year, then my brokerage account would have shown a 20% increase in one year, meaning I outperformed the S&P500 by a substantial margin.

This is a simplified scenario. In my actual brokerage account, my principal amounts have varied drastically throughout the year because I'm often moving cash in and out of the account.

Another scenario I thought about was comparing against the index month by month. But what if for 11 months, I beat the S&P500 by 0.01%. But then in one of those months, the S&P500 beat me by 200%. Clearly, barely beating the index for 11 months does not trump a substantial loss in 1 month.

How do people normally calculate whether they've outperformed particular benchmarks when there's a lot of fluctuation in the principal amount throughout the year?


Actually, I just realized maybe I need to equalize the environment for the two scenarios. If I want to compare against the S&P500, I need to consider this scenario:

  • Let's say on Jan 1, the S&P500 was at $2000 per share, but I was able to buy HALF of it at $1000 after transferring $1000 into my brokerage account.
  • On December 29, my brokerage account will show something close to $1120 because the S&P500 grew 12% in that year.
  • On December 31, I put in another $1000 into my brokerage account and buy more of the S&P500 with it. Now my brokerage account shows $2120.

Now I compare my $2120 of this S&P500 scenario to my hand picked investment scenario of $2200. My hand picked scenario outperformed the Index.

Is that how it would be done? I'd have to compare the same actions but against different investment options?

4 Answers 4


Here is a good discussion of this problem. The key is to be clear on what you are trying to measure. To evaluate your skill as an investor, your return should reflect your investment decisions (the actions under your control). What is outside your control as an investor? Your external cash flows -- basically, salary and living expenses, netting to savings. Investment is what you do with your savings. (Client contributions and withdrawals are the analogous cash flows that are outside the control of a mutual fund or hedge fund manager.)

So, cash that goes in and out of your account as a direct result of salary and living expenses should be excluded via a time-weighted return (TWR) calculation. This is somewhat similar to your "IDEA" in that it puts on a level playing field what you would have achieved investing in a given index with the same cash flows. However, the actual TWR is based on geometrically compounding the returns of shorter time periods (short enough that cash flows can be neglected within each one, like the months in your example).

But you should consider whether some of the cash flows are themselves investment decisions. For example, if you keep cash in a bank account for a while but then transfer it to your brokerage account when you're ready to buy a stock, then that transfer is within your control. You should ideally expand the portfolio to include your bank account and only control for cash flows external to the whole thing. It's about what return you earned over each short period on the money you had (which should be all the money you had).


Adding money to an account is not an investment.

Calculate your return on the SPY investment. That is your return unless the free cash earns interest. In that case, calculate the return on the free cash as well. If either is less than a year, annualize. That will tell you how each segment performed.

If investments were made at different times and prices then you're going to have to do some time weighted calculations


I can post an example of a Modified-Dietz:

Jan 1, $120 balance

Feb 5, $250 deposit, $30 gain, $400 balance

Apr 12, $130 deposit, $50 gain, $580 balance

Jun 10, $40 gain, $620 balance

Consider an average-daily-deposit-withdrawal-balance of the year-to-date but, of course, year-to-date starts over at the end of each year. Then the software that I develop results in 27.35% . However the software projects the balance averaging as to year-end and that reduces shocks from large deposits or withdrawals.

Or for beginning viewpoint, just average the given deposit/withdrawal balances as they are:

120 for 35 days, 370 for 66 days, and 500 for 58 days.

Then the average balance is 360.125. The percentage gain is 120 / 360.125 or 33.32% .

But I can very nearly match the software by projecting the current average balance to the future year-end like this:

120 for 365 days, 250 for 330 days, and 130 for 264 days.

Then the average balance projected to the future year-end is 440.05 . The percentage gain projected to the future year-end is 120 / 440.05 or 27.27%.

In either case I may be a day or two off in the calendar day counting.

And here is a link to a modified-Dietz:



You’re overthinking this— use an online tool like yahoo portfolios or sharesight which allow you to track your buys and sells; automatically tabulate your capital gains, dividends, and currency gains; and calculate your annualized gains over whatever period you want broken out by each investment.

  • Relying on a computer tool is no substitute for understanding which type of rate-of-return is being reported and what it means. These are real definitional issues, not overthinking.
    – nanoman
    Dec 14, 2019 at 2:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .