CommencerCommencer gratuitement

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.

Cet exercice fait partie du cours

Introduction to Financial Concepts in Python

Afficher le cours

Instructions

  • 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.

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

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")
Modifier et exécuter le code