information_ratio¶
Defined in fynance.metrics
- information_ratio(X, B, period=252)[source]
Annualized mean active return over the tracking error.
- Parameters:
- Xnp.ndarray[float64, ndim=1]
Strategy price/level curve.
- Bnp.ndarray[float64, ndim=1]
Benchmark price/level curve, same length as
X.- periodint, optional
Number of periods per year, default is 252 (trading days).
- Returns:
- float
Annualized information ratio, or
0.0when the tracking error is zero.
See also
tracking_error,beta
Notes
With \(x\)/\(b\) the strategy’s/benchmark’s simple returns and \(TE\) the tracking error (
tracking_error):\[IR = \frac{period \times E[x - b]}{TE}\]Zero-tracking-error convention. Unlike
sharpe/calmar(which return+inf/-infon a zero denominator), a zero tracking error means the strategy is the benchmark bar-for-bar — there is no active bet to size a ratio on — soIRis defined as0.0regardless of the (necessarily zero) numerator, rather than propagating a signed infinity.Examples
A strategy identical to its benchmark has a zero information ratio (no active risk to be compensated for):
>>> import numpy as np >>> X = np.array([100., 102., 101., 105., 110.]) >>> information_ratio(X, X) 0.0