Solving real-world problems
Now you are going to use the functions you have learned to solve some real-life problems:
You want to start investing and find a bond paying a 3% annual rate compounded monthly. If you invest USD 100 per month, how much will you have after five years?
You are saving for a deposit on a house. You need to save up USD 15,000 and have saved USD 5,000 so far. If you save USD 250 per month, how many months until you reach your goal?
You are 22 years old and want to retire at 65 with USD 1 million in the bank. If you can grow your money at 5% per year, how much should you invest per month?
This exercise is part of the course
Bond Valuation and Analysis in Python
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Calculate how much USD 100 per month compounding at 3% grows to after 5 years
total_savings = npf.___(rate=____, nper=____, pmt=____, pv=____)
print(total_savings)