black_scholes_rust icon indicating copy to clipboard operation
black_scholes_rust copied to clipboard

Add jaeckel IV calculation

Open Zarathustra2 opened this issue 3 years ago • 4 comments
trafficstars

Added the C++ version of www.jaeckel.org IV calculation and linked it.

Zarathustra2 avatar Jan 31 '22 11:01 Zarathustra2

Thanks Dario! I'm guessing this is done for performance reasons? Do you have any benchmarks comparing native rust to the c++ implementation?

danielhstahl avatar Jan 31 '22 11:01 danielhstahl

I have not but the reason I did it is because I found the IV calculation of Jaeckel more accurate when comparing it with my local brokers. The rust one did not always give me results while Jaeckel gave me more constant results with the same params.

Let me try to add a benchmark, I will try to cycle back within the next days! :)

Zarathustra2 avatar Jan 31 '22 11:01 Zarathustra2

Also I have a precision parameter which may cause the IV calculation to not run for the full 10000 iterations. Which could impact the accuracy vs the c code.

danielhstahl avatar Feb 02 '22 15:02 danielhstahl

@danielhstahl Sorry did not have the time yet; trying to do over the weekend hopefully!

Zarathustra2 avatar Feb 15 '22 19:02 Zarathustra2