quantopian / pyfolio

Portfolio and risk analytics in Python
https://quantopian.github.io/pyfolio
Apache License 2.0
5.62k stars 1.76k forks source link

TypeError: Already tz-aware, use tz_convert to convert. #632

Open tillfurger opened 4 years ago

tillfurger commented 4 years ago

Hello

I'm trying to run pf.tears.create_returns_tear_sheet(returns, benmark_rets = bm_returns) where returns and bm_returns are pd.Series (daily returns) with a DatetimeIndex. As I am running the code above, it returns TypeError: Already tz-aware, use tz_convert to convert.

It produces all the graphs up to the Rolling Fama-French Single Factor Betas, but is not able to corretly label the x-axis (with the dates). What am I doing wrong? What is the correct format for the pd.Series?

lfsequeira commented 4 years ago

I am facing the same issue, and I also would like to know the answer...

tillfurger commented 4 years ago

I found out it's a version issue. Use python 3.5 and everything works like a charm.

twiecki commented 4 years ago

Which version did you use before?

tillfurger commented 4 years ago

Python 3.7