ComeçarComece de graça

Computing a bond's future value

Recall from the video that the future value of $100 will be more than $100 because you have to be compensated for the opportunity cost (e.g., interest rate) that you forego by not having that money now (and investing it!). The longer you have to forego being able to use that money, the larger your opportunity cost grows.

The growth rate of the opportunity cost is compounded, which means the future value of $100 two years from now is equal to the future value of $100 one year from now growing at the opportunity cost (i.e., the opportunity cost grows at a compounded rate).

In this exercise, you will calculate the future value of $100 one year from now and two years from now assuming an opportunity cost of 10%.

Este exercício faz parte do curso

Bond Valuation and Analysis in R

Ver curso

Instruções do exercício

  • Create pv (present value) with a value of 100.
  • Create r (interest rate) of 0.10.
  • Calculate the future value of $100 one year from now using pv and r with basic mathematical operations in R. Store this to fv1.
  • Calculate the future value of $100 two years from now using pv and r with basic mathematical operations in R. Store this to fv2.

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# Create pv
pv <- 

# Create r
r <- 

# Calculate fv1
fv1 <- ___ * (1 + ___)

# Calculate fv2
fv2 <- 
Editar e executar o código