Skip to content

Instantly share code, notes, and snippets.

@wapebira
wapebira / DrawdownAdjustedReturns.py
Created January 5, 2021 00:47 — forked from StuartGordonReid/DrawdownAdjustedReturns.py
Risk adjusted returns based on Drawdown risk
"""
Note that this Gist uses functions made available in another Gist -
https://gist.github.com/StuartGordonReid/67a1ec4fbc8a84c0e856
"""
def calmar_ratio(er, returns, rf):
return (er - rf) / max_dd(returns)
@wapebira
wapebira / PartialMomentsAdjustedReturns.py
Created January 5, 2021 00:47 — forked from StuartGordonReid/PartialMomentsAdjustedReturns.py
Risk adjusted returns based on Lower Partial Moments
"""
Note that this Gist uses functions made available in another Gist -
https://gist.github.com/StuartGordonReid/67a1ec4fbc8a84c0e856
"""
def omega_ratio(er, returns, rf, target=0):
return (er - rf) / lpm(returns, target, 1)