quantstats icon indicating copy to clipboard operation
quantstats copied to clipboard

[Suggestion] M2, Sterling, Treynor Ratio, Lower Partial Moment, Kappa, Day Trading Success Rate

Open cryptocoinserver opened this issue 3 years ago • 4 comments

Jensens Alpha is already included in the repo.

I'd be happy to implement M2 and Treynor, though. @ranaroussi

sbraun-newfound avatar Nov 18 '21 16:11 sbraun-newfound

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.

cryptocoinserver avatar Nov 19 '21 13:11 cryptocoinserver

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.

cryptocoinserver avatar Nov 19 '21 13:11 cryptocoinserver

Should I give it a try with those code examples doing an PR?

cryptocoinserver avatar Jan 07 '22 10:01 cryptocoinserver