Created
February 11, 2013 19:43
-
-
Save anonymous/4756990 to your computer and use it in GitHub Desktop.
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
v_bal = f_bal = 20000 | |
for i in range(10): | |
v_bal += 5200 | |
f_bal += 5200 | |
v_bal *= 1.05 | |
f_bal *= 1.05 | |
if i == 0: | |
v_cost = 75 + 25*5 | |
else: | |
v_cost = 26*5 | |
v_cost += v_bal*0.0018 | |
f_cost = f_bal*0.0076 | |
v_bal -= v_cost | |
f_bal -= f_cost | |
print "* Year {0}. Vanguard. This year's cost: {1:.2f}. This year's ending balance: {2:.2f}".format(i+1, v_cost, v_bal) | |
print "* Year {0}. Fidelity. This year's cost: {1:.2f}. This year's ending balance: {2:.2f}".format(i+1, f_cost, f_bal) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment