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

单只股票的alpha191没办法求 #13

Open
zzb980881 opened this issue Dec 26, 2023 · 1 comment
Open

单只股票的alpha191没办法求 #13

zzb980881 opened this issue Dec 26, 2023 · 1 comment

Comments

@zzb980881
Copy link

image
image

报一下错误
File "D:\06_projects\python\stock_trade\alphas191.py", line 62, in <module> alpha_001 = l.alpha_001(OPEN=OPEN, CLOSE=CLOSE, VOLUME=VOLUME) File "D:\ProgramData\Anaconda3\envs\py38\lib\site-packages\ta_cn\alphas\alpha191.py", line 14, in alpha_001 return (-1 * CORR(RANK(DELTA(LOG(VOLUME), 1)), RANK(((CLOSE - OPEN) / OPEN)), 6)) File "D:\ProgramData\Anaconda3\envs\py38\lib\site-packages\ta_cn\utils_long.py", line 112, in decorated return pd.Series(s3, index=s1.index) File "D:\ProgramData\Anaconda3\envs\py38\lib\site-packages\pandas\core\series.py", line 386, in __init__ if is_empty_data(data) and dtype is None: File "D:\ProgramData\Anaconda3\envs\py38\lib\site-packages\pandas\core\construction.py", line 877, in is_empty_data is_simple_empty = is_list_like_without_dtype and not data File "D:\ProgramData\Anaconda3\envs\py38\lib\site-packages\pandas\core\generic.py", line 1527, in __nonzero__ raise ValueError( ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
image

而且,dataframe的索引还必须设置asset,不然报错,这是什么原因?难道不能单独求值?

@wukan1986
Copy link
Owner

由于已经有了新的想法,所以,这个项目基本已经不维护了,请使用polars_ta这个项目

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