Aan de slagGa gratis aan de slag

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

Deze oefening maakt deel uit van de cursus

Bond Valuation and Analysis in R

Cursus bekijken

Oefeninstructies

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

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Create pv
pv <- 

# Create r
r <- 

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

# Calculate fv2
fv2 <- 
Code bewerken en uitvoeren