Information Coefficient (IC) and Signal Decay: Measuring Alpha Factor Predictiveness in Python

Does your factor actually predict forward returns, and for how long? The information coefficient (IC) gives a single-number answer to the first question, and how IC changes as the holding horizon lengthens addresses the second. This post works through both with a seeded, synthetic-data implementation you can run as written.
E-E-A-T note: This tutorial is based on the alphalens repository, the SciPy documentation, and a catalogue-level check of the Grinold & Kahn text; the numerical examples use synthetic data. No hands-on trading results, backtests, or live performance are claimed.
What Is the Information Coefficient?
IC is the correlation between a factor’s forecast at time t and the return realised over the forecast horizon. In cross-sectional equity work it is computed across assets on a single date, usually as Spearman rank correlation, the form used throughout this post.
Concretely, rank each asset’s factor value and its forward return on the same date, then correlate the two rank vectors. SciPy’s spearmanr does this, and its result varies between −1 and +1. Tied values receive midranks from rankdata under its default method='average'; for example, rankdata([0, 2, 3, 2]) returns [1, 2.5, 4, 2.5].
Worked example A (synthetic). Six assets have signal ranks 1 to 6 and forward-return ranks 1, 2, 3, 5, 4, 6. The rank differences are d = 0, 0, 0, −1, 1, 0, so Σd² = 2. Then:
IC = 1 − 6Σd² / [n(n² − 1)] = 1 − 12 / (6 × 35) = 1 − 0.05714 = 0.9429
A single cross-section is not a significance test. SciPy’s documentation says the spearmanr p-value is accurate only for large samples (more than 500 observations) and recommends a permutation test for small samples, so six assets call for a permutation test.
The Fundamental Law of Active Management (IR ≈ IC × √BR)
Grinold and Kahn’s Fundamental Law approximates the expected information ratio as IR ≈ IC × √BR, where BR is breadth, the number of independent bets per year. It is an approximation, not an identity, and it ties a single-date IC to portfolio-level risk-adjusted performance.
Grinold and Kahn’s Active Portfolio Management covers the Fundamental Law of Active Management. This post checked only the book’s catalogue listing, so read the book for the exact wording and derivation. Breadth counts independent bets, not raw forecasts: correlated forecasts add less breadth than their number suggests.
Synthetic substitution. With IC = 0.05 and BR = 400 independent bets a year, direct substitution gives IR ≈ 0.05 × √400 = 0.05 × 20 = 1.0. This is arithmetic on synthetic inputs, not a quoted example from the book or from any real strategy.
Because breadth enters under a square root, quadrupling breadth doubles IR, and doubling IC also doubles IR. Which of the two you can actually achieve is the practical question.
The IC Information Ratio (ICIR)
The IC information ratio (ICIR) is mean(IC) divided by std(IC) across evaluation periods, a single number summarising how consistently a factor predicts. Annualising by multiplying by √(periods per year) is a practitioner convention rather than a result from a primary source.
The t-statistic for mean IC is t = mean(IC) / (std(IC)/√n) = ICIR × √n. Check the IC summary fields in the alphalens repository docs for the version you install, since this post has not verified how alphalens labels that statistic.
Worked example B (synthetic). Six monthly ICs are 0.10, −0.05, 0.20, 0.05, 0.00, 0.10.
- Mean = 0.40 / 6 = 0.0667
- Sample standard deviation (n − 1 denominator) = √(0.03833 / 5) = 0.0876
- ICIR = 0.0667 / 0.0876 = 0.7614
- Annualised, using the practitioner convention above: 0.7614 × √12 = 2.638
- t = ICIR × √6 = 0.7614 × 2.449 = 1.865
Six observations are far too few to support a conclusion; the example shows arithmetic only. The t-value also assumes independent observations, which overlapping forward windows break (see Pitfalls). This post gives no ICIR cut-offs for judging a factor.
Signal Decay Across Horizons
IC can change with the forecast horizon. Measuring IC at several horizons and comparing the results gives a decay curve. The alphalens README does not document horizon behaviour, so confirm the horizon parameter in the docstrings of the version you install. The shape of the curve, not any single point on it, shows how fast a signal’s information goes stale.
Each horizon h compares the price at t with the price at t + h, as the code below does explicitly.
Example C (idealised arithmetic, not a measured profile). Suppose, purely for illustration, that IC falls from 0.08 at a one-day horizon to 0.06, 0.04 and 0.02 at 5, 10 and 21 days. Taking breadth as 252/h independent bets per year gives 252, 50.4, 25.2 and 12 bets. The Fundamental Law approximation then gives IR of 1.270, 0.426, 0.201 and 0.069.
These are idealised independent-bet numbers built on invented ICs. They suggest that breadth more than offsets decaying IC at short horizons, before costs. Shorter horizons also mean more trading, and turnover costs sit outside the basic approximation. The horizon decision therefore depends on net-of-cost IC measured on your own data.
The maintained fork is alphalens-reloaded, which its README says it maintains for bug, security and compatibility fixes.
Computing Per-Date Spearman IC in Python (Synthetic Data)
The snippet below builds a seeded synthetic factor matrix and price series with NumPy and pandas, computes one Spearman IC per date with SciPy, then prints the IC mean, standard deviation, ICIR, naive t-statistic and a small horizon table of mean IC. It needs only numpy, pandas and scipy.
import numpy as np
import pandas as pd
from scipy.stats import spearmanr
# All data is SYNTHETIC and seeded. No real market data, API keys, or paid sources.
rng = np.random.default_rng(42)
n_assets, n_dates = 50, 120
dates = pd.bdate_range("2020-01-01", periods=n_dates)
tickers = [f"A{i:02d}" for i in range(n_assets)]
# Factor values: one independent normal draw per asset per date.
factor = pd.DataFrame(rng.standard_normal((n_dates, n_assets)), index=dates, columns=tickers)
# Price-like series from cumulated normal increments (a random walk).
increments = 0.01 * rng.standard_normal((n_dates, n_assets))
prices = pd.DataFrame(100 * np.exp(np.cumsum(increments, axis=0)), index=dates, columns=tickers)
def ic_series(h):
# Forward return for date t uses the prices at t and t+h only (no look-ahead).
fwd = (prices.shift(-h) / prices - 1).iloc[:-h] # last h dates have no forward price
f = factor.iloc[:-h]
ic = [spearmanr(f.loc[d], fwd.loc[d]).statistic for d in f.index] # cross-sectional rank IC per date
return pd.Series(ic, index=f.index, name=f"ic_{h}d")
ic = ic_series(1)
print("Per-date IC (head):\n", ic.head())
mean, std = ic.mean(), ic.std()
icir = mean / std
t_stat = icir * np.sqrt(len(ic))
# CAVEAT: for h > 1 the forward windows overlap, so this naive t is inflated; use HAC errors.
print(f"mean={mean:.4f} std={std:.4f} ICIR={icir:.4f} t={t_stat:.3f}")
# SYNTHETIC ILLUSTRATION: mean IC by horizon on random data. NOT a measured decay profile.
decay = {h: ic_series(h).mean() for h in (1, 5, 10, 21)}
print("Mean IC by horizon (synthetic):\n", pd.Series(decay, name="mean_ic").round(4))
Reading the output:
- Forward returns.
prices.shift(-h) / prices - 1compares the factor at t with returns realised after t. The last h dates are dropped because they have no forward price. - Spearman call.
spearmanr(...).statisticextracts the correlation from the result object, which also carries a.pvalue. The snippet does not use the p-value, for the reasons given earlier. - Naive t-statistic. The printed t treats each date as independent. For h greater than 1, the forward windows overlap and the printed t is inflated.
- Horizon table. It repeats the calculation at 1, 5, 10 and 21 days. The data are random by construction, so expect mean IC values near zero. Exact values depend on the seed and library versions, and the snippet makes no performance claim.
The Library Route: alphalens
Alphalens is a factor-analysis library, originally from Quantopian, covering Returns Analysis, Information Coefficient Analysis, Turnover Analysis and Grouped Analysis. It replaces the hand-rolled loop above with ready-made tear sheets, though it adds a dependency and its own conventions to learn first.
Install it with pip install alphalens. Two entry points matter for this workflow. alphalens.utils.get_clean_factor_and_forward_returns(factor, prices, quantiles, groupby, groupby_labels) prepares the factor and forward-return data. alphalens.tears.create_full_tear_sheet(factor_data) takes that prepared data and produces the full tear sheet.
Two cautions. Check the alphalens docstrings for the IC method (rank or Pearson), since this post has not verified the parameter name. Per-period IC function names may also differ between releases, so check the documentation for the version you install.
Pitfalls
Four traps most often make reported ICs misleading: look-ahead bias in forward returns, overlapping forward-return windows that inflate t-statistics, survivorship bias in the universe, and p-values computed under assumptions that tied cross-sectional ranks may break. Each one is covered below with its remedy.
Look-ahead bias. A forward return must be built only from prices after the decision time, and the factor must be known at that time. Selecting rules or parameters on the same in-sample data that produces the reported IC inflates the result. Bailey, Borwein, López de Prado and Zhu’s work on the effects of backtest overfitting on out-of-sample performance documents how this distorts results (named citation only; the full reference is not linked here).
Overlapping forward-return windows. Sampling h-day forward returns daily makes consecutive observations share h − 1 days of return. The IC series then becomes serially correlated, which inflates the naive t-statistic, and the effective number of independent observations is smaller than the number of dates. The standard remedy is Newey–West (HAC) standard errors, following Newey and West (1987; named citation only). In Python, statsmodels’ cov_hac implements this with a Bartlett kernel by default, and its default number of lags is floor(4(T/100)^(2/9)).
Survivorship bias. A universe built only from securities listed today omits names that were delisted, which tends to overstate results. Elton, Gruber and Blake documented this effect for mutual fund performance (named citation only); the same logic applies to any universe built from survivors.
p-value validity with ties. SciPy’s spearmanr p-value comes from a t-distribution approximation, and its documentation says it is accurate only for large samples, with a permutation test recommended for small ones. Cross-sectional ranks can contain ties, and this post does not verify that the t-based p-value remains valid under them. For tied ranks, a permutation or bootstrap p-value is the safer choice. Tie handling itself uses the midrank rule described in the first section.
FAQ
Should I use Spearman or Pearson IC?
Spearman IC correlates ranks rather than raw values, so a few extreme returns carry less weight than they would in a Pearson calculation. Pearson IC measures linear association and can be dominated by a handful of extreme observations. Check the alphalens docstrings for the IC method switch, since this post has not verified the parameter name. The SciPy spearmanr docs describe the rank-based statistic used in the snippet above.
How many dates do I need before the IC t-stat is meaningful?
There is no universal number. Overlapping windows reduce the effective sample size, so a longer-horizon IC needs more dates than a naive count suggests, and 120 dates can still be too few. Use HAC standard errors as described in Pitfalls. When the sample is small, use a permutation test for the p-value, as the SciPy spearmanr documentation recommends for small samples.
My IC decays fast. Should I rebalance daily?
Not automatically. The Fundamental Law approximation says shorter horizons raise breadth, which can lift IR even as IC falls. Daily rebalancing also raises turnover and transaction costs, which the basic approximation ignores. The idealised arithmetic earlier is not a measured decay profile for any strategy, so decide using net-of-cost IC and IR measured on your own data at each candidate horizon.
← Back to all posts

