Rate of return

This cannot be done with a formula. The value of r must be found using an iterative technique. There are several methods of doing this. We use a hybrid of the Newton-Raphson and bisection methods described by Press, Teukolsky, Vetterling, and Flannery on pp. 366-367 in Numerical Recipes in C (1999, Cambridge University Press).