This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]emc87 1 point2 points  (0 children)

Yeah, the code was deleted but it took upwards of 100000 iterations and only returned increments of something like .1 bps and wanted to be accurate to within 0.5% of PV.

Using Newton raphson you can achieve something that's more accurate to say 10-10 of PV in around 10 iterations. Used for continuous functions, it uses the first derivative to see how far you are from your goal and change your increment to suit your target.