Skip to content
LeetQuant
E06 Advanced Machine Learning

E06 · Advanced Machine Learning · Lesson 4 of 4

ML with Low Signal-to-Noise

What an R² of a few percent means in correlation, hit rate and Sharpe; how much in-sample fit is pure noise; target engineering with ranks, signs and volatility scaling; how strong regularisation should be; and why models should be judged by economic value, illustrated with simulations.

18 min

Objective

Most machine-learning intuition comes from problems where a good model explains most of the variance. Return prediction is a different regime: a great model explains a few percent. You should be able to translate an R2R^2 into a correlation, a hit rate and a Sharpe ratio; predict how much in-sample R2R^2 noise features will produce; choose a target and a regularisation strength suited to the noise; and explain why a model with negative R2R^2 can still make money.

How small is small

Write the forecast-return correlation (the information coefficient, IC) as ρ\rho. For a linear forecast the out-of-sample R2R^2 is at best ρ2\rho^2, so:

IC ρ\rhoR2=ρ2R^2 = \rho^2Hit rate 12+1πarcsin⁡ρ\tfrac12 + \tfrac{1}{\pi}\arcsin\rhoSharpe per period ρ/1+ρ2\rho/\sqrt{1+\rho^2}
0.020.04%50.6%0.020
0.050.25%51.6%0.050
0.101.0%53.2%0.099

The hit rate is the probability that forecast and return have the same sign when both are jointly normal. The Sharpe column is for a position proportional to the forecast. With standardised forecast XX and return YY, the per-period P&L is XYXY, with E[XY]=ρ\mathbb{E}[XY] = \rho and, for jointly normal variables, E[X2Y2]=1+2ρ2\mathbb{E}[X^2Y^2] = 1 + 2\rho^2, so Var⁡(XY)=1+ρ2\operatorname{Var}(XY) = 1 + \rho^2 and the Sharpe is ρ/1+ρ2≈ρ\rho/\sqrt{1 + \rho^2} \approx \rho.

Two consequences. A daily IC of 0.050.05, which is a good signal, gives an annualised Sharpe of about 0.05×252≈0.790.05 \times \sqrt{252} \approx 0.79 on a single asset. And by the fundamental law of active management, the information ratio scales like ICN\text{IC}\sqrt{N} for NN independent bets, which is why quant equity strategies spread a tiny IC across thousands of stocks.

Label noise sets the ceiling

Write the target as y=f(x)+εy = f(x) + \varepsilon. The best possible R2R^2 is Var⁡(f)/(Var⁡(f)+σε2)\operatorname{Var}(f)/(\operatorname{Var}(f) + \sigma_\varepsilon^2), whatever the model. Noise in the target does not bias a regression, but it inflates the variance of every estimate and, through the gradient, of every network weight. Noise in the features is worse: it biases linear coefficients towards zero (attenuation). Financial targets carry extra noise from bid-ask bounce, stale prices and a few extreme days, and overlapping multi-day labels reuse the same noise in many rows, so the effective sample is smaller than the row count.

How much in-sample fit is noise

For OLS with pp pure-noise standardised features and nn rows, the expected in-sample R2R^2 is about p/np/n even though the true R2R^2 is zero. With a true R2R^2 of R02R_0^2, roughly

E[Rin2]≈R02+pn(1−R02),E[Rout2]≈R02−pn−p−1(1−R02).\mathbb{E}[R^2_{\text{in}}] \approx R_0^2 + \frac{p}{n}(1 - R_0^2), \qquad \mathbb{E}[R^2_{\text{out}}] \approx R_0^2 - \frac{p}{n - p - 1}(1 - R_0^2) .

The second formula comes from the out-of-sample prediction error of OLS with Gaussian features, σ2(1+p/(n−p−1))\sigma^2\big(1 + p/(n - p - 1)\big): each estimated coefficient adds its own estimation noise to every forecast. When R02R_0^2 is a few percent and p/np/n is comparable, the in-sample number is mostly noise and the out-of-sample number is negative.

Worked example

translating an IC of 0.05

