@staticmethod
def modigliani_ratio(stock, index, riskfree=0.025, annual=True, freq=252):
    """Modigliani ratio."""
    freq = freq if annual else len(stock)
    return_mean = stock.pct_change().mean()
    driskfree = riskfree / 252
    stkrtn = stock.pct_change() - driskfree
    idxrtn = index.pct_change() - driskfree
    return ((return_mean - driskfree) * (stkrtn.std() / idxrtn.std()) +
        driskfree) * freq
