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%.
Diese Übung ist Teil des Kurses
Bond Valuation and Analysis in R
Anleitung zur Übung
- 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
andr
with basic mathematical operations in R. Store this tofv1
. - Calculate the future value of $100 two years from now using
pv
andr
with basic mathematical operations in R. Store this tofv2
.
Interaktive Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
# Create pv
pv <-
# Create r
r <-
# Calculate fv1
fv1 <- ___ * (1 + ___)
# Calculate fv2
fv2 <-