A daily forecast for one asset has a true IC of 0.050.05. Translate it into R2R^2, hit rate and annualised Sharpe. Roughly how many days of out-of-sample data do you need before its IC is two standard errors from zero?

Show solution

R2=0.052=0.0025R^2 = 0.05^2 = 0.0025, i.e. 0.25% of the variance.

Hit rate: 12+arcsin⁡(0.05)/π=0.5+0.05002/3.1416≈0.516\tfrac12 + \arcsin(0.05)/\pi = 0.5 + 0.05002/3.1416 \approx 0.516.

Sharpe per day: 0.05/1.0025≈0.04990.05/\sqrt{1.0025} \approx 0.0499; annualised, 0.0499×252≈0.790.0499 \times \sqrt{252} \approx 0.79.

Detection: a sample correlation from nn independent points has standard error about 1/n1/\sqrt{n}, so its tt-statistic is about ρn\rho\sqrt{n}. Setting 0.05n=20.05\sqrt{n} = 2 gives n=1600n = 1600 days, about 6.3 years. A signal worth trading can take years of live data to confirm, which is why research leans on cross-sectional breadth and on priors about why a signal should work.

Worked example

what 50 features and 1,000 days buy you

You regress daily returns on 50 standardised features using 1,000 days. One feature carries a real signal with population R2=0.01/1.01≈0.99%R^2 = 0.01/1.01 \approx 0.99\%; the other 49 are noise. What in-sample and out-of-sample R2R^2 should you expect from OLS? What is the IC of the true model, and its annualised Sharpe?

Show solution

In sample: 0.0099+501000(1−0.0099)≈0.0099+0.0495=0.0590.0099 + \tfrac{50}{1000}(1 - 0.0099) \approx 0.0099 + 0.0495 = 0.059. About 5 of the 6 percentage points are fitted noise.

Out of sample: 0.0099−50949(0.9901)≈0.0099−0.0522=−0.0420.0099 - \tfrac{50}{949}(0.9901) \approx 0.0099 - 0.0522 = -0.042. The model is worse than predicting zero, despite containing the real feature.

True model: the IC is 0.0099≈0.0995\sqrt{0.0099} \approx 0.0995, so the per-period Sharpe is 0.0995/1+0.0099≈0.0990.0995/\sqrt{1 + 0.0099} \approx 0.099, or 0.099×252≈1.570.099 \times \sqrt{252} \approx 1.57 annualised. A genuinely valuable signal, invisible behind an in-sample R2R^2 of 6% that promises much more and an OLS out-of-sample R2R^2 that promises nothing. The simulation below confirms all three numbers.

A simulation of how in-sample fit misleads

Two hundred repetitions of the worked example: OLS on all 50 features, ridge with the penalty chosen by cross-validation inside the training data, OLS on the 5 features with the largest in-sample correlation, and the true model. Each is scored on 5,000 fresh rows by R2R^2 and by the Sharpe of a position proportional to the forecast. Returns have zero mean by construction, so no model has an intercept (we do not want the forecast to bet on drift).

import numpy as np
from sklearn.linear_model import LinearRegression, RidgeCV

rng = np.random.default_rng(0)
n_tr, n_te, p, trials = 1000, 5000, 50, 200
beta = np.zeros(p)
beta[0] = 0.1                       # one real feature; true R^2 = 0.01 / 1.01, about 1%

def r2(y, q):
    return 1 - np.mean((y - q) ** 2) / np.var(y)

def sharpe(y, q):                   # position proportional to the forecast, per period
    pnl = q * y
    return pnl.mean() / pnl.std()

