Quant Analytics: from scratch to pro · Machine learning in finance · Beginner
Machine learning for market data: what it can and cannot do
Machine learning works well where signal is strong and the world stands still. Markets offer the opposite: weak signal, heavy noise and relationships that change. This lesson sets honest expectations and shows where the method helps.
In this lesson
- Explain why market data has a low signal-to-noise ratio
- Compare a model's accuracy with the base rate before calling it skilful
- Estimate how much a small accuracy gain is worth statistically
- Describe where machine learning helps: as a filter on rules that already work
Read first: Returns: simple, log and compounded
Machine learning has transformed fields such as image recognition and language, where the signal is strong and the rules of the world do not change from one year to the next. Financial markets are different in both respects. That does not make the method useless. It means that the right question is "what can it do here?", and the answer is narrower than the marketing suggests.
What machine learning is
Machine learning fits a flexible model to examples so that it predicts well on cases it has not seen. A feature is an input (a past return, a volatility reading). A label is the outcome to predict (the sign of the next return). The model learns a mapping from features to labels. Its quality is judged on data it was not fitted on. See Hastie, Tibshirani and Friedman (2009) for the general theory.
Why markets are hard
- Low signal-to-noise. Most of a daily return is unpredictable. A predictor that explains a fraction of one percent of the variance can still be useful, but it cannot be found by eye and is easily mistaken for noise.
- Few independent observations. Ten years of daily data is about 2,500 points, and for slow signals far fewer independent ones.
- Changing relationships. What worked when costs, participants or regimes were different may stop working. See concept drift.
- Flexible models fit noise. The more candidate features and settings, the more likely something fits by chance. Harvey, Liu and Zhu (2016) document this problem for published return predictors.
Worked example: accuracy against the base rate
Up days are 53% of all days in a sample. A model that always says "up" scores 53%. Another model scores 54% on 500 test days. Is it better?
The standard error of an accuracy near 54% on 500 days is sqrt(0.54 x 0.46 / 500), which is 2.2 points. The edge over the base rate is 1 point, or 0.45 standard errors. A 95% interval for the accuracy extends 4.4 points either side. The result cannot be told from the base rate.
Next, the size of the signal. A forecast correlated 0.05 with returns explains 0.05^2, which is 0.25% of the variance. A signal this small cannot be seen by eye, yet it is not zero.
Finally, the cost of searching. With 500 days, a noise feature has a sample correlation with a standard deviation of 1 / sqrt(500), which is 4.5 points. Among 200 such features, the best is about 2.8 standard deviations out: a correlation near 0.126 from noise alone. A researcher who tries 200 features will find one that looks like a signal.
Where machine learning helps
The honest uses are modest:
- Filtering a rule that already works. A rule with a clear reason for its edge produces trades. A model estimates which are more likely to succeed and skips the rest. See machine learning as a filter.
- Combining many weak, sensible inputs into one forecast, with strong regularisation.
- Classifying conditions such as high or low liquidity, where labels are more stable than return signs.
Less honest uses are searches for a signal in raw prices with no prior reason to expect one. These find noise, and a strong in-sample result is the usual outcome.
Common mistakes
- Reporting accuracy without the base rate.
- Reporting a result from the data used to choose the model.
- Treating 500 overlapping observations as 500 independent ones. See features and labels.
- Adding features until the backtest looks good.
- Believing a flexible model has found structure because it fits the past closely.
In practice
Start with a rule that has a reason, measure it honestly, and bring in a model only to improve a result that already exists. Hold out data that no step touches. Compare every result with a trivial benchmark. Analytics on FinUties applies measures like these to the markets it covers, so they are at hand when you read a chart.
Worked numbers
Each result is recomputed from the formula shown.
| What | Formula | Result |
|---|---|---|
| base rate of up days | 0.53 | 53% |
| model accuracy | 0.54 | 54% |
| standard error of accuracy on 500 days | 100 * sqrt(acc * (1 - acc) / 500) | 2.2 |
| edge in standard errors | (acc - base_rate) * 100 / se | 0.45 |
| 95% half-width of the accuracy | 1.96 * se | 4.4 |
| variance explained at correlation 0.05 | 0.05 ** 2 | 0.25% |
| standard deviation of a noise correlation, 500 days | 100 / sqrt(500) | 4.5 |
| best of 200 noise features, in standard deviations | phi_inv(1 - 0.5 / 200) | 2.8 |
| typical best noise correlation | z200 * noise_sd / 100 | 0.126 |
Check yourself
Up days are 53% of all days. A model predicting 'up' every day is right how often?
53% of the time, with no skill at all. This is the base rate, and any accuracy figure must be read against it.
A model scores 54% on 500 test days. Is it better than the 53% base rate?
Not demonstrably. The standard error of an accuracy near 54% on 500 days is sqrt(0.54 x 0.46 / 500) = 2.2 points, so a 1-point edge is 0.45 standard errors, well inside noise.
A predictor's forecasts have a correlation of 0.05 with returns. How much variance does it explain?
0.05 squared = 0.25% of the variance. Small values like this can still be worth having, but they cannot be seen by eye.
Why does testing 200 candidate features on 500 days usually turn up one that looks useful?
Pure noise features have sample correlations with a standard deviation of 1/sqrt(500) = 4.5 points. The best of 200 is about 2.8 standard deviations out, a correlation near 0.126, by chance alone.
What does 'a filter on a rule that works' mean?
A rule already produces trades with positive expectancy for a reason that can be explained. The model only decides which of those trades to take. It does not invent the trades.
Key terms
Sources
- Advances in Financial Machine Learning. Wiley (Marcos López de Prado), 2018. Accessed 9 Nov 2026
- The Elements of Statistical Learning (2nd edition). Springer (Trevor Hastie, Robert Tibshirani, Jerome Friedman), 2009. Accessed 9 Nov 2026
- ... and the Cross-Section of Expected Returns. The Review of Financial Studies 29(1), 5-68 (Campbell R. Harvey, Yan Liu, Heqing Zhu), 2016. Accessed 9 Nov 2026