### Compare stock investment portfolio to compound interest saving account

In investing, it is important to define the target that we want to achieve. Many investors like to compare their portfolios with a market index, but is outperforming the market index a good target? It is not a quantitative target to be measurable as market indexes fluctuate daily. I, personally, aim only for 10% growth a year. If at the end of the year, I see my portfolio grows 10%, I am pleased with that result no matter that S&P500 grows 50% the same year. To see if my stock portfolio grows in line with the 10% target, I choose to compare it to a saving account with the same interest. In this post, I will show you how to use a fictive saving account with daily compound interest as the target to benchmark a stock portfolio.

## Concept

All investors want to see their money grow over time. It is exactly what is offered by a saving account. If we deposit money in a saving account, that money will only grow even with a very low-interest rate. But nobody forbids us to aim for a higher interest rate, for example, 10% per year. We might not find any bank that proposes 10% per year for a saving account but we can use that imaginative saving account to indicate the target that we want to achieve with the stock portfolio. To make the target challenging, the interest in that imaginative saving account is compounded daily. Daily compound interest means the interest generated today is immediately used to generate interest for tomorrow and so on.

## Computation

To implement this idea, we will extract all DEPOSIT and WITHDRAW transactions of the stock portfolio and apply them to the target saving account with daily compound interest. Each DEPOSIT (WITHDRAW) transaction will generate interest from the next day.

For example, the first table below shows the transactions of our stock portfolio until 05/01/2018. The second table below is the evolution of the target saving account until 08/01/2018. In this example, the target saving account has 10% annual interest, which means `10 / 365 = 0.0274%` daily compound interest.

Let's go through each date to understand the computation:

• As we apply only DEPOSIT/WITHDRAW transactions to the target saving account, any BUY/SELL/DIVIDEND transaction will be ignored.
• On 27/12/2017, we deposited 180 euros for the first time. As the deposit generates interest from the next day, we had so 0 euros of interest on the first day. As a result, the invested and saving balance were both 180 euros.
• On 28/12/2017, we deposited 1000 euros. With 0.0274% daily interest, the 180 euros previous saving balance generated 0.049 euros saving interest. We had so 180 euros previous saving balance, 1000 euros cash flow, and 0.049 euros saving interest. Totally, it made up 1180.049 euros as a new saving balance.
• On 29/12/2017, we deposited 0 euros. With 0.0274% daily interest, the 1180.049 euros previous saving balance generated 0.323 euros saving interest. We had so 1180.049 euros previous saving balance, 0 euros cash flow, and 0.323 euros saving interest. Totally, it made up 1180.373 euros as a new saving balance.
• On 30/12/2017, we deposited 0 euros. With 0.0274% daily interest, the 1180.373 euros previous saving balance generated 0.323 euros saving interest. We had so 1180.373 euros previous saving balance, 0 euros cash flow, and 0.323 euros saving interest. Totally, it made up 1180.696 euros as a new saving balance.
• On 03/01/2018, we deposited 1000 euros. With 0.0274% daily interest, the 1181.667 euros previous saving balance generated 0.324 euros saving interest. We had so 1181.667 euros previous saving balance, 1000 euros cash flow, and 0.324 euros saving interest. Totally, it made up 2181.990 euros as a new saving balance.
• On 04/01/2018, we deposited 0 euros. With 0.0274% daily interest, the 2181.990 euros previous saving balance generated 0.598 euros saving interest. We had so 2181.990 euros previous saving balance, 0 euros cash flow, and 0.598 euros saving interest. Totally, it made up 2182.588 euros as a new saving balance.

The target saving account's evolution is computed easily with LION stock portfolio tracker.

## Visualization

After defining the target, we need to keep the stock portfolio on track with that target. To do so, a simple thing we can do is to plot the evolution of the stock portfolio and the target saving account on the same time series chart. As shown in the LION stock portfolio tracker:

• On one chart, we can plot the Invested, the Portfolio Value, and the Saving Balance.
• On another chart, we can plot the Portfolio Gain and the Saving Gain.

As we can see in the below 3 examples:

• The Saving Balance line is always above the Invested line. If the Portfolio Value line is above the Invested line, the stock portfolio is generating money. If the Portfolio Value line is above the Saving Balance, the stock portfolio is on track with the target.
• The Saving Gain is always above the 0 line and grows gradually thanks to daily compound interest. If the Portfolio Gain line is above the Saving Gain line, the stock portfolio is on track with the target.

## Conclusion

By using Google Sheets, Apps Script, and Google Data Studio, we can evaluate the stock portfolio's performance vs a target saving account with compound interest. We have seen the significance of compound interest when it is computed daily. On a time series chart, we can identify when the portfolio loses track of the target saving account and hence make adjustments in investment strategy to improve the performance.

## Disclaimer

The post is only for informational purposes and not for trading purposes or financial advice.

## Feedback

If you have any feedback, question, or request please:

## Support this blog

If you value my work, please support me with as little as a cup of coffee! I appreciate it. Thank you!

## Share with your friends

If you read it this far, I hope you have enjoyed the content of this post. If you like it, share it with your friends!

### Use SPARKLINE column chart to create price chart with reference price

I own and follow several stocks in my investment portfolio. I pick a reference price for each stock. To effectively track the movement of a stock, I need to visualize its 52-week prices based on the reference price that I determined. In this post, I explain how to do so with the SPARKLINE column chart in Google Sheets.

### Compute cost basis of stocks with FIFO method in Google Sheets

After selling a portion of my holdings in a stock, the cost basis for the remain shares of that stock in my portfolio is not simply the sum of all transactions. When selling, I need to decide which shares I want to sell. One of the most common accounting methods is FIFO (first in, first out), meaning that the shares I bought earliest will be the shares I sell first. As you might already know, I use Google Sheets extensively to manage my stock portfolio investment, but, at the moment of writing this post, I find that Google Sheets does not provide a built-in formula for FIFO. Luckily, with lots of effort, I succeeded in building my own FIFO solution in Google Sheets, and I want to share it on this blog. In this post, I explain how to implement FIFO method in Google Sheets to compute cost basis in stocks investing.

### Use SPARKLINE to create 52-week range price indicator chart for stocks in Google Sheets

The 52-week range price indicator chart shows the relative position of the current price compared to the 52-week low and the 52-week high price. It visualizes whether the current price is closer to the 52-week low or the 52-week high price. In this post, I explain how to create a 52-week range price indicator chart for stocks by using the SPARKLINE function and the GOOGLEFINANCE function in Google Sheets.

### How to convert column index into letters with Google Apps Script

Although Google Sheets does not provide a ready-to-use function that takes a column index as an input and returns corresponding letters as output, we can still do the task by leveraging other built-in functions ADDRESS , REGEXEXTRACT , INDEX , SPLIT as shown in the post . However, in form of a formula, that solution is not applicable for scripting with Google Apps Script. In this post, we look at how to write a utility function with Google Apps Script that converts column index into corresponding letters.

### Slice array in Google Sheets

Many functions in Google Sheets return an array as the result. However, I find that there is a lack of built-in support functions in Google Sheets when working with an array. For example, the GOOGLEFINANCE function can return the historical prices of a stock as a table of two columns and the first-row being headers Date and Close. How can I ignore the headers or remove the headers from the results?

### Create personal stock portfolio tracker with Google Sheets and Google Data Studio

I have been investing in the stock market for a while. I was looking for a software tool that could help me better manage my portfolio, but, could not find one that satisfied my needs. One day, I discovered that the Google Sheets application has a built-in function called GOOGLEFINANCE which fetches current or historical prices of stocks into spreadsheets. So I thought it is totally possible to build my own personal portfolio tracker with Google Sheets. I can register my transactions in a sheet and use the pivot table, built-in functions such as GOOGLEFINANCE, and Apps Script to automate the computation for daily evolutions of my portfolio as well as the current position for each stock in my portfolio. I then drew some sort of charts within the spreadsheet to have some visual ideas of my portfolio. However, I quickly found it inconvenient to have the charts overlapped the table and to switch back and forth among sheets in the spreadsheet. That's when I came to know the existen

### Stock Correlation Analysis With Google Sheets

Correlation is a statistical relationship that measures how related the movement of one variable is compared to another variable. For example, stock prices fluctuate over time and are correlated accordingly or inversely to one another. Understanding stock correlation and being able to perform analysis are very helpful in managing a stock portfolio investment. In this post, I explain in details how to perform correlation analysis among stocks in Google Sheets.

### Manage Stock Transactions With Google Sheets

The first task of building a stock portfolio tracker is to design a solution to register transactions. A transaction is an event when change happens to a stock portfolio, for instance, selling shares of a company, depositing money, or receiving dividends. Transactions are essential inputs to a stock portfolio tracker and it is important to keep track of transactions to make good decisions in investment. In this post, I will explain step by step how to keep track of stock transactions with Google Sheets.

### Compute daily evolutions of a stock portfolio with Google Sheets and Apps Script

When it comes to investment, it is not only important to know the up-to-date state of portfolio but also to track its evolution day by day. We need to know on a specific day, how much money has been invested in the portfolio, the current market value of owned shares, the available cash and the current profit. Visualizing those historical data points on a time-based graph helps us to identify which transactions were good and which were bad. This post shows how to compute automatically those historical data points by using data in Transactions sheet and the built-in GOOGLEFINANCE function of Google Sheets. A sample spreadsheet can be found in this post Demo stock portfolio tracker with Google Sheets . You can take a look at the sample spreadsheet to have an idea of how the data is organized and related. It is possible to make a copy of the spreadsheet to study it thoroughly.

### Create a dividend income tracker with Google Sheets by simply using pivot tables

As my investment strategy is to buy stocks that pay regular and stable dividends during a long-term period, I need to monitor my dividends income by stocks, by months, and by years, so that I can answer quickly and exactly the following questions: How much dividend did I receive on a given month and a given year? How much dividend did I receive for a given stock in a given year? Have a given stock's annual dividend per share kept increasing gradually over years? Have a given stock's annual dividend yield been stable over years? In this post, I explain how to create a dividend tracker for a stock investment portfolio with Google Sheets by simply using pivot tables.