ranaroussi / quantstats

Portfolio analytics for quants, written in Python
Apache License 2.0
4.73k stars 827 forks source link

Bug: metrics(Can only use .dt accessor with datetimelike values) #272

Open jrothschild33 opened 1 year ago

jrothschild33 commented 1 year ago

file reports.py in line 780:

if prepare_returns:
  df = _utils._prepare_returns(returns)

should be:

if prepare_returns:
  returns = _utils._prepare_returns(returns)

or there will be a bug: Can only use .dt accessor with datetimelike values