quantstats
quantstats copied to clipboard
Portfolio analytics for quants, written in Python
This PR fixes an unexpected result when a ticker is compared with a benchmark. If the ticker and the benchmark are identical, the metrics in the report should be identical...
In stats.py,about as -------------------------------------------- def compsum(returns): """Calculates rolling compounded returns""" return returns.add(1).cumprod() - 1 --------------------------------------------- def comp(returns): """Calculates total compounded returns""" return returns.add(1).prod() - 1 first,The function name is compsum,...
to_prices function return a Series of prices based on a Series of returns, but the returned Series miss the first price equal of the base parameter. Sent pull request #210
to_prices is missing the first price equal to base. Added it at the beginning of the Series with the index value inferred from the frequenqy of the original index o...
Is this the proper way to do it? df['pct_change'] = df['amount'].pct_change() ts = pd.Series(df['pct_change'].values, index=df['date']) # qs.reports.full(ts, "SPY",periods_per_year=52) The results are completely off: ts date 2018-05-05 NaN 2018-05-12 NaN 2018-05-19...
Thank you for this amazing open source library! I have made some improvements to the functionality to make it more intuitive. Can a maintainer review and merge them? Changes: -...
When runs an Html report, the data from the EOY Returns graph doesn't match with the Key Performance Metrics when benchmark is None Year | Return | Cumulative ----- |...
Is there a way to export the tables to a gsheet/csv/excel?
This is a rather large change in terms of the amount of code affected owing to it proving rather difficult to add this feature into things in a reasonable manner....
Support for multi-dimensional indexing (e.g. `obj[:, None]`) is deprecated and will be removed in a future version. Convert to a numpy array before indexing instead.