Net present value of investments
Joe, the owner of Cynthia's favorite restaurant, asks for some advice. He wants to buy a new pizza oven, worth 10,000 EUR. He expects that this investment will generate additional cash flows but he wonders whether the new oven is a profitable investment.
You should calculate the net present value (NPV) of Joe's investment. This NPV is the sum of the present values of the future cash flows (in blue) generated by the investment, minus its initial cost of 10,000 (in red) at time 0.
What is your advice for Joe? Assume that interest rates are constant and equal to 5%.
Este ejercicio forma parte del curso
Life Insurance Products Valuation in R
Instrucciones del ejercicio
- Create
cash_flows
with the positive cash flows related to the investment. The vector starts with a zero. - Define
discount_factors
as 1 plus the interest rate of 5% to minus a vector from 0 to 5. - Compute the
net_present_value
of the investment as the present value of the future profits minus the initial cost of 10,000. Will Joe realize an overall profit or loss?
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# Define the cash flows
cash_flows <- c(0, ___(___, ___), ___(___, ___))
# Define the discount factors
discount_factors <- (1 + ___) ^ - (___)
# Calculate the net present value
net_present_value <- ___(___ * ___) - ___
net_present_value