pmorissette / ffn

ffn - a financial function library for Python
pmorissette.github.io/ffn
MIT License
2.03k stars 300 forks source link

Added Calmar and Sortino ratios #11

Closed Anjum48 closed 7 years ago

Anjum48 commented 8 years ago

As per issue https://github.com/pmorissette/ffn/issues/10.

For the Calmar Ratio I used the method discussed here: http://investexcel.net/calmar-ratio/ For the Sortino Ratio I used this method: http://investexcel.net/calculate-the-sortino-ratio-with-excel/

I think I've implemented them correctly, but it might need a skilled eye to sense check it :)

pmorissette commented 8 years ago

Hey @Anjum48,

Sorry I didn't get back to you - totally lost track. Let me take a look and I will merge your commits in if all is well.

Thanks for your contribution!

Cheers, Phil

BlinkyBillToo commented 7 years ago

I just updated to the latest FFN release (0.1.12), but I did not see these ratios included.

Any chance they can be merged in anytime soon?

sven337 commented 7 years ago

I'm interested in the Sortino ratio too. Phil, is this going to be merged? Thanks!

Anjum48 commented 7 years ago

Sorry guys - totally forgot about this. I'll submit the PR again and see if it'll merge

pmorissette commented 7 years ago

Sorry all - let me get on this asap!

pmorissette commented 7 years ago

Ok I merged it in and just refactored your code a bit afterwards. Now we have calc_calmar_ratio and calc_sortino_ratio as well in core.py.

Thanks again for your contribution and sorry for taking so long to reply.

satoshi commented 5 years ago

Hi,

Calmar ratio actually isn't CAGR / MaxDD. What we have in ffn is called MAR: https://www.rcmalternatives.com/2013/08/mar-and-calmar-ratios-identical-twins-with-opposite-personalities

Unlike MAR, Calmar uses (typically) 36 month periods to evaluate performances. While both are useful risk-adjusted metrics, calling MAR Calmar is a misnomer in my opinion. Any chance Calmar is renamed as MAR ratio?