Calculating APR for biweekly payments

Just toying around:
1) First, and really obvious attempt simply failed to converge.
2) A little fancier converged, but to an incorrect solution.
I got tired of the exercise..

Don't get me wrong. The best solution is one that works and that you understand and that fulfills client expectations.
 
So, you never actually got your idea working and you "Got tired of the exercise"?

I was not able to get your equation working either (could be something I was doing wrong) and am now looking for another way to do this.

Thanks,
 
So, you never actually got your idea working and you "Got tired of the exercise"?

I was not able to get your equation working either (could be something I was doing wrong) and am now looking for another way to do this.

Thanks,
Let us remember that tk is going through this exercise for YOUR edification - he has no PAID clientele here.
 
Let us remember that tk is going through this exercise for YOUR edification - he has no PAID clientele here.

That's not the point, of course. I was just asking if the formula was correct.

If you review the postings, I thanked tk multiple times; he's clearly an expert in the field. However, if the formula isn't correct, then I shouldn't be wasting my time with it, right? He had said earlier in the postings that he got nearly the expected results for the two examples, so I "assumed" he had the correct formula. It's fine to say it isn't.

I'm now looking elsewhere to hire a computational financial person to help me with this APR calculation.

I sincerely hope "tk" knows I value all he did. :)

FYI....Not that this is really relevant, but this work was not for a paying client ... yet. It's more of an "on spec" effort to get the client.

Thanks,
 
So, you never actually got your idea working and you "Got tired of the exercise"?

I was not able to get your equation working either (could be something I was doing wrong) and am now looking for another way to do this.

Thanks,
The formula is correct and my idea always works. :)
My idea is to stick with it and use whatever tools are available until we solve the problem - unless the need or interest is extinguished.

If nothing else:
1) My simpler iterations didn't seem to provide much benefit. I mostly wanted to implement this to avoid the massive number of calculations with Newton on this one. Unfortunately, the iterations shot off into space for most things I tried - excepting the one that converged to the wrong solution. That is frustrating when it happens.
2) The derivative is oppressive, as you noticed. The ratio is even worse. There is no reason why Newton wouldn't work on these relatively well-behaved curves. It's just a whole lot of CPU and floating point calculation that introduces machine error. The quadratic convergence is tempting!
3) Bisection always works with these financial problems if there is a solution. It is reasonable to assume [0%, 100%] and you can ALWAYS find a starting point.

Good luck with whatever method you choose.
 
The formula is correct and my idea always works. :)
My idea is to stick with it and use whatever tools are available until we solve the problem - unless the need or interest is extinguished.

If nothing else:
1) My simpler iterations didn't seem to provide much benefit. I mostly wanted to implement this to avoid the massive number of calculations with Newton on this one. Unfortunately, the iterations shot off into space for most things I tried - excepting the one that converged to the wrong solution. That is frustrating when it happens.
2) The derivative is oppressive, as you noticed. The ratio is even worse. There is no reason why Newton wouldn't work on these relatively well-behaved curves. It's just a whole lot of CPU and floating point calculation that introduces machine error. The quadratic convergence is tempting!
3) Bisection always works with these financial problems if there is a solution. It is reasonable to assume [0%, 100%] and you can ALWAYS find a starting point.

Good luck with whatever method you choose.

Thanks very much.
 
Top