powered by
Calculates the present value of a cashflow
disc_value(r, cf, d = 1:length(cf))
The present value of the cashflow
A rate curve
The vector of values corresponding to the cashflow
The periods on which the cashflow occurs. If missing, it is assumed that cf[i] occurs on period i
r <- rate_curve(rates = c(0.1, 0.2, 0.3), rate_type = "zero_eff") disc_value(r, cf = c(-1, 1.10), d = c(0,1)) disc_value(r, cf = c(-1, 1.15*1.15), d = c(0,2))
Run the code above in your browser using DataLab