def information_ratio(algo_volatility, algorithm_return, benchmark_return):
    if zp_math.tolerant_equals(algo_volatility, 0):
        return np.nan

    # The square of the annualization factor is in the volatility,
    # because the volatility is also annualized,
    # i.e. the sqrt(annual factor) is in the volatility's numerator.
    # So to have the the correct annualization factor for the
    # Sharpe value's numerator, which should be the sqrt(annual factor).
    # The square of the sqrt of the annual factor, i.e. the annual factor
    # itself, is needed in the numerator to factor out the division by
    # its square root.
    return (algorithm_return - benchmark_return) / algo_volatility
Allow the user of this token to access their event stream.
dataset/ETHPy150Open quantopian/zipline/zipline/finance/risk/cumulative.py/information_ratio--crossover with--dataset/ETHPy150Open balanced/status.balancedpayments.com/venv/lib/python2.7/site-packages/twilio/util.py/TwilioCapability.allow_event_stream