Session Ready
Exercise

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.

Instructions
100 XP
  • 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.