Last active
August 29, 2015 14:10
A very elementary way of projecting the impact of investment fund fees
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def calc(principal, fee_pct, avg_growth_pct, annual_contrib, years): | |
""" | |
>>> calc(10000, 1.5, 7, 5500, 35) | |
(154256.73, 48243.27) | |
>>> calc(10000, 1.0, 7, 5500, 35) | |
(168507.21, 33992.79) | |
>>> calc(10000, 0.5, 7, 5500, 35) | |
(184508.4, 17991.6) | |
""" | |
fee = fee_pct / 100 | |
avg_growth = avg_growth_pct / 100 + 1 | |
total_fees_paid = 0 | |
for x in range(years): | |
principal *= avg_growth | |
principal += annual_contrib | |
cost = principal * fee | |
principal -= cost | |
total_fees_paid += cost | |
return round(principal, 2), round(total_fees_paid, 2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was comparing Fidelity and Vanguard index funds, and discovered what an impact a small difference in fees can make. In this (rudimentary) example above, the difference of just 1% in annual fees over 35 years can make a $30,000 difference in your portfolio!