So you want to be a millionaire?
Your projections show that you can accumulate over $700,000 in just 15 years by following a strict budget and growing your salary steadily over time.
But you want to be a millionaire in 15 years, retire young, sip margaritas and travel for the rest of your life. In order to do that, you're going to need to invest.
Remember the .pmt()
function from numpy
? You can use this function to calculate how much you need to save each month in order to accumulate your desired wealth over time.
You still have a lot to learn about the stock market, but your financial advisor told you that you can earn anywhere from 5-10% per year on your capital on average by investing in a low cost index fund.
You know that the stock market doesn't always go up, but you will assume a modest 7% return per year, which has been the average annual return in the US stock market from 1950-2009.
The forecast_months
variable from the previous exercise is available.
This exercise is part of the course
Introduction to Financial Concepts in Python
Exercise instructions
- Set the
investment_rate_annual
to 7% and derive the monthly investment rate. - Calculate the required monthly investment to amass $1,000,000 over 15 years.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
import numpy as np
# Set the annual investment return to 7%
investment_rate_annual = ____
# Calculate the monthly investment return
investment_rate_monthly = ____
# Calculate your required monthly investment to amass $1M
required_investment_monthly = ____(rate=____, nper=____, pv=____, fv=____)
print("You will have to invest $" + str(round(required_investment_monthly, 2)) + " per month to amass $1M over 15 years")