Get startedGet started for free

Calculating the required interest rate

If you have a certain financial goal in mind, such as saving a set amount of money by a set time, you can calculate what return will achieve this goal.

This is useful if, for example, you wanted to check if the goal you have set is realistic given current levels of interest rates.

Earlier, you saw that to retire in 30 years with USD 1,000,000 in the bank by investing USD 1,500 per month, you needed to earn an annual return of 3.77%. Calculate how much higher this return would need to be if you wanted to retire with USD 2,000,000 instead, again using monthly compounding.

This exercise is part of the course

Bond Valuation and Analysis in Python

View Course

Exercise instructions

  • Import the numpy_financial package using the alias npf.
  • Use the npf.rate() function to calculate the required return and save this to required_return.
  • Print the result.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Import the numpy_financial package using the alias npf


# Calculate return on investments required: required_return
required_return = ____

# Print the result
Edit and Run Code