quantopian / alphalens

Performance analysis of predictive (alpha) stock factors
http://quantopian.github.io/alphalens
Apache License 2.0
3.18k stars 1.12k forks source link

AttributeError: 'Int64Index' object has no attribute 'tz' #399

Closed EgoistaCercis closed 1 year ago

EgoistaCercis commented 1 year ago

Problem Description

Please provide a minimal, self-contained, and reproducible example:

[Paste code here]

Please provide the full traceback:

Traceback (most recent call last):
  File "D:/work/paper/test.py", line 95, in <module>
    predictive_factor, pricing, quantiles=5, bins=None, groupby=code_sec, groupby_labels=sec_names)
  File "D:\work\air_systeam\venv\lib\site-packages\alphalens\utils.py", line 832, in get_clean_factor_and_forward_returns
    cumulative_returns,
  File "D:\work\air_systeam\venv\lib\site-packages\alphalens\utils.py", line 263, in compute_forward_returns
    if factor_dateindex.tz != prices.index.tz:
AttributeError: 'Int64Index' object has no attribute 'tz'

Please provide any additional information below:

Versions

EgoistaCercis commented 1 year ago

Please help me,How to solve this problem?

chen0126 commented 6 months ago

@EgoistaCercis Have you solved this problem?