Skip to main content

Cookies on Macro by Mark.We use essential cookies for sign-in, locale, and security. With your permission, we also use optional cookies for preferences, for analytics, and for advertising measurement with the Meta (Facebook) Pixel. Read our cookie policy.

Macro by MarkMacro by Mark
  • Home
Loading…
Loading…
← Models
MacroConceptsPolicyModels

Elastic Net Model

Regularized regression that blends LASSO selection with ridge shrinkage for correlated predictor blocks.

OverviewGraphMathReferences

How do you select variables from a large set of correlated predictors without arbitrarily dropping members of correlated groups?

Background

LASSO (Tibshirani, 1996) performs variable selection by imposing an L1 penalty on regression coefficients, shrinking some exactly to zero. Ridge regression (Hoerl and Kennard, 1970) imposes an L2 penalty that shrinks all coefficients toward zero but never eliminates any. Each method has a blind spot. LASSO is unstable when predictors are correlated: it arbitrarily picks one from a correlated cluster and zeros the rest, and which one survives can flip with small data perturbations. Ridge cannot produce sparse models at all. Zou and Hastie (2005) proposed the elastic net, which adds both penalties simultaneously: α∥β∥1+1−α2∥β∥22\alpha \|\beta\|_1 + \frac{1 - \alpha}{2} \|\beta\|_2^2α∥β∥1​+21−α​∥β∥22​. The mixing parameter α∈[0,1]\alpha \in [0, 1]α∈[0,1] interpolates between pure ridge (α=0\alpha = 0α=0) and pure LASSO (α=1\alpha = 1α=1). The combination inherits LASSO's sparsity and ridge's stability under collinearity.

The core mechanism is the grouped selection property. When a block of predictors is pairwise correlated, the elastic net tends to assign them similar coefficient magnitudes and select or drop the entire block together. Pure LASSO cannot do this because the L1 ball's geometry has sharp corners that favor selecting a single representative from each correlated group. Adding the L2 penalty rounds those corners: the elastic net constraint set is a blend of the L1 diamond and the L2 sphere, producing a shape whose corners are smoothed enough to let correlated predictors share weight. Formally, Zou and Hastie proved that the difference in elastic net coefficients between two predictors jjj and kkk is bounded by a function of 1−ρjk1 - \rho_{jk}1−ρjk​ (their sample correlation), so highly correlated predictors receive nearly equal treatment.

Central bank research groups adopted elastic net quickly. The Bank of England uses it for inflation density forecasting with 100+ candidate predictors (Kapetanios, Marcellino, Papailias, 2021). The Federal Reserve Bank of New York applies elastic net in mixed-frequency nowcasting pipelines where financial and real-activity indicators are collinear. The IMF's World Economic Outlook team uses penalized regressions including elastic net for cross-country growth projections with many correlated institutional and macroeconomic controls. In finance, Gu, Kelly, and Xiu (2020) found elastic net competitive with deeper machine learning methods for predicting stock returns from hundreds of firm characteristics.

The estimator was extended by Friedman, Hastie, and Tibshirani (2010) with the glmnet coordinate descent implementation, which made the full two-dimensional cross-validation grid over (α,λ)(\alpha, \lambda)(α,λ) computationally tractable. The adaptive elastic net (Zou and Zhang, 2009) adds data-dependent coefficient weights to achieve oracle properties under weaker conditions. The group elastic net penalizes predefined blocks of variables (e.g., all lags of a given indicator), combining group LASSO and group ridge. The sparse group elastic net adds within-group sparsity on top of between-group selection.

Connections to explore

Math ↗The structure and its conditions, step by step.References ↗Academic sources and guidance for using the model.

How the Parts Fit Together

β^EN\hat{\beta}_{\text{EN}}β^​EN​

Elastic net coefficient vector

The p×1p \times 1p×1 vector of penalized coefficients. Some entries are exactly zero (sparsity from L1); nonzero entries are shrunk toward zero (from both L1 and L2).

