Consider the following scenario: you invest your money starting with $100K in a brokerage account, and buy some AAPL shares at $200. Then you transfer $5K more into the account and buy some AMZN shares at $120. Later on you sell your APPL shares when it reaches $300. In the end you transfer $10K out of the account, and AMZN stands at $150.

What’s the total return of your brokerage account during the period? It’s a very important question, but unfortunately not many people can answer it. It’s also a non-trivial question, because the concept behind the calculation is not natural to most people. The calculation involves the gain on AAPL (300/200), gain on AMZN (150/120), initial capital ($100K), and subsequent deposit ($5K) and withdrawal ($10K).

Here is how you can use your transactions and positions to calculate portfolio return.

You can calculate portfolio return using balances. A portfolio’s balance at a certain time is the total value of all assets held in the portfolio, i.e. cash plus value of all stock positions valued at that time. The portfolio’s return on a day can be calculated by the difference of today’s balance and yesterday’s balance divided by yesterday’s balance. To describe it in formula:

For example, suppose your portfolio has 100 shares of AAPL, 100 shares of AMZN, and additional $50K cash. The closing prices as of today (2011-03-02) were $352.12 for AAPL and $172.02 for AMZN. The closing prices as of yesterday (2011-03-01) were $349.31 for AAPL and $169.44 for AMZN. The portfolio balance as of today

The portfolio balance as of yesterday

So the return as of today

The portfolio’s total return for a time period (day 1 through day T) can be simply calculated by multiplying the daily compounding factors , and then minus one, or in formula:

Although straightforward, this method has one problem: the daily return formula doesn’t capture deposits or withdrawals. Suppose you start with $1000 on day 1, and deposit another $50 on day 2. The account balances of the two days are $1000 and $1050. Using the formula we will get the return on day 2 is 5%. To give another example, you start with $1000 on day 1, and withdraw $50 on day 2. The account balances of the two days are $1000 and $950. Using the formula we will get the return on day 2 is -5%. The two cases are obviously wrong because you haven’t even made any investment. Your portfolio didn’t have any growth so the return should have been zero.

We can extend the formula to account for deposits and withdrawals. The extended formula is:

where and are the deposit and withdrawal on day t. Essentially we adjust the numerator and denominator by the amount of deposit and withdrawal. The numerator measures the portfolio’s investment growth, i.e. growth attributed to asset value growth (not due to deposit or withdrawal). The denominator measures the base which delivers the growth. We add the deposit amount to the base because we want to be more strict in measuring returns (a bigger portfolio base will result in smaller returns). If you plug in the previous deposit scenario and withdrawal scenario, you will get zero returns, which is the desired result.

If you have all your deposit and withdrawal records, cash and stock position, together with the stocks’ daily closing price (obtainable from Google Finance, Yahoo Finance or your brokerage), you could use the formula to calculate your portfolio’s daily return, and compound them to calculate total return for a time period. You will then be able to judge your money management skills.

This is how we calculate money managers’ period returns, including 1-day, 1-month, 1-year, 3-year and total returns, on our investing platform . Having obtained a portfolio’s return time-series we are able to draw a performance chart to represent its track record. As an example, for Timberline Investment, a portfolio manager focused on stocks with high-quality dividends, we calculate the portfolio’s daily returns and period returns, and draw its performance chart to quantify and visualize the manager’s performance.

The methodology we outlined is the time-weighted rate of return which is the appropriate method to evaluate a money manager. In a future post, we will discuss the money-weighted rate of return which, in comparison, is appropriate to evaluate personal investments’ return and the way we calculate returns for our customers.