ranaroussi / quantstats

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

Update quantstats.reports.metrics to include key dates of maximum drawdown. #322

Open git-shogg opened 10 months ago

git-shogg commented 10 months ago

Hi @ranaroussi ,

I have submitted this PR to enable users to see the maximum drawdown dates (maximum drawdown date itself, start and end) as part of the quantstats.reports.metrics. The dates themselves were already part of the library just not visible in the metrics report (hence relatively minor change). I noticed you have previously reformatted using black so have done so on the file modified as part of this PR (reports.py). Having these readily available in the metrics export will add a bunch of value for end users particularly when comparing multi-asset portfolios to a benchmark. This PR closes #318.

New output looks as follows with new metrics highlighted. image

Kind regards, git-shogg

grzesir commented 8 months ago

Since this library no longer seems to be maintained, we have created a duplicate of it that we plan to maintain and improve over time. If you'd like to use our version check it out here: https://github.com/Lumiwealth/quantstats_lumi

Please feel free to fork and send your pull request to this new library, we will be actively monitoring the library and approving PRs