Skip to content

Instantly share code, notes, and snippets.

@erikseulean
Created May 17, 2019 22:00
Show Gist options
  • Select an option

  • Save erikseulean/0a00699b1067893df1fa74e2a9ae06e7 to your computer and use it in GitHub Desktop.

Select an option

Save erikseulean/0a00699b1067893df1fa74e2a9ae06e7 to your computer and use it in GitHub Desktop.
CURRENT_AGE = 27
BLOOMBERG_MULTIPLICATION_RATE = 2
ESTIMATED_INFLATION_RATE = 0.03
TAX_FREE_AMOUNT = 0.25
ESTIMATED_TAX_VALUE = 0.35
ANUAL_INVESTMENT = 10000
def years_until_retirement():
return 55 - CURRENT_AGE
def total_investment():
return ANUAL_INVESTMENT * BLOOMBERG_MULTIPLICATION_RATE * years_until_retirement()
def lump_sum():
return TAX_FREE_AMOUNT * total_investment()
def taxable_income():
return total_investment() - lump_sum()
def take_home_after_tax():
return taxable_income() - ESTIMATED_TAX_VALUE * taxable_income()
def adjusted_to_inflatio_rate():
return (1 - ESTIMATED_INFLATION_RATE) ** years_until_retirement() * take_home_after_tax()
result = (
f"Starting investing at {CURRENT_AGE}, investing {ANUAL_INVESTMENT:,} per year\n"
f"when Bloomberg is having a multiplication rate of {BLOOMBERG_MULTIPLICATION_RATE:,}\n"
f"total investment is {total_investment():,} from which tax free {lump_sum():,} \n"
f"taxable income is {taxable_income():,} and take home after tax {take_home_after_tax():,}\n"
f"and after adjusting to inflatio rate {adjusted_to_inflatio_rate():,}"
)
print(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment