Measuring ETF Performance with DRIP and Tax Implications
I thought I'd post about a project I was working on.
It started with writing scripts that scrape the CDS Innovations web site for the purpose of calculating ACBs for my 2018 tax return. Since I had all that data, I thought I'd create a simulator that works out ETF performance, but includes DRIPs and benefits funds that make good tax choices.
I've included a sample output below. I'm looking to see if anybody else would benefit from the results and I should continue working on it.
Using the same data set, I'm also working on a web app that makes calculating ACBs easier. Please let me know if anybody would be interested.
Note: I haven't yet double-checked all the numbers, please let me know if you notice something off.
It started with writing scripts that scrape the CDS Innovations web site for the purpose of calculating ACBs for my 2018 tax return. Since I had all that data, I thought I'd create a simulator that works out ETF performance, but includes DRIPs and benefits funds that make good tax choices.
I've included a sample output below. I'm looking to see if anybody else would benefit from the results and I should continue working on it.
Using the same data set, I'm also working on a web app that makes calculating ACBs easier. Please let me know if anybody would be interested.
Note: I haven't yet double-checked all the numbers, please let me know if you notice something off.
Code: Select all
// Assumptions
const start = moment('2013-01-14');
const end = moment('2019-01-14');
const initialAmount = 100000;
const tradeFee = 10;
// Approx marginal rates based on $75k income (https://www.ey.com/ca/en/services/tax/tax-calculators-2019-personal-tax)
const taxRates = {
income: 0.3,
capGain: 0.15,
eligibleDiv: 0.075,
ineligibleDiv: 0.2
};
const taxDay = '04-15';
Code: Select all
Calculating return on $100000 for XIC between 2013-2019
Date Type Shares ACB ACB/share Cap. Gains
2013-01-14 Buy (+5028) 5028 (+100016.92) 100017 19.89
2013-03-28 RoC 5028 (-0.40) 100017 19.89
2013-03-28 DRIP (+36) 5064 (+723.60) 100740 19.89
2013-06-28 RoC 5064 (-0.46) 100740 19.89
2013-06-28 DRIP (+43) 5107 (+821.30) 101561 19.89
2013-09-30 RoC 5107 (-0.46) 101561 19.89
2013-09-30 DRIP (+40) 5147 (+806.80) 102367 19.89
2014-01-06 RoC 5147 (-0.31) 102367 19.89
2014-01-06 DRIP (+25) 5172 (+532.75) 102900 19.90
2014-03-31 DRIP (+34) 5206 (+770.10) 103670 19.91
Calculating taxes for 2013
Income of 197.99, tax is 59.40
Eligible dividends of 2711.63, tax is 203.37
Ineligible dividends of 6.20, tax is 1.24
Tax credits of 0.20
Total tax of 263.80, selling 12 share(s) at 22.6 to cover
2014-04-15 Sell (-12) 5194 (-238.96) 103431 19.91 +32.24
2014-06-30 DRIP (+30) 5224 (+718.20) 104149 19.94
2014-09-30 DRIP (+35) 5259 (+826.35) 104975 19.96
2015-01-06 Phan 5259 (+1727.79) 106703 20.29
2015-01-06 DRIP (+34) 5293 (+767.04) 107470 20.30
2015-03-31 RoC 5293 (-3.86) 107466 20.30
2015-03-31 DRIP (+36) 5329 (+850.68) 108317 20.33
Calculating taxes for 2014
Capital gains of 1760.03, tax is 264.00
Eligible dividends of 3142.03, tax is 235.65
Total tax of 499.66, selling 21 share(s) at 24.5 to cover
2015-04-15 Sell (-21) 5308 (-426.85) 107890 20.33 +87.65
2015-06-30 RoC 5308 (-3.98) 107886 20.33
2015-06-30 DRIP (+38) 5346 (+874.00) 108760 20.34
2015-09-30 RoC 5346 (-3.96) 108756 20.34
2015-09-30 DRIP (+41) 5387 (+863.46) 109620 20.35
2016-01-06 RoC 5387 (-4.09) 109616 20.35
2016-01-06 Phan 5387 (+2427.54) 112043 20.80
2016-01-06 DRIP (+45) 5432 (+906.75) 112950 20.79
2016-03-31 RoC 5432 (-35.04) 112915 20.79
2016-03-31 DRIP (+41) 5473 (+875.35) 113790 20.79
Calculating taxes for 2015
Income of 51.79, tax is 15.54
Capital gains of 2695.33, tax is 404.30
Eligible dividends of 3286.50, tax is 246.49
Tax credits of 0.21
Total tax of 666.11, selling 31 share(s) at 21.61 to cover
2016-04-15 Sell (-31) 5442 (-644.53) 113146 20.79 +25.38
2016-06-30 RoC 5442 (-36.30) 113109 20.78
2016-06-30 DRIP (+41) 5483 (+912.25) 114022 20.80
2016-09-30 RoC 5483 (-35.64) 113986 20.79
2016-09-30 DRIP (+38) 5521 (+886.54) 114873 20.81
2017-01-05 RoC 5521 (-35.89) 114837 20.80
2017-01-05 DRIP (+36) 5557 (+888.12) 115725 20.83
2017-03-31 RoC 5557 (-0.67) 115724 20.82
2017-03-31 DRIP (+37) 5594 (+911.31) 116635 20.85
Calculating taxes for 2016
Income of 130.55, tax is 39.17
Capital gains of 25.38, tax is 3.81
Eligible dividends of 3320.30, tax is 249.02
Ineligible dividends of 9.08, tax is 1.82
Tax credits of 0.66
Total tax of 293.16, selling 12 share(s) at 24.61 to cover
2017-04-15 Sell (-12) 5582 (-250.20) 116385 20.85 +45.12
2017-06-30 RoC 5582 (-0.73) 116385 20.85
2017-06-30 DRIP (+42) 5624 (+1008.84) 117393 20.87
2017-09-29 RoC 5624 (-0.73) 117393 20.87
2017-09-29 DRIP (+40) 5664 (+989.60) 118382 20.90
2018-01-04 RoC 5664 (-0.45) 118382 20.90
2018-01-04 Phan 5664 (+1653.21) 120035 21.19
2018-01-04 DRIP (+23) 5687 (+598.69) 120634 21.21
2018-03-29 RoC 5687 (-0.85) 120633 21.21
2018-03-29 DRIP (+40) 5727 (+976.00) 121609 21.23
Calculating taxes for 2017
Income of 99.58, tax is 29.88
Capital gains of 1698.33, tax is 254.75
Eligible dividends of 3474.58, tax is 260.59
Total tax of 545.22, selling 23 share(s) at 24.28 to cover
2018-04-15 Sell (-23) 5704 (-488.39) 121120 21.23 +70.05
2018-06-29 RoC 5704 (-0.97) 121119 21.23
2018-06-29 DRIP (+43) 5747 (+1110.26) 122230 21.27
2018-09-28 RoC 5747 (-1.09) 122229 21.27
2018-09-28 DRIP (+47) 5794 (+1197.09) 123426 21.30
2019-01-04 RoC 5794 (-0.75) 123425 21.30
2019-01-04 Phan 5794 (+1088.34) 124513 21.49
2019-01-04 DRIP (+37) 5831 (+848.78) 125362 21.50
Calculating taxes for 2018
Income of 172.38, tax is 51.71
Capital gains of 1161.32, tax is 174.20
Eligible dividends of 3980.57, tax is 298.54
Ineligible dividends of 7.45, tax is 1.49
Total tax of 525.94, selling 23 share(s) at 23.81 to cover
2019-01-14 Sell (-23) 5808 (-494.48) 124868 21.50 +53.15
We reached the end, selling all shares at 23.81
2019-01-14 Sell (-5808) 0 (-124867.63) 0 - +13410.85
Calculating taxes for 2019
Capital gains of 13463.99, tax is 2019.60
Sale value (138278.48) - initial cost (100016.92) - final taxes (2019.60) = 36241.96
Annualized return on investment for XIC between 2013-2019 is 5.3%