Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Issues with pyfolio

Hi,

I started using pyfolio recently, but I have been having some problems with the code.
It seems that pyfolio usually retrieves historical data from yahoo finance, but I would like to be able to run the library using data imported from an excel file, as following:

import pyfolio as pf
import pandas as pd
%matplotlib inline

s = pd.read_excel('C:/Users/User/Desktop/Documentos/Dados históricos.xlsx')
data = s['Returns']
print(s)
pf.create_returns_tear_sheet(data)

In my understandings, retrieving data from excel is possible, but I keep getting the following error:

AttributeError: 'int' object has no attribute 'strftime'

Can someone help me fix the code?
Thank you very much.

Best regards.