Skip to content
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

qs.report.basic(): ValueError: Invalid frequency: ME #397

Open
Copperlz opened this issue Dec 28, 2024 · 3 comments
Open

qs.report.basic(): ValueError: Invalid frequency: ME #397

Copperlz opened this issue Dec 28, 2024 · 3 comments

Comments

@Copperlz
Copy link

import quantstats as qs
# extend pandas functionality with metrics, etc.
qs.extend_pandas()

# fetch the daily returns for a stock
stock = qs.utils.download_returns('META')

# show sharpe ratio
qs.stats.sharpe(stock)

# or using extend_pandas() :)
stock.sharpe()
qs.plots.snapshot(stock, title='Facebook Performance', show=True)
qs.reports.basic(stock, "SPY")

whatever the version of quantstats 0.0.64, 0.0.62, 0.0.59, I can`t use qs.reports function
numpy 1.23.0
pandas 1.5.0
scipy 1.11.1

@YoubiDev
Copy link

v0.0.64 is not compatible with pandas 2.1 and lower, anymore. Make sure to install pandas to the 2.2 and numpy to 1.26.4 and it should work with the basic metrics.

@Copperlz
Copy link
Author

v0.0.64 is not compatible with pandas 2.1 and lower, anymore. Make sure to install pandas to the 2.2 and numpy to 1.26.4 and it should work with the basic metrics.

the version of quantstats is 0.0.64.
but when i upgrade numpy to 1.26 and pandas to 2.23, the new problem happened.
OptionError: "No such keys(s): 'mode.use_inf_as_null'"

@YoubiDev
Copy link

YoubiDev commented Dec 31, 2024

v0.0.64 is not compatible with pandas 2.1 and lower, anymore. Make sure to install pandas to the 2.2 and numpy to 1.26.4 and it should work with the basic metrics.

the version of quantstats is 0.0.64. but when i upgrade numpy to 1.26 and pandas to 2.23, the new problem happened. OptionError: "No such keys(s): 'mode.use_inf_as_null'"

Currently pandas 2.23 is a dev version and is not a stable version of pandas. I had the same error with the ValueError and installed pandas 2.2, which is the latest stable version. After that it should partially work.

Here you have the stable releases of pandas: https://pandas.pydata.org/docs/whatsnew/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants