danielhstahl / black_scholes_rust

Rust for black scholes
https://danielhstahl.github.io/black_scholes_rust/dev/bench/
22 stars 8 forks source link

FEAT: Added Rho #4

Closed Zarathustra2 closed 3 years ago

Zarathustra2 commented 3 years ago

This adds Rho for call & put options. Also added greeks tests for a sample option.

On my machine the test call_iv_works_with_broad_set_of_numbers fails with

thread 'tests::call_iv_works_with_broad_set_of_numbers' panicked at 'called `Result::unwrap()` on an `Err` value: NaN', src/lib.rs:532:85
danielhstahl commented 3 years ago

Thanks, this looks good. I'll fix up the github actions; I need to update gcov and probably use coveralls instead of codecov (which has been having issues extracting coverage from lcov recently). Could you recommit without the changes to rust.yml?

Thanks!

danielhstahl commented 3 years ago

Also I'll split rust.yml into a "Test" and a "deploy" so that it doesn't try to push to crates on every push :).

danielhstahl commented 3 years ago

Actually, since this passed I'll just merge it and then fix it up. Thanks again this is great!

Zarathustra2 commented 3 years ago

Thanks for the quick response @danielhstahl and thanks for the repo!

Should I still undo the commits to rust.yml? I fixed the issue, problem was that on nightly we first build without any flags and then run the tests with some custom flags. If we clean before the build or build with the custom flags, it won't fail!

Zarathustra2 commented 3 years ago

Oh, you merged it already, thanks!