pmorissette / ffn

ffn - a financial function library for Python
pmorissette.github.io/ffn
MIT License
1.87k stars 282 forks source link

Add risk free rate #223

Closed nathanramoscfa closed 4 months ago

nathanramoscfa commented 5 months ago

This pull request introduces enhancements to the calc_perf_stats function within the ffn/core.py module. Specifically, it modifies the function signature to accept two additional arguments: risk_free_rate, with a default value of 0.0, and annualization_factor, with a default value of 252, representing the number of trading days in a year. These changes allow for more detailed performance statistics calculations by incorporating the annual risk-free rate and adjusting the calculations based on the specified annualization factor. The pull request includes 4 additions and 2 deletions, aiming to improve the flexibility and accuracy of performance statistics calculations for financial analysis.

codecov-commenter commented 4 months ago

Codecov Report

Attention: Patch coverage is 50.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 57.32%. Comparing base (3ef2b1b) to head (ddc3d17). Report is 2 commits behind head on master.

Files Patch % Lines
ffn/core.py 50.00% 1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #223 +/- ## ======================================= Coverage 57.32% 57.32% ======================================= Files 4 4 Lines 1174 1174 Branches 254 254 ======================================= Hits 673 673 Misses 435 435 Partials 66 66 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.