How to measure your stock performance vs SP500

joesxm3

Thinks s/he gets paid by the post
Joined
Apr 13, 2007
Messages
1,326
I notice that people like NW Bound mention their personal performance compared to the SP500. I am wondering about the mechanism for calculating this.

For example, if you trade in and out of stock positions, would you not need to adjust by some factor for buying in the middle of the year and selling etc.?

I can see that one might just go with the statistics from the brokerage account, but they seem to be only calculated once a month.

Also, in my case I have several accounts with the broker, but I don't segregate asset types to a certain account. Say, all bonds in one, all stocks in another.

Is the way this is being done simply to put all of your stocks into a spreadsheet with some initial base cash allocation and then record all trading in this spreadsheet without adding any cash so as not to distort the percentage result by adding cash for new buys in the middle of the year?
 
Simple if you don't move any money in or out of that account.

Pick a starting date. Record the value of your portfolio on that date.

At any future date, compare your portfolio value to the change in your benchmark (SPY, or VTI for a little broader look). You need to include the value of divs reinvested in the benchmark, don't just go by NAV.

yahoo does it, look at the change in "adjusted" price since your start date (the start date price is adjusted down, to reflect the addition of dividends later - so it shows a higher gain overall). This site does it:

https://stockcharts.com/freecharts/perf.php?VTI (move the scrub bar to change dates)

or portfolioanalyzer.com, but that is month to month.

How long have you been trading w/o comparing to a Buy & Hold benchmark? I always want to know if my efforts are working better than being lazy, and the most common answer for me is NO!

-ERD50
 
If you have an account where you have large percentages of money moving in/out all the time, then you need to compute the "time weighted rate of return". This takes some work.

See: https://www.investopedia.com/terms/...eighted rate of,inflows and outflows of money.

In my case, I don't have large amounts of money coming in/out of my accounts like Cathie Wood does with hers. Secondly, I use Quicken to download and add up all of my accounts together. There are 19 investment accounts, and 10 checking and credit card accounts. This gives me the total of my entire net worth, minus real estate and other possessions which are not investable assets.

It is then easy for me to compute the total return using the total amount that is summed up by Quicken, using the simple "Moneychimp" formula to adjust for inflow (such as my wife's SS), and outflow (expenses reported on my checking accounts).

Of course the returns of individual accounts vary greatly, such as the return of our Treasury Direct accounts vs my MF accounts vs my brokerage accounts. I usually pay attention only to the total amount that is added up by Quicken. To me, it's the total return that counts.

Of course, I often neglected the smaller accounts, which may underperform for a long time. And when I notice it, I just let it be to allow for some diversification. These often turn around.

And more than once, I noticed a really lousy account and when I looked closely, found out that Quicken's download failed on this account and missed the dividend payout for more than 1 year.

PS. Thanks again to sengsational who brought to our attention the simple "Moneychimp" formula that works fairly well to adjust for periodic inflow/outflow.
 
Last edited:
Thanks for the info.

ERD50,

I have not been actively trading stocks much since the dot com days. I had been operating on a "set it and forget it model" when I was busy w*rking and had pulled back to a heavy cash position as I came through FIRE.

I have kept a close watch on my total return using a spreadsheet, but for comparison I usually would look at the SP500 return and a bond index return, calculate a 60-40 mixed return and compare it to my total return, which, due to heavy cash has been quite a bit behind over the past few years.

I had been content with my lower performance because I had enough to get by based on my models, but recently I have become worries about loss of purchasing power due to currency debasement. That combined with a feeling that we are in a shifting situation as discussed in books likev" The Fourth Turning" has led to my current burst of activity.
 
I compare my returns to the S&P500 Total Return (which includes dividends). My process is:

1) Get the S&P500 total return between any two dates from the Yahoo link above. You can use the historical data link to compute between any arbitrary dates. Or, if you just care about the last year, 2 years, etc - you can just hit the full screen chart and set the Y axis to percentage (use the gear icon).

2) I have an Excel spreadsheet that contains every transaction I have ever made. I then use the XIRR function to compute my personal rate of return.

I personally do not think TWRR is appropriate for this comparison. The point of TWRR is to remove purchase/sale timing from the equation. It is not a person's individual rate of return.
 
I use an online savings account that is part of my retirement nestegg as the gatekeeper between my retirement nestegg and the credit union checking account that I use to pay our bills, so I can easily identify the dates and amounts of cash flow out (or into) our retirement assets... mostly out of.

I then have a schedule of those cash flows and the beginning and ending balances of the retirement accounts from Quicken that I put into Excel and calculate an XIRR. I think compare that with the CAGR of a 60/40 portfolio from Portfolio Visualizer.
 
Speaking of TWRR (Time-Weighted Rate of Return) and IRR (Internal Rate of Return) which is also called Money-Weighted Rate of Return, I believe MF performance is measured by TWRR, which is better than IRR for that purpose.

In an attempt to show myself the difference, I come up with this example, and will show it here for people to tell if I am wrong.


1) Let's say you put $1 in an MF, and this MF did so well the first year and doubled your money to $2. You were so pleased that at the start of the 2nd year you deposited an additional $2.

You now had $4 with the fund for the start of the 2nd year, and the MF's luck ran out. It halved your money. Your $4 shrunk to $2.

Now, how to compute the MF's performance over 2 years?

With the TWRR, the fund performance for the 1st year is 2x, and for the 2nd year is 0.5x. The compounded return is 1x, which is break even.

But if you use the XIRR (or IRR) to compute the return, you will get -26.8%. This tends to agree more with the fact that you had $3 invested in all, but now have only $2.

The IRR is called Money-Weighted, because the 2nd year negative performance is counted more heavily than the 1st year by the formula, due to the fact that you had more money invested in the 2nd year.



