Present value of projected cash flows (1)
Time for some analysis! Earlier, Lore introduced the idea of present value. You will use that idea in the next two exercises, so here is another example.
If you expect a cash flow of $100 to be received 1 year from now, what is the present value of that cash flow at a 5% interest rate? To calculate this, you discount the cash flow to get it in terms of today's dollars. The general formula for this is:
present_value <- cash_flow * (1 + interest / 100) ^ -year
95.238 = 100 * (1.05) ^ -1
Another way to think about this is to reverse the problem. If you have $95.238 today, and it earns 5% over the next year, how much money do you have at the end of the year? We know how to do this problem from way back in chapter 1! Find the multiplier that corresponds to 5% and multiply by $95.238!
100 = 95.238 * (1.05)
Aha! To discount your money, just do the reverse of what you did with stock returns in chapter 1.
This is a part of the course
“Introduction to R for Finance”
Exercise instructions
- If you expect to receive $4000 in 3 years, at a 5% interest rate, what is the present value of that money? Follow the general formula above and assign the result to
present_value_4k
. - Using vectors, you can calculate the present value of the entire column of
cash_flow
at once! Usecash$cash_flow
,cash$year
and the general formula to calculate the present value of all of your cash flows at 5% interest. Add it tocash
as the columnpresent_value
. - Print out
cash
to see your new column.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Present value of $4000, in 3 years, at 5%
present_value_4k <-
# Present value of all cash flows
cash$present_value <-
# Print out cash