qs.stats.information_ratio() uses arithmetic mean instead of geometric
The information_ratio function computes excess return using arithmetic mean:
active_return = returns.mean() - benchmark.mean()
For longer backtests this overstates the ratio compared to using geometric (compounded) returns. The geometric version would be:
active_return = (1 + returns).prod() ** (1/len(returns)) - (1 + benchmark).prod() ** (1/len(benchmark))
This matters for crypto strategies where daily returns can be large enough that the arithmetic/geometric gap is meaningful over multi-year backtests.
Would a compounded flag similar to the one added for calmar() and rar() in #512 be welcome here?
The compounded flag would be welcome, and it has the precedent you mention in calmar and rar since #512. But there is a larger gap in the same function that is worth fixing in the same change: information_ratio never annualises anything. It returns the mean of the daily active returns divided by their standard deviation, so it reports a per-period number, while sharpe in the same module multiplies by the square root of periods by default, and every published information ratio is an annual figure. With a daily active mean of 0.0002 and a daily tracking error of 0.005 the function returns 0.04 where the conventional annualised figure is 0.63, so a user reading a report sees a Sharpe on one scale and an information ratio on another.
The arithmetic-versus-geometric gap you describe is real, and for crypto daily returns it is not small, since the geometric mean sits below the arithmetic one by about half the variance of the returns per period. But it is second order next to the missing factor of about 15.9 at daily frequency.
I would suggest
information_ratio(returns, benchmark, periods=252, annualize=True, compounded=True, prepare_returns=True)
where the active return is the annualised compounded growth of the strategy minus that of the benchmark when compounded is true, and the annualised arithmetic difference otherwise, and the tracking error is the standard deviation of the active returns times the square root of periods when annualize is true. The defaults then match cagr, rar and calmar. I can open a pull request with tests against hand-computed values if that shape is acceptable.
One more thing to settle before adding the flag: what "geometric" means for an active return. The difference of the two geometric means in the proposal isn't the geometric mean of the active return, and pairing it with a tracking error computed from arithmetic daily differences mixes two conventions in one ratio. A consistent version is to work in log returns throughout: a_t = log(1 + r_t) - log(1 + b_t), IR = mean(a) / std(a) * sqrt(periods). Log returns add across periods, so for independent returns the mean and the variance scale exactly with the horizon, which makes the annualisation Astralchemist describes exact rather than approximate. With daily crypto returns the log and simple versions can differ visibly, so a test with a high-volatility series would show which one the flag computes.
The mix is deliberate. With compounded=True the numerator is the strategy CAGR minus the benchmark CAGR, the two figures the report already prints, so the information ratio can be checked against the rest of the tear sheet; the tracking error stays the standard deviation of the per-period active returns, as in sharpe. The log version is cleaner as a statistic, and exact under i.i.d. returns as you say, but its numerator isn't a figure the report shows anywhere.
#562 already pins what the flag computes on a high-volatility series: test_prepared_large_returns_are_not_detected_as_prices uses returns of 120%, 20% and 40% and checks (3.696 - 1.716) / sqrt(0.27 * 3) = 2.2. A log variant could be added later as an option without changing that default.