LoslegenKostenlos loslegen

Adjusting future values for inflation

You can now put together what you learned in the previous exercises by following a simple methodology:

  • First, forecast the future value of an investment given a rate of return
  • Second, discount the future value of the investment by a projected inflation rate

The methodology above will use both the .fv() and .pv() functions to arrive at the projected value of a given investment in today's dollars, adjusted for inflation.

Diese Übung ist Teil des Kurses

Introduction to Financial Concepts in Python

Kurs anzeigen

Anleitung zur Übung

  • Calculate the future value of a $10,000 investment returning 8% per year for 10 years using .fv() and assign it to investment_1.
  • Calculate the inflation-adjusted present value of investment_1, using an inflation rate of 3% per year and assign it to investment_1_discounted.

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

import numpy as np

# Calculate investment_1
investment_1 = ____(rate=____, nper=____, pmt=0, pv=____)
print("Investment 1 will yield a total of $" + str(round(investment_1, 2)) + " in 10 years")

# Calculate investment_2
investment_1_discounted = ____(rate=____, nper=____, pmt=____, fv=____)
print("After adjusting for inflation, investment 1 is worth $" + str(round(-investment_1_discounted, 2)) + " in today's dollars")
Code bearbeiten und ausführen