Inputs are the standard regression setup: nnn observations, ppp predictors (typically standardized to zero mean and unit variance), and a response vector yyy. In macro applications, ppp ranges from 50 to 500 candidate predictors drawn from financial conditions indices, labor market indicators, survey data, international trade flows, and their lags. The elastic net expects that a moderate-sized subset of these predictors is relevant, possibly in correlated clusters. Unlike LASSO, the analyst does not need to assume that only one predictor per cluster is relevant.

The objective function is min⁡β12n∥y−Xβ∥22+λ[α∥β∥1+1−α2∥β∥22]\min_\beta \frac{1}{2n} \|y - X\beta\|_2^2 + \lambda \left[ \alpha \|\beta\|_1 + \frac{1 - \alpha}{2} \|\beta\|_2^2 \right]minβ​2n1​∥y−Xβ∥22​+λ[α∥β∥1​+21−α​∥β∥22​]. Two hyperparameters govern the fit: the overall penalty strength λ≥0\lambda \geq 0λ≥0 and the mixing parameter α∈[0,1]\alpha \in [0, 1]α∈[0,1]. At α=1\alpha = 1α=1, the penalty is pure L1 (LASSO). At α=0\alpha = 0α=0, the penalty is pure L2 (ridge). Intermediate α\alphaα values produce models that are sparse (some coefficients exactly zero) but grouping-stable (correlated predictors share selection fate). The L2 component also removes the cap of min⁡(n,p)\min(n, p)min(n,p) on the number of selected variables that LASSO imposes: elastic net can select all ppp predictors if α<1\alpha < 1α<1.

Estimation proceeds by coordinate descent (Friedman, Hastie, Tibshirani, 2010). For a fixed (α,λ)(\alpha, \lambda)(α,λ), the algorithm cycles through predictors and applies a soft-thresholding update that accounts for both penalties. The update for coordinate jjj is β^j=S(zj,αλ)/(1+λ(1−α))\hat{\beta}_j = S(z_j, \alpha \lambda) / (1 + \lambda(1 - \alpha))β^​j​=S(zj​,αλ)/(1+λ(1−α)), where zjz_jzj​ is the partial residual regression coefficient and SSS is the soft-thresholding operator. The denominator (1+λ(1−α))(1 + \lambda(1 - \alpha))(1+λ(1−α)) is the ridge contribution: it further shrinks the surviving coefficients beyond what LASSO alone would do. The algorithm is warm-started along a grid of λ\lambdaλ values for each α\alphaα, making the full path computationally cheap. Hyperparameter selection uses two-dimensional kkk-fold cross-validation over a grid of (α,λ)(\alpha, \lambda)(α,λ) pairs, or a one-dimensional search over λ\lambdaλ at a few fixed α\alphaα values (0.25, 0.50, 0.75, 1.0) followed by selection of the best (α,λ)(\alpha, \lambda)(α,λ) pair.

Assumptions

Maintained

Approximate sparsity with grouping

The true coefficient vector β0\beta_0β0​ has a moderate number of nonzero entries, possibly clustered among correlated predictors. The truth need not be as sparse as LASSO requires.

If violated:If the truth is extremely sparse with no correlated structure, elastic net's L2 component adds unnecessary bias without improving selection. Pure LASSO is more efficient in that case.

Testable

Linear conditional expectation

E[y∣X]=XβE[y | X] = X\betaE[y∣X]=Xβ for some coefficient vector β\betaβ.

If violated:Elastic net estimates a linear approximation. Nonlinear effects are absorbed into residuals; important interaction or threshold effects are missed.

Maintained

Standardized predictors

All predictors are scaled to zero mean and unit variance before applying the penalty.

If violated:Both L1 and L2 penalties treat coefficients on different scales unequally. A predictor measured in large units is penalized disproportionately. Standardization is required for the grouped selection property to function correctly.

Testable

Independent or weakly dependent errors

Errors εi\varepsilon_iεi​ are i.i.d. sub-Gaussian, or weakly dependent with summable mixing coefficients for the time-series case.

If violated:Strong serial correlation invalidates standard kkk-fold cross-validation. Oracle inequalities require adjustment for the reduced effective sample size.

