Quant Memo
Core

Elastic Net Regularization

A regression penalty that blends ridge regression's smooth shrinkage with lasso's ability to zero out variables entirely, combining the two so that groups of correlated predictors get handled sensibly instead of lasso arbitrarily picking one and dropping the rest.

Prerequisites: Ridge and LASSO Regularization, Multicollinearity

A regression with dozens of correlated candidate factors has two regularization options that each solve half the problem. Ridge regression shrinks all the coefficients smoothly toward zero, which handles correlated predictors gracefully by spreading credit among them, but it never zeroes anything out completely — every variable stays in the model, however weakly. Lasso can zero out coefficients entirely, giving a genuinely sparse, more interpretable model, but when predictors are highly correlated it tends to pick one of them almost arbitrarily and discard the rest, even if they're all roughly equally informative. Elastic net combines both penalties, aiming to get lasso's variable selection and ridge's graceful handling of correlated groups at the same time.

An analogy: splitting credit among teammates versus picking a captain

Imagine crediting a group project where several teammates contributed similarly overlapping work. Ridge regression is like a manager who insists on spreading credit evenly across everyone who plausibly contributed, even the ones who did almost the same thing as someone else — nobody gets zero credit, but nobody gets sole credit either. Lasso is like a manager who insists on naming one captain and giving everyone else zero credit, even when several teammates did equally valuable, overlapping work — the choice of who becomes "the captain" can be almost arbitrary among near-identical contributors. Elastic net is a manager who does a bit of both: it's willing to zero out genuinely unhelpful teammates, but when a group of teammates did similar work, it tends to spread credit across that whole group rather than crowning one and dropping the others.

The mechanics, one symbol at a time

Elastic net minimizes the usual regression error plus a penalty that blends the ridge (squared) and lasso (absolute value) penalties:

minβ  i(yixiβ)2+λ[αjβj+(1α)jβj2],\min_{\beta} \; \sum_i (y_i - x_i'\beta)^2 + \lambda \left[ \alpha \sum_j |\beta_j| + (1-\alpha) \sum_j \beta_j^2 \right],

where λ\lambda controls the overall strength of regularization (bigger λ\lambda means more shrinkage) and α[0,1]\alpha \in [0,1] controls the mix between the two penalty types. In plain English: α=1\alpha = 1 recovers pure lasso (only the absolute-value penalty, capable of zeroing coefficients out), α=0\alpha = 0 recovers pure ridge (only the squared penalty, which shrinks smoothly but never reaches exactly zero), and any value in between blends the two behaviors — some coefficients get zeroed out entirely, while correlated groups of surviving predictors get shrunk together rather than one being arbitrarily favored over the rest.

Worked example 1: three correlated momentum signals

Suppose three near-identical momentum signals (12-month, 11-month, and 10-month lookback returns, correlated around 0.9 with each other) are candidate predictors alongside genuinely distinct value and quality factors. Pure lasso, faced with this redundancy, might keep only the 11-month signal at a coefficient of roughly 0.30 and zero out the other two entirely — a fit that works, but the choice of which lookback survives is sensitive to small data quirks and could easily have gone the other way. Elastic net with α=0.5\alpha = 0.5, on the same data, tends instead to keep all three momentum signals with roughly similar coefficients around 0.10 each — summing to about the same total momentum exposure (0.30) as lasso's single-signal solution, but spread across the correlated group rather than concentrated arbitrarily on one.

Worked example 2: tuning the blend on out-of-sample error

A researcher runs elastic net across a grid of α\alpha values on 5 years of daily factor data, measuring out-of-sample R-squared via cross-validation. At α=1.0\alpha = 1.0 (pure lasso), out-of-sample R-squared is 4.2%, with high sensitivity to which correlated signal happens to get selected across different cross-validation folds — the surviving variable literally changes fold to fold. At α=0.0\alpha = 0.0 (pure ridge), R-squared is 4.5%, more stable, but the model uses all 40 candidate predictors with none set to zero, making it hard to interpret which factors actually matter. At α=0.3\alpha = 0.3 (elastic net, ridge-leaning blend), R-squared is 4.6% — matching or slightly beating pure ridge's predictive accuracy — while zeroing out about half the candidate predictors entirely, giving a model that's both about as accurate as ridge and considerably more interpretable than either extreme.

Gradient descent
parameter →
position -0.623loss -0.141gradient -0.930converging

Picture the elastic net penalty as reshaping the "valley" the optimizer descends into: pure ridge has smooth, rounded contours (no sharp corners, so coefficients rarely land exactly at zero); pure lasso has sharp corners along the axes (where coefficients often do land at exactly zero); elastic net's contours sit between the two, rounded but with softened corners.

ridge: smooth circle lasso: sharp diamond elastic net: softened diamond
Lasso's sharp corners are why solutions often land exactly on an axis (a coefficient of zero); ridge's smooth circle never touches an axis. Elastic net's rounded-but-cornered shape allows some coefficients to hit zero while still smoothing among correlated groups.

What this means in practice

Elastic net is the practical default whenever a candidate predictor set is both large and full of correlated groups — overlapping technical signals, similar-maturity yield curve points, or clusters of related fundamental ratios — situations where pure lasso's tendency to arbitrarily pick one representative from each correlated cluster makes the model's variable selection unstable and hard to trust from one re-fit to the next. The mixing parameter α\alpha and the overall strength λ\lambda are both typically chosen by cross-validation (see Cross-Validation for Time Series) rather than fixed by hand.

Elastic net combines lasso's absolute-value penalty (which can zero out coefficients entirely) with ridge's squared penalty (which shrinks smoothly and handles correlated predictors gracefully), controlled by a mixing parameter α\alpha. This avoids lasso's tendency to arbitrarily pick one variable from a correlated group while discarding the rest.

The classic mistake is defaulting to pure lasso (α=1\alpha=1) out of habit whenever variable selection is wanted, without checking whether the candidate predictors are correlated. With genuinely independent predictors, pure lasso works fine; with correlated groups — common in finance, where similar signals proliferate — pure lasso's selection becomes unstable and sensitive to noise, arbitrarily favoring one member of a correlated cluster in a way that can flip between re-fits on slightly different data. Elastic net's blend is the more robust default whenever predictor correlation is a real possibility.

Related concepts

Practice in interviews

Further reading

  • Zou & Hastie, 'Regularization and variable selection via the elastic net', JRSS-B 2005
  • Hastie, Tibshirani & Friedman, The Elements of Statistical Learning, ch. 3
ShareTwitterLinkedIn