-
-
Notifications
You must be signed in to change notification settings - Fork 847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecated code in stats.py expected_return() #335
Comments
kartiksubbarao
added a commit
to kartiksubbarao/quantstats
that referenced
this issue
Feb 23, 2024
fix _np.prod deprecations, closes ranaroussi#335
This was referenced Feb 24, 2024
Open
Check out https://github.com/Lumiwealth/quantstats_lumi, which is being updated regularly. We are a fork of this library that is being maintained by Lumiwealth |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The expected_return() function in stats.py has deprecated code, which causes the following warning when generating a tearsheet with a benchmark:
Here is the deprecated code:
The corrected version is this:
In addition to explicitly specifying axis=0 to fix the FutureWarning, it also changes _np.product to _np.prod to fix another deprecation issue:
https://github.com/numpy/numpy/blob/maintenance/1.26.x/numpy/core/fromnumeric.py#L3837-L3839
I will submit a pull request.
The text was updated successfully, but these errors were encountered: