quantstats icon indicating copy to clipboard operation
quantstats copied to clipboard

Doubt regarding the kind of returns for input

Open vikaschouhan opened this issue 5 years ago • 1 comments

First of all, I would like to thank for this really awesome tool. I have been trying to use it for some time and from the examples I see that almost all the functions need returns as input to generate the stats and tearsheet etc. My doubt is that what kind of returns does this library assume. Is it simple returns calculated using pct_change() in pandas or log returns calculated using np.log(close_price).diff().

vikaschouhan avatar Feb 14 '20 05:02 vikaschouhan

Yes, by default it is like the pct_change() from pandas, but we can also tweak it to find log-returns using the qs.utils

AkiMosi avatar Apr 15 '21 03:04 AkiMosi