Calculating present value

Compound interest can have a very powerful effect over time. In this exercise, you will examine how much you need to invest upfront at different interest rates to achieve a financial target. numpy_financial has already been imported for you as npf.

Imagine you want to have saved USD 11,000 after 7 years and consider three different investments, each paying 3%, 4%, and 5% annual interest compounded monthly. If you contribute USD 100 per month, what initial lump sum should you also invest to achieve this goal?

This exercise is part of the course

Bond Valuation and Analysis in Python

View Course

Hands-on interactive exercise

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

# Calculate the upfront investment at 3% interest
pv_three_percent = -npf.pv(____)

# Print the result
print("3% Annual Interest: ", ____)