res = {k: [] for k in ["OLS, 50 feats", "ridge (CV)", "top-5 by corr", "true model"]}
for _ in range(trials):
    X = rng.normal(size=(n_tr + n_te, p))
    y = X @ beta + rng.normal(size=n_tr + n_te)
    Xtr, ytr, Xte, yte = X[:n_tr], y[:n_tr], X[n_tr:], y[n_tr:]
    top = np.argsort([abs(np.corrcoef(Xtr[:, j], ytr)[0, 1]) for j in range(p)])[-5:]
    fits = {
        "OLS, 50 feats": (LinearRegression(fit_intercept=False).fit(Xtr, ytr), slice(None)),
        "ridge (CV)": (RidgeCV(alphas=np.logspace(-1, 5, 25), fit_intercept=False)
                       .fit(Xtr, ytr), slice(None)),
        "top-5 by corr": (LinearRegression(fit_intercept=False).fit(Xtr[:, top], ytr), top),
    }
    for k, (m, cols) in fits.items():
        q_in, q_out = m.predict(Xtr[:, cols]), m.predict(Xte[:, cols])
        res[k].append((r2(ytr, q_in), r2(yte, q_out), sharpe(yte, q_out)))
    res["true model"].append((r2(ytr, Xtr @ beta), r2(yte, Xte @ beta), sharpe(yte, Xte @ beta)))

print(f"{'':14s} {'train R^2':>10s} {'test R^2':>10s} {'test Sharpe':>12s}")
for k, v in res.items():
    a = np.mean(v, axis=0)
    print(f"{k:14s} {a[0]:+10.4f} {a[1]:+10.4f} {a[2]:+12.4f}")

Output (averages over 200 trials; Sharpe is per period):

                train R^2   test R^2  test Sharpe
OLS, 50 feats     +0.0578    -0.0414      +0.0407
ridge (CV)        +0.0168    +0.0003      +0.0414
top-5 by corr     +0.0274    -0.0092      +0.0566
true model        +0.0085    +0.0100      +0.1005
  • Training R2R^2 ranks the models backwards. OLS looks best in sample and is worst out of sample; the true model looks worst in sample.
  • The formulas hold. OLS: 0.0580.058 in sample and −0.041-0.041 out of sample, against predictions of 0.0590.059 and −0.042-0.042.
  • R2R^2 and money disagree. OLS has a test R2R^2 of −4%-4\% yet a positive Sharpe. R2R^2 punishes forecasts that are too large; a Sharpe ratio (like a correlation) ignores the scale of the forecast and rewards only its direction. Ridge mostly fixes the scale, taking R2R^2 from −4%-4\% to zero, but barely changes the direction, so its Sharpe is the same.
  • Everyone leaves money on the table. The best estimated model captures about half of the true model's Sharpe of 0.100.10.

Target engineering

With little signal, the choice of target can matter as much as the model:

  • Volatility-scaled returns rt+1/σ^tr_{t+1}/\hat\sigma_t, with σ^t\hat\sigma_t known at time tt (for example an EWMA). Without scaling, high-volatility periods dominate a squared loss; scaling is like weighted least squares and makes the target closer to stationary.
  • Cross-sectional ranks (or z-scores within each date). They remove the market-wide move that no stock-level feature can predict, cap the influence of outliers and match how a long-short portfolio is actually built.
  • Signs (classification of up versus down). Robust to outliers, but they discard magnitude. For Gaussian noise, corr⁡(Y,sign⁡Y)=2/π≈0.80\operatorname{corr}(Y, \operatorname{sign} Y) = \sqrt{2/\pi} \approx 0.80, so you lose about 20% of the information.
  • Residual returns after removing market or factor exposure, so the model predicts what you will actually trade.

The script below estimates a weak slope (IC about 0.05) with 1,000 rows using three targets, and reports how reliably the slope is detected (its mean over its standard deviation across 4,000 trials, an average tt-statistic):

import numpy as np

rng = np.random.default_rng(5)
n, trials, df = 1000, 4000, 3
targets = {"raw": lambda y: y,
           "sign": np.sign,
           "rank": lambda y: np.argsort(np.argsort(y)) / (len(y) - 1) - 0.5}
