Computing a bond's present value
Now that you've calculated future value from present value, it should be trivial to reverse the process.
Recall from the video that if you expect to receive $100 one year from now, the present value of that $100 will be less today (because you prefer to have the money sooner than later). Moreover, if we expect to receive $100 two years from now, the value of that will be less than the present value of $100 one year now.
In this exercise, you will calculate the present value of fv1
and fv2
assuming an r
(interest rate) of 0.10
, where fv1
is a future value one year from now and fv2
is a future value two years from now.
The objects fv1
, fv2
, and r
, which you generated in the previous exercise, are available in your workspace.
This exercise is part of the course
Bond Valuation and Analysis in R
Exercise instructions
- Use basic mathematical operations in R to calculate the present value of
fv1
. Save this topv1
. - Repeat this process to calculate the present value of
fv2
. Save this topv2
.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Calculate pv1
pv1 <- ___ / (1 + ___)
# Calculate pv2
pv2 <-
# Print pv1 and pv2