Computes IRR (Internal Rate of Return) for cash flows with different cash flow and compounding conventions. Cash flows need not be evenly spaced.
irr(
cf,
interval = NULL,
cf.freq = 1,
comp.freq = 1,
cf.t = seq(from = 0, by = 1/cf.freq, along.with = cf),
r.guess = NULL,
toler = 1e-06,
convergence = 1e-08,
max.iter = 100,
method = c("default", "newton", "bisection")
)
Vector of cash flows
the interval c(lower, upper) within which to search for the IRR
Frequency of annuity payments: 1 for annual, 2 for semi-annual, 12 for monthly.
Frequency of compounding of interest rates: 1 for annual, 2 for semi-annual, 12 for monthly, Inf for continuous compounding.
Optional vector of timing (in years) of cash flows. If omitted regular sequence of years is assumed.
the starting value (guess) from which the solver starts searching for the IRR
the argument toler
for
irr.solve
. The IRR is regarded as correct if
abs(NPV) is less than toler
. Otherwise the irr
function returns NA
the argument convergence
for
irr.solve
the argument max.iter
for
irr.solve
The root finding method to be used. The
default
is to try Newton-Raphson method
(newton.raphson.root
) and if that fails to try
bisection (bisection.root
). The other two
choices (newton
and bisection
force only one of
the methods to be tried.