[Concept]
When we invest money upfront, and expecting cash flow influx from now on, and the discount rate is given, what will be the present value for all?
For example, there is a construction project which needs $100M right now. I can expect the return $20M in the first year, $30M in the second year, $40M in the third year, and $50 in the forth year.
What will be the present value of all these cash flow? The discount rate is 5%
[Source Code]
#NPV Calculation
#When you define the cash flow, just use below like
#cf <- c(10, 20, 30, 40)
#<Example>
#f.npv(discount=0.05, upfront=-100, cf=c(20,30,40,50))
f.npv = function(discount, upfront, cf) {
npv <- upfront
for(i in 1:length(cf)) {
npv <- npv + cf[i]/(1+discount)^i
}
return(npv)
}
[Example]
> f.npv(discount=0.05, upfront=-100, cf=c(20,30,40,50))
[1] 21.94713
Searching for bad credit loans online has become easier. As lenders become more common on the internet, a number of individuals are learning about the opportunities that exist for finding loans online. online loans no credit check instant approval
ReplyDelete