Basic Math & Time Value of Money: Exercises


1. Continuous compounding. Assume you have a savings account that offers continuous compounding at nominal_annual_rate. If you make an initial deposit, P, how much money will you have in the account after 6 months? 12 months? Recall that exp() implements the exponential function in R.


nominal_annual_rate <- 0.05 P <- 100 # Compute balance after 6 months. six_month_balance <- ___ * exp(___*nominal_annual_rate) # Compute balance after 12 months. twelve_month_balance <- ___ # Compute balance after 6 months. six_month_balance <- P * exp(0.5*nominal_annual_rate) # Compute balance after 12 months. twelve_month_balance <- P * exp(nominal_annual_rate) test_error() test_object("six_month_balance", incorrect_msg="Remember that the time interval should be given in fractions of a year.") test_object("twelve_month_balance", incorrect_msg="Did you remember to multiply by the initial deposit, `P`?") success_msg("Good job!")
Did you remember to multiply by the initial deposit, P?

Previous Exercise Next Exercise