quantstats icon indicating copy to clipboard operation
quantstats copied to clipboard

Input - Manual Data frame or Data feed from Investpy

Open nuwandwo opened this issue 4 years ago • 2 comments

Dear Experts,

Is it possible to put the data by manual excel or via investpy (investing.com feed) ?

I need to do analysis for stocks of Non - US

Thanks.

nuwandwo avatar Oct 09 '21 18:10 nuwandwo

I have the same need. I would like to import my historical log return using the common function: df = pd.read_csv ('port_returns.csv' , index_col=0)
I have this error: TypeError: unsupported operand type(s) for +: 'Timedelta' and 'str' even if the serie generated by stock = qs.utils.download_returns('FB') seems similar to the serie imported. thx

G

gordongit2020 avatar Dec 04 '21 09:12 gordongit2020

convert the date column to M8[ns] , then everything works as expected :) ev["date"]=ev["date"].astype("M8[ns]")

samithaj avatar Jan 08 '22 09:01 samithaj