2) What if we now turn the sequence of return around? Let the MF return be 0.5x the 1st year, then 2x the 2nd year. The TWRR is still 1x.

Let's see what happens with the IRR. You put in $1 to start, and ended up with $0.5 after the 1st year.

Instead of fleeing, you thought the MF luck would turn. You doubled up with another $2 deposit and had $2.5 to start the 2nd year. You were right, and ended up with $5. The computed IRR is 45%.


The IRR indeed agrees more with your specific return. It includes the effect of your investment timing, which will be different than the compounded return of the instrument you invest in.

The above example shows another thing. When you jump in/out of investments, your actual return can be far worse or far better than the investment returns over a long time. But of course, we all know this.
 
Last edited:
I have a Google Spreadsheet to track my portfolio. I track all cash flows and use XIRR to calculate my return. It was a little bit of work to get this setup, but maintaining it is easy.

At one point I was using this to calculate performance against test portfolios, using my cash flows instead of a fund’s CAGR, but that was a bit more work. I sometimes think about doing this again using python in Moneydance, but haven’t gotten around to it.

I’m not sure how much practical value that kind of script would have, but I think it’d be cool if you could select any portfolio allocation and then run it against your cash flows to see how it would perform. I’m guessing that it’d show that you shouldn’t tinker with your portfolio…
 
The IRR indeed agrees more with your specific return. It includes the effect of your investment timing, which will be different than the compounded return of the instrument you invest in.

The above example shows another thing. When you jump in/out of investments, your actual return can be far worse or far better than the investment returns over a long time. But of course, we all know this.

This analysis looks correct to me.

TWRR is used to compare two different funds. It basically calculates what would have happened if you put in money at the beginning of the period and held it to the end. It removes the timing component of purchase/sales. In your example, assume that the two funds are different. Which fund should you invest in? Both fund prices held constant over the holding period (.5x2 = 2*.5 = 1).

IRR (using XIRR) calculates your actual return including timing of purchase/sales. It reflects your actual gain or loss. In your example, assume you invested in both of these funds and want to consolidate into one. You should probably not judge the performance based on IRR. It was only your timing that created a significant gain for the second fund, and big loss for the first. But this is in fact what happened.

It bugs me that many (most?) investment companies report your performance as TWRR. For example here is the Trowe Price explanation. It does not reflect your actual gain/loss.
 
It bugs me that many (most?) investment companies report your performance as TWRR. For example here is the Trowe Price explanation. It does not reflect your actual gain/loss.


It could be because people flock to a fund or add money to it after learning about its after-the-fact performance, only to see the hot streak end. The fund wants to disclaim some of the poor performance due to investors' ill-timing moves.
 
I have been using a Google spreadsheet someone created since 2012 to track my portfolio returns. It is very hard to see how "your portfolio" did when your money is spread across multiple accounts (including real estate). My own sheet is heavily customized for RE and business transactions but I created a less customized sheet for friends who just wanted to track stock returns. There is no easy way but to enter every trade/dividend/reinvestment into the sheet like others explained. Original author had some notes but I don't have much of the notes.


https://docs.google.com/spreadsheets/d/191FLVPsRqkNQlKW7bHqI_cRz3PAxxMHP2BEk7sp-AAE/edit?usp=sharing


* Just copy this sheet to start your own.
* Any time you add a new ticker to the portfolio, you copy/paste a line in "Asset Summary" page and update the name/ticker of the security.
* Enter transactions in the "Transactions" sheet.
* Update your money market balance (in Transactions sheet) every once in a while to reflect accumulated trade/dividends.

* Find out CAGR in the CAGR sheet! BTW it uses XIRR function.



Easy peasy.
 
It could be because people flock to a fund or add money to it after learning about its after-the-fact performance, only to see the hot streak end. The fund wants to disclaim some of the poor performance due to investors' ill-timing moves.

Me thinks that author Bernie Kent reads these forums and decides what to write for Forbes. HAHA. Published today: https://www.forbes.com/sites/berniekent/2022/05/14/what-is-the-difference-between-time-weighted-rate-of-return-calculation-and-irr/?sh=d9d68055c3d1
 
I use the Modified Dietz method (attached below) to deal with putting money into my accounts during the accumulation phase, as well as taking money out during he decumulation phase.

It is not an easy formula and there are some spreadsheets already available online, but the tools do a decent job of showing you how well your accounts are doing when you have active cashflows.

You do not have to put in every transaction in your accounts, just the end of period numbers (I do it monthly).
 

Attachments

  • dietz.xls
    82.5 KB · Views: 7
Me thinks that author Bernie Kent reads these forums and decides what to write for Forbes. HAHA. Published today: https://www.forbes.com/sites/berniekent/2022/05/14/what-is-the-difference-between-time-weighted-rate-of-return-calculation-and-irr/?sh=d9d68055c3d1


:)

I like his example with its nice twist, where he shows two identical MFs and yourself with 2 accounts simultaneously end up with the same amount, yet the IRR calculations show two different results.


I use the Modified Dietz method (attached below) to deal with putting money into my accounts during the accumulation phase, as well as taking money out during he decumulation phase.

It is not an easy formula and there are some spreadsheets already available online, but the tools do a decent job of showing you how well your accounts are doing when you have active cashflows.

You do not have to put in every transaction in your accounts, just the end of period numbers (I do it monthly).


Thanks. I had never heard of the Dietz and Modified Dietz method.

If you have all this info entered for the Modified Dietz into a spreadsheet, an XIRR calculation can be made.

And what I and others called the "MoneyChimp" method is the same as the Simple Dietz formula.
 
Last edited:

Latest posts

Back
Top Bottom