Alphas: a formula, a universe and a test of whether it worked

On this page
  1. What an alpha looks like
  2. Two of the 101, from closes only
  3. Time-series versus cross-sectional
  4. The test: correlation with what came next
  5. Why 101 of them, and not one
  6. Traps
  7. The code
  8. Summary
  9. References

The indicators post ended with a warning: an indicatorA calculation on a security's prices or volume whose result is used to anticipate future price changes.Technical Analysis from A to Z · Part One, Indicators is a number, not a trading rule, until a threshold and a position are added. Quantitative trading has a word for the step in between. An alphaThe part of a stock's return over and above the market's, left after the market's share is taken out; the intercept of the regression line.What Hedge Funds Really Do · Ch. 7, The ABCs of CAPM, p. 51 is a formula that takes today’s data and produces a forecast of future return, one number per stock per day, before anyone decides what to hold. In 2015 Zura Kakushadze published 101 of them, proprietary to WorldQuant and 80 of them in production at the time, as formulas that are also code, with the holding periods and correlationsCovariance rescaled into a measure that always lies between minus one and one.Probabilistic Machine Learning · §3.1.2, p. 78 that go with them. This post reads that paper, computes two of its simplest alphas on the blog’s five tickers (SPY, NVDA, GS, XOM, GLD, 2020 to 2025), and then does the thing the paper’s abstract keeps pointing at: tests whether they worked.

What an alpha looks like

The paper’s footnote 4 gives the trader’s definition: “a combination of mathematical expressions, computer source code, and configuration parameters that can be used, in combination with historical data, to make predictions about future movements of various financial instruments”. The word means expected return, roughly, not the academic alpha of the beta post, and the paper is explicit that the two are not the same.

Section 2 says what the 101 are made of. Almost all are price-volume: daily close-to-close returns, open, close, high, low, volume and the volume-weighted average price. A few use market cap or an industry classification. And “very coarsely”, the list is built from two opposite ideas. A mean-reversionThe hope that a stock which just rose gives back part of the gain, and one which just fell recoups part of the loss.101 Formulaic Alphas · Sec. 2, Formulaic Alphas, p. 4 alpha has the opposite sign to the return it is based on: the simplest example in the paper is minus the log of today’s open over yesterday’s close, the hope being that a stock that gapped up overnight gives some of it back. A momentumPrices that are trending are said to have momentum, and a trading strategy built on that trend is a momentum strategy.Quantitative Trading · Ch. 7, Mean-Reverting versus Momentum Strategies, p. 116 alpha has the same sign: the log of yesterday’s close over yesterday’s open, the hope being that a stock that ran up during the day keeps going. Complex alphas mix the two.

The paper also attaches a timing label to each formula. A delay-0 alpha is traded at the time of the latest data it uses (the open-over-close example is meant to be traded at today’s open). A delay-1 alpha is traded the day after its latest data; most of the 101 are delay-1. That label is not decoration. It says whether the forecast could actually have been acted on.

Section 3 reports what the 101 did in production between January 2010 and December 2013. Their average holding period runs from 0.6 to 6.4 days. Their average pairwise correlation is 15.9%\key{15.9\%} (medianThe middle value: sort the outcomes from lowest to highest and take the one that divides the list into two equal halves.Technical Analysis · Appendix A, Median, p. 596 14.3%): a hundred formulas, mostly saying different things. Their returns rise with their volatilityHow much an asset's price spikes and dips; most often measured as the standard deviation of its per-period returns.What Hedge Funds Really Do · Ch. 2, How Hedge Funds Are Evaluated, p. 18 and do not depend on how often they trade. And the introduction’s first paragraph names the two trendsThe direction prices are moving: up with rising peaks and troughs, down with falling ones, level in a trading range.Technical Analysis of the Financial Markets · Glossary, p. 520 the whole list sits inside: more people mining alphas produces “ever fainter and more ephemeral alphas”, while automation produces ever more of them, so that what is actually traded is a combination of hundreds of thousands, a “mega-alpha”, not any single formula.

An alpha is a forecast, and a forecast is a tendency. It is wrong on many individual days and is only judged over a sample, at its own horizon. The question is never “did it work yesterday” but “over a thousand days, did the ones it liked do better than the ones it did not”.

Two of the 101, from closes only

The blog’s data has closes and nothing else, which rules out most of the list. Two of the simplest survive. Alpha#9 in Appendix A reads, in the paper’s notation, (0 < ts_min(delta(close, 1), 5)) ? delta(close, 1) : ((ts_max(delta(close, 1), 5) < 0) ? delta(close, 1) : (-1 * delta(close, 1))), where delta(close, 1) is today’s close minus yesterday’s and ts_min(x, 5) is the smallest value of x over the past five days. In words:

s, the signald, today's close minus yesterday's

st={dtif the close rose on each of the last five daysdtif it fell on each of the last five days−dtotherwise\key{s_t} = \begin{cases} \good{d_t} & \text{if the close rose on each of the last five days} \\[4pt] \good{d_t} & \text{if it fell on each of the last five days} \\[4pt] -\good{d_t} & \text{otherwise} \end{cases}

Five rises in a row, or five falls: keep today’s move, a momentum bet. Anything mixed: flip today’s move, a mean-reversion bet. Alpha#10 is the same expression with a four-day window, wrapped in rank(...), the paper’s cross-sectionalComparing many assets with each other at the same moment, rather than following one asset through time. rank: each day, line up every stock in the universe by its signal and replace the value with its position in the line.

Table 1 is one day, 2024-01-10, for the inside of Alpha#10 and its rank.

Table 1. Inside Alpha#10 on 2024-01-10 for the five tickers
TickerCloseToday’s move4-day min4-day maxSignalRank
SPY461.46+2.59−0.70+6.47−2.590.2
NVDA54.19+1.21+0.88+3.15+1.210.8
GS360.20−1.68−4.83+3.29+1.681.0
XOM90.25−0.90−1.56+0.28+0.900.6
GLD187.50−0.43−1.48+0.06+0.430.4

One ticker had four one-way days. NVDA rose on each of them (its 4-day min is +0.88), so it keeps today’s move, +1.21 (the alpha expects the run to go on). The other four are in the “otherwise” branch and get minus today’s move: GS fell $1.68, so its signal flips to +1.68 and the alpha likes it most (it expects a bounce); SPY rose $2.59, so the alpha likes it least (it expects a give-back). A day with a run is not the usual day. Over 2020 to 2025, the five-rises branch fires on 3.4 to 4.9% of days per ticker and the five-falls branch on 1 to 3.6%, so Alpha#9 is a one-day reversal bet on more than 91% of days, with a momentum exception for runs.

Time-series versus cross-sectional

The two alphas differ in what their number means, and that decides how each is tested.

Alpha#9 is a time-series signal. Its value is in dollars per share and compares a stock with its own history: +1.68 for GS says “bounce expected”, and it would say so whether or not any other stock existed. Every stock in the universe can get a positive signal on the same day, and holding all of them means being long the market.

Alpha#10 is a cross-sectional signal. The rank compares stocks with each other on one day, and the units are gone: GS’s +1.68 becomes 1.0 and NVDA’s +1.21 becomes 0.8, the same gap as between NVDA and XOM’s +0.90 even though the dollar gaps are $0.47 and $0.31. A rank keeps the order and throws away the spacing. Its scale does not depend on GS trading at $360 and NVDA at $54, as the raw signal’s does, and it is immune to one wild value. The forecast it makes is relative: “GS will do better than SPY”, not “GS will go up”. A stock can have a positive raw signal and still rank at the bottom.

A ranked alpha forecasts order, not size. The top of the list is expected to beat the bottom. Whether either goes up is a separate question the rank does not answer.

The test: correlation with what came next

The paper gives the formulas and the production statistics. It does not, and cannot, say whether Alpha#9 works on five tickers in 2020 to 2025. The standard test is the information coefficient, which Romero and Balch define as the correlation between a manager’s predictions and the actual future prices: 1 for a perfect forecaster, −1 for a perfectly wrong one.

IC, the information coefficient; s, the signalr, the return over the next h days

IC(h)=corr⁡(st,  rt→t+h)\key{\mathrm{IC}(h)} = \operatorname{corr}\big(\key{s_t},\; \good{r_{t \to t+h}}\big)

The correlation here is the rank kind: whether the days (or stocks) the signal liked more tended to return more, regardless of units. For Alpha#9 the pairing is each ticker against its own future, five correlations averaged. For Alpha#10 it is the five tickers against each other on each day, 1,466 daily correlations averaged. The return runs from today’s close to the close h days later, which treats both alphas as if they were traded at today’s close.

Table 2. Information coefficientThe correlation between a manager's price predictions and the actual future prices: 1 is a perfect predictor, minus 1 perfectly wrong.What Hedge Funds Really Do · Ch. 9, A Few Definitions, p. 65 by horizon, 2020 to 2025
Days aheadAlpha#9, each ticker against its own futureAlpha#10, ranked across the five
10.001−0.004
2−0.005−0.008
30.003−0.002
50.0090.000
100.014−0.004
200.010−0.011

Every number in Table 2 is within two hundredths of zero. At its own one-day horizon Alpha#9 reads 0.001, which is nothing; it only reaches 0.014 at ten days, and the ranked version is zero or below at every horizon. That is the shape of a signal too faint to tell from zero. The second question is whether even that held up, and Table 3 splits it by year.

Table 3. One-day information coefficient by year
YearAlpha#9, 1 dayAlpha#10, 1 day
20200.1050.018
2021−0.041−0.019
2022−0.022−0.024
2023−0.050−0.014
20240.012−0.004
20250.0320.024

The whole-sample 0.001\key{0.001} is −0.007\key{-0.007} over 2020 to 2023 and 0.021\key{0.021} over 2024 to 2025. One year, 2020, is the only tall bar in Figure 1, which is the year of the sharpest one-day moves in the sample and the year a “flip today’s move” bet pays best; 2021 to 2023 gave all of it back and more. The held-out 0.021 is two small positive years, 0.012 and 0.032, after three negative ones. A signal with these numbers was never tradeable on five tickers, and the paper would not have expected it to be: its own example of a universe is a dollar-neutral portfolio of the 2,000 most liquidLiquid markets have large trading volumes, many market makers and the smallest spreads; widening spreads are an early sign liquidity is freezing up.What Hedge Funds Really Do · Ch. 4, Market Spreads, p. 26 US stocks, where a tiny edge per name adds up across thousands of names and days. Five names do not give a tiny edge room to add up.

{"panels":[{"x0":65.96,"x1":565.2,"y0":29.16,"y1":223.44,"title":"1. Correlation with the return h days out: small at every horizon","xlabel":"Days ahead the return is measured over","ylabel":"Rank correlation with that return (IC)","xlog":false},{"x0":65.96,"x1":565.2,"y0":312.12,"y1":506.4,"title":"2. Did it hold? The 1-day IC, one year at a time","xlabel":"Year","ylabel":"Rank correlation with next day's return (IC)","xlog":false}],"series":[{"panel":0,"label":"Alpha#9, each ticker against its own future","color":"var(--chart-maroon, #b6262c)","kind":"line","x":[1.0,2.0,3.0,5.0,10.0,20.0],"y":[0.00145936,-0.00539508,0.00283089,0.00949897,0.0139773,0.0102342],"sx":[88.65,112.54,136.43,184.2,303.64,542.51],"sy":[127.01,175.76,117.26,69.84,37.99,64.61]},{"panel":0,"label":"Alpha#10, ranked across the five each day","color":"var(--chart-blue, #3b6ea5)","kind":"line","x":[1.0,2.0,3.0,5.0,10.0,20.0],"y":[-0.00392757,-0.00796031,-0.00164046,0.000273785,-0.00398352,-0.0108575],"sx":[88.65,112.54,136.43,184.2,303.64,542.51],"sy":[165.32,194.0,149.06,135.44,165.72,214.61]}]} 2026-10-31T01:54:17.882424 image/svg+xml Matplotlib v3.11.2, https://matplotlib.org/ 1 2 3 5 10 20 Days ahead the return is measured over −0.010 −0.005 0.000 0.005 0.010 0.015 Rank correlation with that return (IC) 1. Correlation with the return h days out: small at every horizon Alpha#9, each ticker against its own future Alpha#10, ranked across the five each day 2020 2021 2022 2023 2024 2025 Year −0.04 −0.02 0.00 0.02 0.04 0.06 0.08 0.10 Rank correlation with next day's return (IC) 2. Did it hold? The 1-day IC, one year at a time Alpha#9, 1-day horizon Alpha#10, 1-day horizon
Figure 1. Information coefficient by horizon, and the one-day coefficient by year

Test at the signal’s own horizon, then test again on time it has not seen. An alpha that reads −0.007 on the years it was built on and 0.021 on the two after is not a working alpha; both numbers are noise.

Why 101 of them, and not one

The two alphas here share their inputs, and it shows. The rank correlation between Alpha#9’s signal and the inside of Alpha#10 (the same rule with a four-day window) is 0.875\key{0.875}, and between Alpha#9 and plain “minus today’s move” it is 0.891\key{0.891}. Three formulas, one idea. Combining them adds almost nothing, because when one is wrong the others are wrong on the same day.

That is the point of the paper’s 15.9%. A hundred alphas with an average pairwise correlation of 0.16 are, roughly, a hundred different bets, and a combination of different bets is where the “mega-alpha” gets its edge and its smoother returns: when some go bust in a period, the others do not go with them. The introduction adds the practical bonus, that trading a combination lets opposite orders cancel inside the book before they reach the market, saving on costs. A hundred variants of one-day reversal would give none of this. The question to ask of a new alpha is not “is it good” but “what does it add to the ones I have”, and a correlation of 0.88 answers it.

Traps

Table 4 has the beliefs this post set out to correct.

Table 4. Six beliefs about alphas and what is actually true
People thinkActually
A ranked score says how much a stock will returnit says which stocks are expected to beat which; order only
A positive forecast means buyin a ranked signal a positive value can still sit at the bottom of the list
An alpha that is positive over the whole sample workssplit the years; −0.007 then 0.021 is a signal that was never there
A tiny IC is uselesson 2,000 names, a tiny edge per name per day is the business; on five names it is noise
Two formulas are two signalsif they share inputs they share mistakes; 0.88 correlation is one signal
Delay-0 and delay-1 are detailsthey say whether the forecast could have been traded at all

The code

The snippet reproduces Alpha#9 and its 1-day information coefficient, for 2020 to 2025 and for the two halves; Table 5 names its variables.

Table 5. Variables in the Alpha#9 snippet
VariableHolds
d1today’s close minus yesterday’s, per ticker (delta(close, 1) in the paper)
alpha9today’s move if the last five days all rose or all fell, minus it otherwise
fwd1the return from today’s close to tomorrow’s
ic(years)the rank correlation of the signal with that return, per ticker, averaged
import pandas as pd

url = "https://raw.githubusercontent.com/ankurtrapasiya/examples/main/data/prices.csv"
px = pd.read_csv(url, index_col="date", parse_dates=True)
d1 = px.diff()                                   # delta(close, 1): today's close minus yesterday's
lo, hi = d1.rolling(5).min(), d1.rolling(5).max()
alpha9 = d1.where(lo > 0, d1.where(hi < 0, -d1)) # five rises or five falls: keep the move; else flip it
fwd1 = px.shift(-1) / px - 1                     # the return from today's close to tomorrow's

def ic(years):
    out = []
    for t in px.columns:                         # each ticker against its own future, then average
        both = pd.concat([alpha9[t], fwd1[t]], axis=1).dropna()
        both = both[both.index.year.isin(years)]
        out.append(both.corr(method="spearman").iloc[0, 1])
    return sum(out) / len(out)

print("IC 2020-2025", round(ic(range(2020, 2026)), 3))
print("IC 2020-2023", round(ic([2020, 2021, 2022, 2023]), 3))
print("IC 2024-2025", round(ic([2024, 2025]), 3))

It prints 0.001, −0.007 and 0.021. d1.where(lo > 0, other) keeps d1 where the condition holds and takes other elsewhere; nested twice, it is the paper’s ? : written in pandas.

The script behind the real numbers

The tables and the chart come from examples/alphas-formula-universe-test/alphas.py, which runs on the blog’s five tickers. To run it yourself, clone the examples repo: its README has a three-command Docker setup, or run uv run alphas-formula-universe-test/alphas.py.

Summary

Table 6 collects the ideas, with the five-ticker number behind each.

Table 6. Seven ideas about alphas, with the five-ticker numbers
IdeaIn one lineOn the five tickers
Alphaa formula from today’s data to a forecast of return, one number per stock per dayAlpha#9: flip today’s move unless it is a five-day run
Mean reversion versus momentumopposite sign to the past move, or the same signthe reversal branch fires on over 91% of days
Time-series versus cross-sectionala stock against its own history, or against its peers todaydollars for Alpha#9, a rank of 0.2 to 1.0 for Alpha#10
Rankkeeps order, drops spacing and unitsGS +1.68 and NVDA +1.21 become 1.0 and 0.8
Information coefficientcorrelation of the forecast with what came next0.001 at one day
Test on unseen timethe number that matters is the one after the fit−0.007 then 0.021
Redundancysignals that share inputs share mistakes0.88 between the two alphas; 0.16 across the paper’s 101

References

  • Zura Kakushadze, 101 Formulaic Alphas (Quantigic Solutions and Free University of Tbilisi, December 2015). Footnote 4 for the definition of an alpha; section 1 for “ever fainter and more ephemeral alphas” and the mega-alpha; section 2 for the price-volume inputs, the mean-reversion and momentum examples (equations 2 and 3) and the delay-0 / delay-1 labels; section 3 and the abstract for the 2010 to 2013 holding periods (0.6 to 6.4 days), the average pairwise correlation of 15.9% and the return-volatility link; section 4 for the 80 alphas in production and the example universe of the 2,000 most liquid US stocks; Appendix A for Alpha#9, Alpha#10 and the definitions of rank, delta, ts_min and ts_max.
  • Philip J. Romero and Tucker Balch, What Hedge Funds Really Do (Business Expert Press, 2014). Chapter 9, “A Few Definitions”, for the information coefficient as the correlation between predictions and actual future prices.
Tagged finance, trading, statistics, backtesting← Home