for noise in ["normal", "t(3)"]:
    slopes = {k: [] for k in targets}
    for _ in range(trials):
        x = rng.normal(size=n)
        e = rng.normal(size=n) if noise == "normal" else rng.standard_t(df, n) / np.sqrt(df / (df - 2))
        y = 0.05 * x + e                                   # IC about 0.05
        for k, g in targets.items():
            slopes[k].append(np.polyfit(x, g(y), 1)[0])
    # mean / sd of the fitted slope across trials = how reliably the signal is detected
    print(f"{noise:7s}", "  ".join(f"{k} {np.mean(v) / np.std(v):.2f}" for k, v in slopes.items()))

Output:

normal  raw 1.56  sign 1.26  rank 1.52
t(3)    raw 1.57  sign 1.99  rank 2.16

With Gaussian noise, the raw target is best and the sign target loses the predicted 20% (1.26/1.56≈0.811.26/1.56 \approx 0.81). With fat-tailed noise of the same variance, ranks and signs detect the signal far more reliably than raw returns, because a few extreme observations no longer dominate the fit. Real returns are fat-tailed.

How strong should regularisation be?

A Bayesian view sets the scale. With prior βj∼N(0,τ2)\beta_j \sim N(0, \tau^2) and noise variance σ2\sigma^2, the posterior mean is ridge regression with penalty λ=σ2/τ2\lambda = \sigma^2/\tau^2 on the sum of squared errors. For standardised, roughly orthogonal features, ridge multiplies each OLS coefficient by n/(n+λ)n/(n + \lambda).

In the simulation, the total signal variance is 0.010.01 spread over 50 features, so τ2=0.01/50=0.0002\tau^2 = 0.01/50 = 0.0002 and σ2≈1\sigma^2 \approx 1, giving λ≈5,000\lambda \approx 5{,}000 and a shrinkage factor of 1000/6000≈0.171000/6000 \approx 0.17: the right model shrinks OLS by more than 80%. Cross-validation agrees: the median λ\lambda chosen by RidgeCV across the 200 trials was about 5,600. Penalties that look absurd by textbook standards are normal when R2R^2 is 1%. The same logic gives large minimum leaf sizes for trees, small learning rates with many rounds for boosting, and strong weight decay for networks.

Evaluate by economic value

Choose and report models by the decision they support, measured out of sample:

  • IC and rank IC per period, with their tt-statistics over time, not one pooled number.
  • The Sharpe ratio of the portfolio the forecasts imply, after transaction costs, together with turnover. A model that adds 0.002 of R2R^2 by trading twice as often can lose money.
  • Stability across sub-periods and assets, since one good year can carry an average.
  • Calibration matters only if you size positions from the forecast's magnitude; then fix the scale (shrink) separately from improving the ranking.

And remember that every model, feature set and hyperparameter you tried is a trial: the best of many backtests is optimistically biased, which is why the final test block is touched once.

Knowledge check

A daily single-asset signal has an out-of-sample IC of 0.04. Which is closest to the annualised Sharpe of a position proportional to the signal, before costs (252 trading days)?

Knowledge check

You fit OLS with 100 features on 2,000 observations of a target that is pure noise. Roughly what in-sample R² should you expect?

Knowledge check

A model has a test R² of −3% but its forecasts have a positive, statistically significant correlation with realised returns. What is the most sensible reading?

Knowledge check

You switch the target from raw next-day returns to their sign. Under which conditions is this most likely to improve out-of-sample performance?

Key takeaways

  • R2≈IC2R^2 \approx \text{IC}^2: an IC of 0.05 is an R2R^2 of 0.25%, a hit rate of 51.6% and a daily Sharpe of 0.05 (about 0.8 a year).
  • Noise features add about p/np/n to in-sample R2R^2 and subtract about p/(n−p−1)p/(n-p-1) out of sample; in-sample fit can rank models backwards.
  • Scale targets by ex-ante volatility, rank cross-sectionally, and prefer robust targets when tails are fat.
  • The right ridge penalty is roughly noise variance over prior coefficient variance, which is huge when signals are weak.
  • Judge models by out-of-sample IC, Sharpe after costs and stability, not by R2R^2 alone; negative R2R^2 with positive correlation means "shrink", not "discard".

Practice problems

Finished reading?

Answer the 4 knowledge checks to complete this lesson (0 done).