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?
Diese Übung ist Teil des Kurses
Bond Valuation and Analysis in Python
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# Calculate the upfront investment at 3% interest
pv_three_percent = -npf.pv(____)
# Print the result
print("3% Annual Interest: ", ____)