Calculates a Cash Flow model from a vector of flows.
cf(x, i = NULL, safe = NULL, rein = safe)
The negative values are money paid out, the positive values are money received in.
IRR (Internal rate of return) is calculated by solving polynomial, using
polyroot
function. If IRR equation have several real solutions,
all are found.
NPV extremes are found in the same method, after obtaining first-order derivative of IRR equation.
MIRR table and NPV table are created only if i, safe and rein are given (are not null).
summary.cf
y = cf(c(-2500,6250,-3800),1:10,2:11,4:13)
y
summary(y)
plot(y)
plot(y,type="n")
Run the code above in your browser using DataLab