The essentials
- The result. Across 916 out-of-sample forecasts from 2017 to 2023, the analyst consensus was off by $0.17 a share on average. Random Forest was off by $0.58 and XGBoost by $0.59: about 3.4 times less precise.
- The sectors. The models lost in all ten sectors tested. The gap was narrowest in real estate (1.24 times the analysts' error) and widest in utilities (11.5 times).
- The crisis. During Covid the analysts' error rose 17%. Random Forest's rose 22% and XGBoost's 26%. The models were supposed to be the steadier hand; they were not.
- The macro data. Adding the VIX, interest rates, inflation and the yield spread moved XGBoost's error from $0.587 to $0.595. The difference is not statistically significant (Diebold-Mariano −1.04, p = 0.297).
- The limit. The models read accounts. Analysts also hear guidance, earnings calls and management. This test measures what that difference is worth on large, closely followed companies; it does not measure what newer, text-reading models could do.
1. Three times further from the mark
The pitch for machine learning in equity research is familiar. Analysts are slow, optimistic and inclined to huddle around one another's numbers; an algorithm has no management relationship to protect and no reputation to lose. Machine learning has already shown what it can do with stock returns (Gu, Kelly and Xiu, 2020). Feed it enough accounting data and it should forecast earnings better than the people paid to do so.
The study behind this article, a master's thesis completed at INSEEC in 2025-26, tested that claim on a deliberately ordinary setup: two tree-based models that any quantitative team can run, trained on public data. It set out three hypotheses, each favourable to the machines. All three failed.
The headline number is the mean absolute error, the average distance in dollars between a forecast of earnings per share and the figure the company went on to report. For the consensus it was $0.1722. For Random Forest it was $0.5769; for XGBoost, $0.5868. A version of XGBoost given macroeconomic data did slightly worse still, at $0.5950.
Pick a measure; hover or tap a row for the detail
The other two measures tell the same story. Root mean squared error, which punishes large misses, was 0.38 for the consensus and between 0.89 and 0.92 for the models: the algorithms were not merely a little off more often, they were badly off more often. Measured as a percentage of the reported figure, the consensus erred by 15.7% and each model by more than 63%.
2. How the test was run
The sample is 44 companies from the S&P 500, the ones for which every input was complete between 2014 and 2023. Reported earnings come from the SEC's EDGAR filings, the consensus from Alpha Vantage, company fundamentals from Orbis and macroeconomic series from FRED, the St Louis Fed's database.
Each model was asked for one thing: next quarter's earnings per share. It was given the company's earnings history (lags, moving averages, a fourth-quarter flag), its fundamentals (operating margin, profitability, leverage, balance-sheet structure) and, in one variant, the macro backdrop.
The protocol matters more than the models. Forecasting studies flatter themselves easily: a single misdated column lets a model peek at the future. Here the models were trained walk-forward. Each was fitted on the quarters available at a given date, asked for the next one, then refitted with that quarter added, and so on to the end of 2023. Every one of the 916 forecasts scored was made on data the model had not seen, and the consensus was scored against the same companies and the same quarters.
3. Ten sectors, ten defeats
A single average can hide a sector where the machine is ahead. There is none. XGBoost, the stronger candidate on paper, trailed the consensus in every sector of the sample.
Hover or tap a sector for the detail
The pattern is not the obvious one. The models came closest where earnings are steadiest, in real estate and consumer staples, which fits: a model built on past earnings does least harm when the past repeats. But utilities are steady too, and there the model was at its worst.
The explanation is in the analysts' column, not the model's. On utilities the consensus missed by 5 cents a share; the model missed by 62. The model's error in utilities was about the same as in technology or financials. The analysts were simply far better there than anywhere else, in a regulated business where rate decisions and guidance tell a specialist most of what the quarter will hold. The more the answer sits in information outside the accounts, the wider the gap.
4. Covid: the stress test the models failed
The second hypothesis was the most plausible. In a shock, analysts are thought to freeze or herd, while a model keeps processing the data. If machines had an edge anywhere, it should have been in 2020.
Hover or tap a forecaster for the detail
It was the reverse. XGBoost went from 3.4 times the consensus error outside the crisis to 3.7 times inside it. A model trained on years of ordinary quarters has nothing in its history that resembles a lockdown, and it extrapolates the old regime into the new one. An analyst can pick up the phone, listen to a chief financial officer withdraw guidance and cut the number the same afternoon.
5. More data, no better
The third hypothesis gave the model what it seemed to be missing: the economy. The enriched XGBoost was given the VIX, interest rates, inflation and the spread between long and short rates. Its error went up, from $0.5868 to $0.5950. The Diebold-Mariano test, the standard check on whether two sets of forecasts differ in accuracy, returned −1.04 with a p-value of 0.297: no detectable effect in either direction.
The model's own weightings show why.
Hover or tap a variable for the detail
Nearly half of the model's weight sat on one variable, the average of the last four quarters' earnings; the two earnings-history variables together carried 58%. Stripped of its machinery, the model was saying that next quarter will look like the recent past. That is a respectable baseline and a poor rival to people who know what management said last week.
The macro series added little because they are the same for every company on a given date. An inflation print does not say whether a firm can pass its costs on; a policy rate does not say whether its debt is fixed or floating. Turning those numbers into an earnings forecast means knowing each company's exposure, which is the analyst's job.
6. What the analysts know that the models do not
None of this rehabilitates the analyst as an oracle. The academic record on their biases is long. Abarbanell and Bernard (1992) documented analysts under-reacting to earnings news. Forecasts lean optimistic, are revised too slowly and cluster around the consensus, and Lim (2001) argued that some of the optimism is a rational price for access to management. Bradshaw and co-authors (2012) showed that the analysts' edge over simple time-series models depends on the horizon and on the kind of company, and can vanish.
The result here suggests those biases cost less than the information analysts hold. On large, heavily covered American companies, the consensus aggregates specialists who sit through every earnings call, track every guidance revision and follow the sector daily. The models in this test had none of that. They were given structured numbers, and the numbers that matter most for next quarter are frequently not in last quarter's accounts. Much of it is said out loud: Liu, Chi and Wang (2024) measure how much analysts draw from the question-and-answer sessions of earnings conferences.
The studies that report machines matching or beating analysts tend to differ from this one in ways that support the same reading. Chen and co-authors (2022) fed their models the detailed line items of company filings, far more than the summary ratios used here. Van Binsbergen, Han and Lopez-Lira (2021) used machine-learning forecasts as a benchmark for measuring where analysts go wrong. Cao and You (2021) and Chattopadhyay, Fang and Mohanram (2022) worked on far larger samples, in the second case across countries, where this test had 44 companies. Cui, Xu and Zhou (2020), who compared their model with the consensus, presented it as a tool to help analysts, not replace them. Cao and co-authors (2024) found the strongest performer was neither the human nor the machine but the two together. And the machines are not free of the analysts' faults: Frank, Gao and Yang (2025) show that machine-learning forecasts fail the same efficiency tests used to convict analysts of bias. In each case the result turns on what the model is given to read, not on the algorithm alone.
7. What this test does not show
Read the result with these limits
The sample is small and favours the analysts. Forty-four large companies with dense coverage is where the consensus is strongest. Small and mid caps, where two or three analysts follow a stock, are where a model has the most room, and they are not in this test.
The contest is not symmetrical on timing. The models forecast from the previous quarter's data. A consensus figure can absorb guidance and news released during the quarter itself. That is the analysts' real advantage, but it means the test compares information sets as much as methods.
Two models are not "AI". Random Forest and XGBoost work on tables of numbers. Models that read earnings-call transcripts and filings, neural networks and sector-specific models were not tested and could give a different answer.
One crisis, one cycle. The Covid period supplies 81 forecasts. Ten years of data cover a single shock and a single tightening cycle.
8. Le Détroit's reading
The useful finding is not that humans beat machines. It is that a model fed only public accounting data reproduces what the market already knows and stops there. That is the efficient-markets argument (Fama, 1970) applied to forecasting: public information is already in the consensus. Anyone promising to replace an equity research desk with off-the-shelf algorithms and a fundamentals feed is selling a moving average.
The question for banks and asset managers is therefore one of inputs, not of algorithms. The gap measured here, 41 cents a share on average, is roughly the value of everything analysts learn that is not in a spreadsheet: guidance, tone, order books, regulators. Closing it means giving models that material, which is what the newer text-based systems attempt, and it is where the evidence still has to be built.
Until then the sensible use of these models is the modest one. A forecast that leans on the last four quarters is a cheap sanity check: where the consensus sits far from it, there should be a reason an analyst can name. On this sample the model is a second opinion and the analyst remains the forecaster.
What to watch
- Text as an input. Whether models that read earnings calls and filings close the gap on the same companies, under the same walk-forward protocol.
- Thinly covered stocks. The same test on small and mid caps, where the consensus is built from a handful of estimates and is easier to beat.
- Combination. Whether blending a model's forecast with the consensus beats the consensus alone, the "man plus machine" result reported elsewhere.
- The next shock. Covid is one episode. A second out-of-regime period would show whether the models' crisis penalty is structural.
This article is based on the author's own research: Berkan Tezgel, "Machine learning et prévision des bénéfices : comparaison avec le consensus des analystes financiers", master's thesis, MSc 2 Corporate Finance and Financial Engineering, INSEEC, 2025-26. All figures come from that study unless stated; calculations labelled as Le Détroit's are derived from its tables. Results apply to the 44 companies and the period studied and should not be extended to the whole S&P 500 or to other markets. This article is not investment advice.

