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.
Diese Übung ist Teil des Kurses
Life Insurance Products Valuation in R
Anleitung zur Übung
- Define a vector
cash_flowswhich contains Cynthia's expenses. - Store the interest rate of 2% in the variable
iand the reciprocal of the accumulation factor1 + iin the variablev. - Define a vector
discount_factorsof the same length ascash_flowscontainingvraised to the power 0 to 5. - Calculate the
present_valueof the cash flow vector.
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# 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