Maintained

Restricted eigenvalue condition

The design matrix XXX satisfies a restricted eigenvalue condition: ∥Xδ∥22/n≥κ∥δ∥22\|X\delta\|_2^2 / n \geq \kappa \|\delta\|_2^2∥Xδ∥22​/n≥κ∥δ∥22​ for all δ\deltaδ in a cone around the true sparse support.

If violated:Without this condition, the elastic net cannot reliably recover the true support direction. Estimation rates degrade and the grouped selection guarantee weakens.

Maintained

Appropriate mixing parameter range

α\alphaα is bounded away from zero: α∈[αmin⁡,1]\alpha \in [\alpha_{\min}, 1]α∈[αmin​,1] with αmin⁡>0\alpha_{\min} > 0αmin​>0 for sparsity to hold.

If violated:At α=0\alpha = 0α=0 the model reduces to ridge with no sparsity. For the elastic net's variable selection properties to hold, α\alphaα must be strictly positive.

Applications

The Bank of England's forecasting division uses elastic net to select from 150+ monthly economic indicators when building inflation fan charts. The grouped selection property matters here: inflation expectations from surveys, market breakevens, and model-implied measures are highly correlated, and the policy team needs all members of a relevant group to appear in the model rather than having LASSO arbitrarily pick one. The selected model typically retains 15 to 30 variables in 4 to 6 correlated clusters, which maps cleanly onto the narrative structure the Monetary Policy Committee expects.

In cross-country growth regressions, elastic net resolves the "open-endedness" problem identified by Levine and Renelt (1992): dozens of institutional, geographic, and policy variables are plausible growth determinants, many are correlated, and OLS cannot handle them all simultaneously. Elastic net selects a stable subset while keeping correlated governance indicators (rule of law, corruption control, regulatory quality) together rather than dropping all but one. The IMF and World Bank have published working papers using this approach for policy-relevant variable selection in development economics.

Financial risk management uses elastic net for portfolio construction with hundreds of assets. DeMiguel, Martin-Utrera, Nogales (2018) showed that elastic net portfolios outperform LASSO portfolios out of sample because the L2 penalty stabilizes weights among correlated assets (e.g., stocks in the same sector), reducing turnover and transaction costs.

Elastic net should not be used when predictors are genuinely orthogonal and very sparse selection is needed: the L2 penalty adds unnecessary bias in that setting, and pure LASSO is strictly better. It also should not be used when the practitioner needs valid post-selection confidence intervals, because the selective inference literature for elastic net is less developed than for LASSO. Finally, if the goal is pure prediction without any sparsity requirement, ridge or random forests may dominate because they avoid the bias introduced by L1 thresholding on weakly relevant predictors.

Extensions and open questions

Variants

  • Adaptive elastic net - predictor-specific penalty weights wj=∣β^jinit∣−γw_j = |\hat{\beta}_j^{\text{init}}|^{-\gamma}wj​=∣β^​jinit​∣−γ on the L1 term for oracle properties
  • Group elastic net - penalizes ℓ2\ell_2ℓ2​ norms of predefined predictor groups, combining group LASSO with group ridge
  • Sparse group elastic net - between-group selection via group penalty plus within-group sparsity via element-wise L1
  • Multi-task elastic net - shared support across multiple response variables, useful for multi-horizon forecasting
  • Time-varying elastic net - rolling or expanding window estimation with adaptive (α,λ)(\alpha, \lambda)(α,λ) for structural change

Open questions

  • Optimal data-driven selection of α\alphaα jointly with λ\lambdaλ in finite samples, beyond grid search
  • Valid post-selection inference for elastic net coefficients without the computational cost of selective inference methods
  • Whether the grouped selection property delivers genuine gains over LASSO in macro panels where group structure is unknown a priori

Keep going

Read next

Continue with a related concept, model, or example.

Theory model

IS-LM Model

a well-connected theoretical model two steps from here

New angle: theoretical model →
Macro by Mark
Help
Privacy PolicyTerms of UseEthics and Compliance

© 2026 Mark Jayson Nation LLC