MulaiMulai sekarang secara gratis

Present value of a cash flow

Cynthia Rose is a 12-year old girl who is a huge Prince enthusiast. She buys his music on iTunes and plans to attend a special tribute concert in the near future. Her spending pattern on Prince-mania is sketched on the timeline printed below.

To finance her plans, she turns to her grandmother for help. How much will her grandmother have to deposit at this moment to cover all these future payments? Assume a constant interest rate of 2%. Payments take place at the beginning of the year.

Latihan ini adalah bagian dari kursus

Life Insurance Products Valuation in R

Lihat Kursus

Petunjuk latihan

  • Define a vector cash_flows which contains Cynthia's expenses.
  • Store the interest rate of 2% in the variable i and the reciprocal of the accumulation factor 1 + i in the variable v.
  • Define a vector discount_factors of the same length as cash_flows containing v raised to the power 0 to 5.
  • Calculate the present_value of the cash flow vector.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Define the cash flows
cash_flows <- ___(___(___, ___), ___, ___)
  
# Define i and v
i <- ___
v <- 1 / (___ + ___)
  
# Define the discount factors
discount_factors <- ___ ^ (___)
  
# Calculate the present value
present_value <- ___(___ * ___)
present_value
Edit dan Jalankan Kode