fmilthaler / FinQuant

A program for financial portfolio management, analysis and optimisation.
MIT License
1.34k stars 190 forks source link

Chore/consistent type hints #122

Closed fmilthaler closed 11 months ago

fmilthaler commented 11 months ago

Using type hints throughout FinQuant and introducing type checks in functions/methods that raise appropriate error messages if an argument is of an unexpected type. This commit also introduces custom data types, e.g. FLOAT as Union[np.floating, float] and more to simplify type hints. Moreover, type validation is now done with a new module/function type_validation that also simplifies type validations. Finally, the documentation for all modules in finquant has been updated. This closes #94 and also closes #118.

fmilthaler commented 11 months ago

@PietropaoloFrisoni This is finally ready to be merged.

Important Note

Please, do not review this thoroughly. I only assigned this PR to you, so that you can have a quick look at some of the changes I point out to you. Please ignore everything else, it is just too much to review. :)

I also left you a message on slack.

PietropaoloFrisoni commented 11 months ago

Congrats man! This is quite a careful and thorough work. it certainly brings FinQuant to the next level : )