powered by
Internal Rate of Return of an irregular cashflow (IRR)
xirr(cf, d, tau = NULL, comp_freq = 1, interval = c(-0.99999, 10), ...)
The cashflow
The dates when each cashflow occurs. Same length as the cashflow. Only used if tau is NULL. Assumes act/365 fractions
The year fractions when each cashflow occurs. Same length as the cashflow
The compounding frequency used. Most relevant cases are 1 for yearly, 2 twice a year, 4 quarterly, 12 monthly, 0 no compounding, Inf continuous
A length 2 vector that indicates the root finding algorithm where to search for the irr
Other arguments to be passed on to uniroot
xirr(cf = c(-1, 1.5), d = Sys.Date() + c(0, 365))
Run the code above in your browser using DataLab