quantstats
quantstats copied to clipboard
[Suggestion] M2, Sterling, Treynor Ratio, Lower Partial Moment, Kappa, Day Trading Success Rate
https://breakingdownfinance.com/finance-topics/performance-measurement/m2-measure/
https://breakingdownfinance.com/finance-topics/performance-measurement/treynor-ratio/
https://breakingdownfinance.com/finance-topics/performance-measurement/jensens-alpha/
Stumbled upon those ratios and thought it might be interesting for quantstats.
Jensens Alpha is already included in the repo.
I'd be happy to implement M2 and Treynor, though. @ranaroussi
Good catch.
https://breakingdownfinance.com/finance-topics/performance-measurement/sterling-ratio/ https://breakingdownfinance.com/finance-topics/performance-measurement/day-trading-success-rate/ https://breakingdownfinance.com/finance-topics/performance-measurement/lower-partial-moment/ https://breakingdownfinance.com/finance-topics/performance-measurement/kappa-ratio/
Look valuable too. Might make quantstats the most complete portfolio analytics tool out there.
Some code examples:
Kappa: https://github.com/esvhd/pypbo/blob/a2ea72d398086390e81ffeb0dfbc55d04d90c1a2/pypbo/perf/metrics.py#L214 Lower Partial Moment: https://github.com/esvhd/pypbo/blob/a2ea72d398086390e81ffeb0dfbc55d04d90c1a2/pypbo/perf/metrics.py#L187 Sterling: https://github.com/JulienNic0las/pypm/blob/db5ad42d10db4dc18dc1cdf8be7152904b441f44/pypm/performance.py#L256 M2: https://github.com/marvin-hansen/StockUtils/blob/6ca246a5bf8fc8fa5b6b472a42318f722782d7ff/src/metrics/BaseMetrics.py#L125 Treynor: https://github.com/zhuzhuojie/kw_data_parser/blob/a96040ed82a65fd3523b3d3b8a983017888267df/testcode/Python-for-Finance-Second-Edition_code/Chapter09/c9_19_treynor_ratio.py
Didn't find examples for Day Trading Success Rate.
Should I give it a try with those code examples doing an PR?