开始使用免费开始使用

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%.

本练习是课程的一部分

Life Insurance Products Valuation in R

查看课程

练习说明

  • 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?

交互式实操练习

通过完成这段示例代码来试试这个练习。

# 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
编辑并运行代码