quantstats icon indicating copy to clipboard operation
quantstats copied to clipboard

report changes to portfolio names, plot titles, and handle multiple strategies

Open s0ap opened this issue 3 years ago • 1 comments

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?)

s0ap avatar Jun 19 '22 16:06 s0ap

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

s0ap avatar Jul 01 '22 02:07 s0ap