เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

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.

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Bond Valuation and Analysis in R

ดูคอร์ส

คำแนะนำการฝึกหัด

  • Use basic mathematical operations in R to calculate the present value of fv1. Save this to pv1.
  • Repeat this process to calculate the present value of fv2. Save this to pv2.

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

# Calculate pv1
pv1 <- ___ / (1 + ___)

# Calculate pv2
pv2 <- 

# Print pv1 and pv2


แก้ไขและรันโค้ด