-
-
Save quantra-go-algo/d4dff8c84716c05c2b2ff1d290211bd4 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
# Modigliani Ratio | |
import numpy as np | |
def modigliani_ratio(returns, benchmark_returns, rf, days=252): | |
volatility = returns.std() | |
sharpe_ratio = (returns.mean() - rf) / volatility * np.sqrt(days) | |
benchmark_volatility = benchmark_returns.std() * np.sqrt(days) | |
m2_ratio = (sharpe_ratio * benchmark_volatility) + rf | |
return m2_ratio |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment