Your first co-op happens to be at an investment firm called Mo-Money. Mo-Money is a newcomer in Canada, and it is primarily interested in deploying a new service to Canadians known as a roboadvisor. Robo-advisors are web-based platforms that automate entire financial planning and investment services from asset allocation, purchasing investment products, rebalancing, and tax reporting with virtually no human involvement. Mo-Money only deals with one specific type of investment product known as exchange-traded funds (ETFs). These are low-cost investment products that are often identified by their ticker symbols on the stock exchange. For example, the Vanguard Growth Portfolio ETF is found by VGRO, and BMO Aggregate Bond Index ETF is found by ZAG on the stock exchange. You can search for it on https://finance.google.ca.

One important part of the service that the robo-advisor provides is generating documents for tax reporting to the Canadian Revenue Agency (CRA). You will implement one particular component of this service known as adjusted cost base (ACB) reporting for ETFs, which is essential when filing taxes that report capital gains or losses on ETF investments. The reason for its importance is that incorrectly computing ACB may result in the client either overpaying in taxes or underpaying; both of which are undesirable for the client.

We will use an example to illustrate the steps necessary to compute the ACB. Suppose that MoMoney has a client called Rupert who has purchased a different number of shares of VGRO over the course of the year. A share is simply a unit of the product. For example, on January 10, 2018, Rupert bought 150 shares of VGRO for the total amount of $10300.14. Throughout the year, Rupert made additional purchases of the same ETF. Below is Rupert’s purchase history for the year for the VGRO ETF.

In December of 2018, Rupert needed to sell some of his shares. He made two sells that are shown below with the amounts he received for each sell transaction.

For tax reporting purposes, whenever a share is sold, the CRA needs the client to report if there are any capital gains or losses (this is a simplification, please consult the appropriate tax documentation for details – not required to complete this project). A capital gain is an increase in value of the investment product, and a capital loss is a loss in the value of the investment product. These are important because the client must pay a tax on the capital gains to the CRA, and on a loss, the client can claim it as a deduction. We are only interested in computing the capital gains or losses incurred due to any shares being sold. In order to make this computation, we need to maintain the ACB, and its ACB per share for every buy and sell transaction. Below are the computed values of the ACB, share balance after the transaction, and the ACB/Share for every Buy performed for Rupert.

To compute the ACB on a Buy, we simply accumulate the total amount paid for the purchases. For example, Rupert’s purchase on 24 February 2018 of 85 shares required him to pay $7423.05. The ACB after this purchase is the sum of his first purchase cost of $10300.14 added with $7423.04, which amounts to $17723.19. To compute the Share Balance on a Buy, we add the share balance from the previous transaction with the number of shares purchased with the new transaction. For example, Rupert’s purchase on 24 February 2018 resulted in 85 new shares being purchased. Thus, the previous share balance of 150 is added to 85 to give a share balance of 235. To compute the ACB/Share on a Buy, divide the ACB by the Share Balance. For example, the ACB/Share for Rupert’s 24 February 2018 transaction was computed as follows: (17723.190/235), which gives $75.418. Notice the importance of the ACB/Share: since purchases of an ETF may take place multiple times throughout the year with different prices being paid for them, the ACB/Share reflects the average cost for each share over the history of the stock.

For transactions that Sell shares of the ETF, we need to update the ACB, Share Balance, and ACB/Share. In addition, because the client receives investment income from the sell, we have to compute the Capital Gain and Loss (CGL). The table below shows the sells appearing after all the purchases we already saw earlier.

To compute the ACB on a Sell, subtract the number of shares sold multiplied (55) by the ACB/Share resulting from the previous transaction ($78.987 from the Buy on 11 November, 2018). For example, the Sell transaction on 8 December 2018, the following computation is done: $28119.53 – (5578.987), which is equal to $23775.22. The Share Balance is simply the previous Share Balance minus the number of shares sold. For the Sell transaction on 8 December 2018, 356 – 55 gives 301 as the new Share Balance. Notice that the ACB/Share for the Sell is computed the same way as the Buy transaction. That is, $23775.22/301, which results in $78.987. Note that the ACB/Share only changes with purchases, and not on sells. On a Sell, we must compute the Capital Gain and Loss (CGL). To compute the CGL, we subtract the number of shares sold multiplied by the ACB/Share from the previous transaction. For the transaction on 8 December 2018, we perform the following subtraction: $5958.15 – (55$78.987), which results in a capital gain of $1613.84. A positive CGL value means that the Sell resulted in capital gains, and a negative CGL value means that the Sell resulted in a capital loss. Note the transaction on 22 December 2018. Rupert’s sell of 80 shares at an unfavourably low price resulted in him receiving $2817.60 for the transaction. This was because of an unfortunate stock market downturn. Once again, using the approach above, the resulting CGL is $2817.60 – (80*$78.987), which gave -$3501.40.; a capital loss. Since taxation reporting is done on a yearly basis, the CRA needs to know if there was a total capital gain or capital loss in that year. This is typically computed by summing up the CGL values for the entire calendar year. For this example, since there was one Sell transaction that resulted in a capital gain, and another Sell in a capital loss, the total CGL to be reported is -$1877.55.