quantstats
quantstats copied to clipboard
report changes to portfolio names, plot titles, and handle multiple strategies
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:
- Benchmark is always the first portfolio in the table if present (for easy comparison)
- Replace 'Benchmark' and 'Strategy' with the actual portfolio names if passed to kwargs - for both tables and plots
- Change histogram to plot Benchmark as well if passed - useful to look at distribution relative to the benchmark
- Added a parameter (defaults to False) to plot active returns for Daily Returns (linechart) and Monthly Returns (heatmap)
- Changed boxplot from seaborn to matplotlib - looks cleaner without the color fill (is this ok?)
Lots of changes needed to support multiple strategies (which was highly requested and I wanted it as well since I use this package frequently)
I've attached a sample report and a notebook to test all methods. quantstats_enhancements.zip