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.
This exercise is part of the course
Life Insurance Products Valuation in R
Exercise instructions
- 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 factor1 + i
in the variablev
. - Define a vector
discount_factors
of the same length ascash_flows
containingv
raised to the power 0 to 5. - Calculate the
present_value
of the cash flow vector.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# 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