Already fixed - 'numpy.int64' object has no attribute 'to_pydatetime'

This post is not a question. It is just for someone who confronted the same problem.



Hello Everyone,



If you are getting the following error-

'numpy.int64' object has no attribute 'to_pydatetime'



when using pyfolio.create_full_tear_sheet( returns )



Please change line 893 in timeseries.py to

valley = underwater.index[np.argmin(underwater)] # end of the period



In windows, you can find the file timeseries.py under C:\Users\your-pc-name\anaconda3\Lib\site-packages\pyfolio.



Source - 'numpy.int64' object has no attribute 'to_pydatetime' · Issue #652 · quantopian/pyfolio · GitHub



Kind regards,

Vishu

Thank you, Vishu. That's really helpful.