raymon1 / financial

Financial is a Rust crate that contains collection of finance calculations memicking some of Excel Financial Functions interface.
https://docs.rs/crate/financial
14 stars 5 forks source link

fix for #3: prefer irr solutions close to zero #4

Closed kyegupov closed 2 years ago

kyegupov commented 2 years ago

fixes https://github.com/raymon1/financial/issues/3 (well, not for all conceivable cases, but still improves the odds)

A more safe solution would be to use matrix approach, like numpy: https://github.com/numpy/numpy-financial/blob/e3c2a4eccd1f44082597ace0550eb3daf20156fd/numpy_financial/_financial.py#L775-L785

raymon1 commented 2 years ago

Thanks for reporting the issue and the contribution, I have updated the crate with your changes. Again Thank you!

raymon1 commented 2 years ago

@kyegupov and apologies for the late response