We needed something simple to flesh out how the Calculation structure works. I've written rates of return so often I could almost do it in my sleep. It took about a week, with much of it being spent perusing my library of rate of return books, looking for new formula tricks.
This time, I used Mathematica to take the iterative guessing process out to a 6th degree polynomial. I don't think it's any more accurate but the code certainly looks impressive--pages of nothing but complicated, error-prone formulas, although there shouldn't be any errors since Mathematica did all the work. I cut my teeth at dbCAMS by debugging and rewriting their IRR formula when I was still on the support team. And I've rewritten it from scratch several times at other companies. The first time I wrote it completely from scratch it took me more than a month to perfect it, and it involved solving polynomials by hand. So I'm pretty pleased at how quickly we were able to do it this time.