for x in self.accounts:
if not x.is_age_restricted():
amount_to_withdraw = min(amount_needed, x.get_balance())
- print "## Withdrawing %s from %s" % (amount_to_withdraw,
- x.get_name())
- x.withdraw(amount_to_withdraw, taxes)
- amount_needed -= amount_to_withdraw
- if amount_needed <= 0: return
+ if amount_to_withdraw > 0:
+ print "## Withdrawing %s from %s" % (amount_to_withdraw,
+ x.get_name())
+ x.withdraw(amount_to_withdraw, taxes)
+ amount_needed -= amount_to_withdraw
+ if amount_needed <= 0: return
# Next try age restircted accounts
for x in self.accounts:
(x.belongs_to_scott() and self.scott_age > 60))):
amount_to_withdraw = min(amount_needed, x.get_balance())
- print "## Withdrawing %s from %s" % (amount_to_withdraw,
- x.get_name())
- x.withdraw(amount_to_withdraw, taxes)
- amount_needed -= amount_to_withdraw
- if amount_needed <= 0: return
+ if amount_to_withdraw > 0:
+ print "## Withdrawing %s from %s" % (amount_to_withdraw,
+ x.get_name())
+ x.withdraw(amount_to_withdraw, taxes)
+ amount_needed -= amount_to_withdraw
+ if amount_needed <= 0: return
# Last try Roth accounts
for x in self.accounts:
(x.belongs_to_scott() and self.scott_age > 60))):
amount_to_withdraw = min(amount_needed, x.get_balance())
- print "## Withdrawing %s from %s" % (amount_to_withdraw,
- x.get_name())
- x.withdraw(amount_to_withdraw, taxes)
- amount_needed -= amount_to_withdraw
- if amount_needed <= 0: return
+ if amount_to_withdraw > 0:
+ print "## Withdrawing %s from %s" % (amount_to_withdraw,
+ x.get_name())
+ x.withdraw(amount_to_withdraw, taxes)
+ amount_needed -= amount_to_withdraw
+ if amount_needed <= 0: return
raise Exception("Unable to find enough money this year, still need %s more!" % amount_needed)
def get_social_security(self,
self.scott_age, self.lynn_age, self.alex_age)
# Print out how much money is in each account + overall net worth.
- total = 0
+ total = money(0)
for x in self.accounts:
total += x.get_balance()
print "{:<50}: {:>14}".format(x.get_name(), x.get_balance())
# When we reach a certain age we are eligible for SS
# payments.
- ss = self.get_social_security(adjusted_scott_annual_social_security_dollars,
- adjusted_lynn_annual_social_security_dollars,
- taxes)
+ ss = self.get_social_security(
+ adjusted_scott_annual_social_security_dollars,
+ adjusted_lynn_annual_social_security_dollars,
+ taxes)
if ss > 0:
print "## Social security paid %s" % ss
total_income += ss
# * Social security benefits increase
# * Tax brackets are adjusted for inflation
inflation_multiplier = self.params.get_average_inflation_multiplier()
+ returns_multiplier = self.params.get_average_investment_return_multiplier()
+ ss_multiplier = self.params.get_average_social_security_multiplier()
adjusted_annual_expenses *= inflation_multiplier
for x in self.accounts:
- x.appreciate(self.params.get_average_investment_return_multiplier())
+ x.appreciate(returns_multiplier)
if self.scott_age >= self.params.get_initial_social_security_age(constants.SCOTT):
- adjusted_scott_annual_social_security_dollars *= self.params.get_average_social_security_multiplier()
+ adjusted_scott_annual_social_security_dollars *= ss_multiplier
if self.lynn_age >= self.params.get_initial_social_security_age(constants.LYNN):
- adjusted_lynn_annual_social_security_dollars *= self.params.get_average_social_security_multiplier()
-
+ adjusted_lynn_annual_social_security_dollars *= ss_multiplier
self.params.get_federal_ordinary_income_tax_brackets().adjust_with_multiplier(inflation_multiplier)
self.params.get_federal_dividends_and_long_term_gains_income_tax_brackets().adjust_with_multiplier(inflation_multiplier)
except Exception as e:
print "Exception: %s" % e
- print "Ran out of money!!!"
- pass
+ print "Ran out of money!?!"
finally:
self.dump_final_report(taxes)