Ranking vs Regression Objectives for Alpha
A model trained to predict exact returns and a model trained to rank stocks best-to-worst can end up making very different trading decisions, even on the same data — because a cross-sectional book only ever needs the order right, not the magnitude.
Prerequisites: Ordinary Least Squares (OLS), Information Coefficient
A wine critic scoring bottles on a 100-point scale is doing something different from a sommelier just arranging the same bottles worst-to-best on a shelf for tonight's tasting menu. The critic's exact number matters — a 94 versus a 91 is meaningful information. The sommelier only needs the order right; whether the top bottle would have scored 94 or 99 changes nothing about which one gets poured first. Building an alpha model has the same fork: regression trains a model to predict the exact number (next period's return), while ranking trains it only to get the order of stocks right — and for a long-short cross-sectional book, the order is usually all that actually matters for constructing the portfolio.
Two different things to minimize
A standard regression objective, ordinary least squares, minimizes squared prediction error:
In words: for every stock, square the gap between the predicted return and the actual return, and add those squares up — a model trained this way is punished hardest for badly missing large moves, whether or not those large moves change any stock's rank in the cross-section.
A ranking objective instead looks at pairs of stocks and only cares whether their predicted order matches their actual order:
In words: for every pair where stock truly outperformed stock , penalize the model if it didn't also predict ahead of by at least some margin — get the order right by a comfortable margin and there's no penalty at all, regardless of whether the predicted magnitudes are anywhere close to the real ones.
Worked example 1. Suppose three stocks truly return , , . A regression model, penalized for absolute error, might predict — badly underestimating the winner's magnitude (a squared error contribution of ) but getting the order exactly right: predicted ranks match true ranks, . A ranking-trained model on the same data might predict (arbitrary units, not returns) — numbers that would be useless as return forecasts but that produce the identical, correct rank order. For a long-short book that goes long the top-ranked names and short the bottom-ranked names in equal size, both models generate the exact same trades, even though only one of them would pass a "does this predict the actual return magnitude" sanity check.
This shows a fitted regression line with visible residuals — exactly the kind of output a regression-trained alpha model produces. Notice that a residual can be large (a bad magnitude prediction) even while every point still sits on the correct side of its neighbors in rank order; that's the gap between "low squared error" and "good ranking," and it's the whole reason the two objectives can diverge.
When they actually disagree
Worked example 2. Suppose a regression model is trained on a dataset where 5% of stocks are extreme outliers — say, merger-arbitrage targets with near-certain, huge returns. Minimizing squared error, the model devotes a large share of its capacity to fitting these few extreme points well, since they contribute enormous squared-error terms if missed, at the cost of getting the middle 90% of ordinary stocks' relative order less accurate. If the trading book excludes merger targets anyway (a separate desk handles those), the regression model has effectively spent its budget optimizing for trades that never happen, while a ranking model — which only cares about pairwise order and treats a correctly-ranked extreme pair as no more valuable than a correctly-ranked ordinary pair, past the margin — would have spread its attention more evenly across the stocks actually being traded, typically producing a higher realized rank correlation (IC) on the ordinary universe.
For a cross-sectional long-short book, what matters is whether stock A is correctly placed above stock B, not whether the predicted returns are close to the true magnitudes. A ranking objective directly optimizes for that; a regression objective optimizes for something else that is often, but not always, correlated with it.
What this means in practice
Regression still has real advantages: it's needed whenever magnitude matters directly, such as position sizing proportional to predicted return, or risk models that need calibrated numbers rather than just an ordering. Many production systems run a hybrid — a regression model for calibrated sizing, evaluated and monitored using a rank-based metric like Spearman IC because that's what actually predicts whether the portfolio construction step will produce good trades.
The classic confusion: evaluating a regression-trained model using or mean squared error and concluding it's "better" than a ranking-trained alternative, without checking rank correlation (IC) on the actual trading universe. A model can have poor and excellent IC, or the reverse — the evaluation metric has to match what the objective was actually trained to do, or the comparison is meaningless.
Related concepts
Practice in interviews
Further reading
- Grinold & Kahn, Active Portfolio Management (ch. 6)
- Burges et al. (2005), Learning to Rank Using Gradient Descent