Basic Math & Time Value of Money: Exercises


7. Present value. Assume you have an annual discount factor of 0.95. You own a perpetuity and an annuity, both of which pay $100 annually. The annuity matures after 50 annuals. Compute the present value of the stream of returns for both assets. Recall the following definitions.

\[\sum_{i=1}^{\infty} C \delta^{i} = C \frac{\delta}{1-\delta} \]

\[\sum_{i=1}^{N} C \delta^{i} = C \frac{\delta - \delta^{N+1}}{1-\delta} \]


# Use stock_prices to define vector sp500. sp500 <- stock_prices$___ # Compute present value of annuity. annuity_present_value <- 100*___/(1-___) # Compute present value of perpetuity. perpetuity_present_value <- ___*(0.95-0.95^___)/(1-___) # Print present values of perpetuity and annuity. print(perpetuity_present_value) ___ # Compute present value of annuity. annuity_present_value <- 100*0.95/(1-0.95) # Compute present value of perpetuity. perpetuity_present_value <- 100*(0.95-0.95^51)/(1-0.95) # Print present values of perpetuity and annuity. print(perpetuity_present_value) print(annuity_present_value) test_error() test_object("annuity_present_value", incorrect_msg="Did you use the formula for an infinite geometric series?") test_object("perpetuity_present_value", incorrect_msg="Did you use the formula for a finite geometric series?") test_function("print", incorrect_msg="Did you use the `print()` function?") success_msg("Well done! How large was the difference between the two present values?")
Check the formulas for geometric series in the description.

Previous Exercise Next Exercise