-
-
Save quantra-go-algo/52b286e5d365c18745e70f0d3689572a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sortino Ratio function | |
def sortino(returns, daily_risk_free_rate, days=252): | |
volatility = returns.std() | |
sortino_ratio = (expected_returns - daily_risk_free_rate) / volatility * np.sqrt(days) | |
return sortino_ratio |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment