AI State of the Art
Domains/Séries temporelles/30 min
Section 237

Time Series and Finance: the Edge Case

Listen as a podcast →

A story: the weather does not read your forecast

Imagine a meteorologist publishing a remarkably reliable forecast: "it will rain every Tuesday". The rain could not care less, it will keep falling on Tuesdays whether the forecast is published or not. The sky does not read weather bulletins.

The market does. Now imagine an analyst discovering that a certain stock reliably rises on Tuesdays. The moment he acts on it (and he will not be alone for long) buyers pile in on Monday evening to get ahead of the move, the price rises on Monday instead, and the Tuesday pattern vanishes. The forecast destroyed the very thing it forecast.

This difference, predicting a system that reacts to predictions, makes finance the edge case of this module: the domain where the tools from the other lessons, which perform honourably on electricity or road traffic, break their teeth. This page explains why, and what machine learning actually does in finance, because it does a great deal there, just not what people imagine.

Where this page sits in the module

This lesson closes the module by showing its limits. It assumes the overview (seasonality, stationarity), the classical methods and the neural models (deep learning, Transformers, foundation models). Everything that follows explains why these tools, effective elsewhere, stumble here.

Why financial data is the worst time series there is

Three properties stack up, each painful enough on its own. To fix ideas, compare the module's most docile series (electricity consumption) with an asset price:

PropertyElectricity consumptionAsset price
What causes the curveStable physical and social phenomena (day/night, seasons, weather)The decisions of thousands of actors watching each other
Share of signalDominant: the rhythms repeatTiny: most movements are noise
Stability over timeGood from one year to the nextRegimes that change without warning
Reaction to the forecastNone: the curve does not know it is being predictedDirect: exploiting a pattern makes it disappear

Any one of these differences would be enough to complicate forecasting; finance stacks them all.

Let us take the table's last three rows one at a time.

1. A very low signal-to-noise ratio

The signal-to-noise ratio measures how much of a dataset carries usable information (the signal) versus random fluctuation (the noise). An electricity-consumption curve is mostly signal: daily rhythm, seasons, weather, the causes are physical, stable, massive. An asset-price curve is the opposite: the vast majority of minute-to-minute or day-to-day moves reflect no lasting information, only the randomness of buy and sell orders crossing each other. If an exploitable signal remains, it is tiny and buried.

Why so much noise? Because orders arrive for a thousand reasons unrelated to the asset's value: a fund needs cash, an individual is financing a purchase, a manager mechanically rebalances a portfolio. Each of these orders nudges the price a hair's breadth while carrying no predictive information whatsoever.

The direct consequence for machine learning: put a powerful model in front of data that is almost entirely noise, and it does what it knows how to do, it learns the noise. It comes out of training with excellent performance on the past and none on the future. This is overfitting in its purest form (see the overfitting lesson), and finance is its ideal playground.

2. Permanent non-stationarity

A series is stationary when its statistical properties (average level, size of fluctuations, correlations) stay stable over time, the module introduces this notion in the overview. Electricity consumption is reasonably stationary from one year to the next. Markets are not: they move from one regime to another. Calm years, then a crisis; a decade of low interest rates, then a brutal climb; a central-bank intervention that changes the rules overnight.

At every regime change, the regularities learned on the previous regime collapse, including the correlations between assets, which have a well-earned reputation for realigning at precisely the worst moment, when everything falls together. A model trained on ten calm years has simply never seen the world it will have to predict in during the storm. This is the Achilles heel of all learning from historical data, pushed here to the extreme: in finance, the past is never a faithful picture of the future, because the process generating the data changes too.

An image: learning to drive in a country that keeps changing its highway code

Learning to forecast a stationary series is like learning to drive: the rules are stable, experience accumulates. Learning to forecast a market is like learning to drive in a country that changes its highway code without notice, where, on top of that, the other drivers change their driving as soon as they figure out how you anticipate theirs.

3. An adversarial environment: an exploited pattern disappears

The word adversarial describes an environment that adapts against you. It is the Tuesday story from the opening, and it has a name in economics: the efficient markets argument. Without jargon, it says this: a market price already aggregates what thousands of informed, well-equipped, motivated participants know and anticipate. If a simple predictive pattern existed ("it rises on Tuesdays", "it bounces after three down days") those participants would have spotted it, exploiting it would have made it disappear, and nothing would be left for the newcomer to predict.

Do not take away the caricature version ("nothing is ever predictable"): pockets of inefficiency exist, open up and close again. But the modest version is enough for our purposes: every predictive signal in finance is perishable, because exploiting it erodes it. A turbine's sensors do not change their behaviour because a model is watching them; the market does. No other time series in this module has that property.

Backtest overfitting: the guaranteed "miracle" strategy

A backtest is the simulation of an investment strategy on past data: "had I applied this rule for the last ten years, what would it have returned?". An indispensable tool, and a machine for self-deception, through a mechanism worth understanding because it reaches far beyond finance.

Have a thousand people each flip a coin ten times. By pure chance, it is entirely expected that a few will produce a streak of ten, and it would be absurd to conclude they have a gift. Replace the players with strategies: test a thousand variants (different rules, different parameters) on the same history, and it is mathematically guaranteed that a few will display a splendid past record by pure chance. Present only the winner while hiding the 999 attempts, and it looks miraculous. It is not: it is merely the variant best fitted to the particular accidents of that one history, accidents that will not repeat.

Performance curve of a simulated strategy: a strong rise over the first half, labelled In-Sample with a Sharpe ratio of 1.49, then stagnation and decline over the second half, labelled Out-Of-Sample with a Sharpe ratio of -0.3.
The miracle strategy in one picture, from the paper by the mathematicians who formalized this trap. Among random walks (hence with no signal whatsoever) the one with the prettiest first half (In-Sample) was selected: a splendid past record (Sharpe ratio 1.49), then a slightly negative real performance (Out-Of-Sample). Selection manufactured the miracle.Source : Bailey, Borwein, López de Prado and Zhu, Pseudo-Mathematics and Financial Charlatanism (figure 4), Notices of the AMS

This is the multiple comparisons problem (the more attempts you make, the more the apparent champion owes its title to chance), combined with the overfitting of the overfitting lesson, but with an aggravating circumstance specific to finance: you cannot generate new data. A vision model in doubt can photograph more cats; a backtest has only one history of the markets, and every strategy tested on it "wears out" a little more of its value as evidence. The historical record is a non-renewable resource.

On top of these traps sits survivorship bias: historical databases often contain only the companies and funds that survived, bankruptcies and closures have dropped out. A strategy tested on survivors alone looks mechanically better than it would have performed in real time, since its test ground has been purged of the disasters. Testing a strategy on a purged history is like judging the danger of a sea crossing by interviewing only the ships that made it back to port.

A reading reflex

Faced with a document (a paper or a sales pitch) that shows off a strategy's past performance, the right questions are: how many variants were tried before this one? Was the rule frozen before being tested on a period never touched during development? Without answers to those two questions, a backtest curve proves nothing. And one simple principle: the more spectacular a past performance, the more likely the explanation is "selection of the luckiest draw".

The practitioners' defence: out-of-sample discipline

Serious teams know all this and impose guardrails on themselves, all resting on the same idea: evidence only counts on data never touched during design. Concretely: freeze the rule in writing before testing it on a period locked away from the start (the "out-of-sample" period (outside the sample used to build the strategy); move forward window by window) design on past years, test on the following year, slide, repeat; honestly count every variant tried, including the discarded ones, to gauge how much of the final champion is luck; and finally watch the strategy run in real conditions, without money, before any deployment.

None of this is specific to finance, it is the same hygiene as the train/validation/test split of the overfitting lesson, and the same spirit as the pre-registration of clinical trials: announce what you will measure before looking at the data. Finance has simply elevated it into a survival discipline, because it is the field where cheating yourself costs the most.

What machine learning actually does in finance

After this dark picture, a paradox: finance is one of the world's largest employers of machine learning. That is because most of the useful work does not consist of predicting tomorrow's price. Where the models genuinely deliver is where there is signal:

  • Microstructure and execution. When a fund manager must buy a very large quantity of a stock, executing it in one block would push the price up against them. Splitting the order, choosing the moment and venue of each slice: that is an optimisation problem over very high-frequency data, where the mechanical regularities of the order book (how the price reacts to an order) offer real signal, you are predicting the effect of your own actions over the next seconds, not the market's direction next month.
  • Fraud detection. Spotting the transaction that does not match a customer's usual behaviour: this is exactly the anomaly detection of the previous lesson, and the signal there is real, fraudulent use is objectively different from the account holder's behaviour.
  • Document and sentiment analysis. Annual reports, central-bank statements, earnings-call transcripts, news feeds: large language models read and summarise volumes of text no human team can cover. The model is not predicting the market; it is extracting and structuring textual information, its actual competence.
  • Risk management. Estimating how a portfolio would behave under various adverse scenarios, aggregating exposures, simulating shocks. You are not predicting what will happen; you are mapping what would hurt, an essential nuance, and a far more robust one.
  • Credit scoring. Estimating the probability that a borrower repays, from their past behaviour. Here the signal exists (repayment behaviour has durable regularities) and the market does not adapt against the model, but it is the most tightly regulated use case of all, as we will see below.

The common thread: these uses exploit mechanical or behavioural regularities (how the order book works, a fraudster's habits, the structure of an annual report, repayment behaviour), not the future direction of prices. The fantasy of "the model predicts tomorrow's price" runs head-first into the three walls of the first section.

The invention-disclosure point of view

This split reads directly in what the sector actually builds: solid systems in finance rarely claim to "predict the market" (an unverifiable, fragile assertion) but target the infrastructure: processing massive real-time streams, detecting fraud, executing orders, securing transactions, explaining a model's decisions. A product claiming price prediction deserves immediate scepticism; a product describing a measurable processing mechanism is an entirely different object.

Don't large language models change the game?

Partly, but not where people imagine. A large language model brings a genuinely new capability: reading, cross-referencing and summarising masses of text, which is exactly the "document analysis" use above, where its value is solid. The adversarial argument, however, applies to it as to everything else: if every market participant has comparable models read the same statements, the extracted information reaches the prices just as fast for everyone, and each player's edge erodes. The tool moves the starting line; it does not suspend the rules of the game. As for asking an LLM "what the market will do tomorrow", that amounts to quizzing an excellent reader about a coin toss: quality of reading does not create signal where there is none.

Regulatory caution: models that must answer for themselves

One final specificity: finance is a tightly regulated industry, and that shapes which models can be deployed in it.

Regulators and internal model-risk practices typically require that models driving important decisions, granting credit, computing capital requirements, be explainable (able to say why a given decision was made, notably to the customer whose loan is refused), independently validated (a team separate from the one that built the model must challenge it before it goes into production), documented and monitored over time. A giant neural network whose individual decisions nobody can justify collides head-on with these requirements, one reason simple, transparent models survive in finance long after being outperformed elsewhere on raw accuracy.

Monitoring over time is no formality: a model validated today degrades as the world changes, non-stationarity, once again. Hence the obligation to track its performance continuously and revalidate it periodically, exactly as one recalibrates a measuring instrument.

What this page is not

This page describes a technical domain; it contains no investment advice, and this course never will. If one practical lesson had to be drawn from it, it would be precisely this: extreme caution before any promise of market prediction, especially one resting on a curve of past performance.

Leaving this page

Finance is the extreme case, but its lessons travel. Backtest overfitting, survivorship bias, multiple comparisons, collapse at regime change: each of these traps exists, in milder form, in every evaluation of a model on historical data, recommendation, advertising, maintenance, medicine. Learning to spot them here, where they are at their most violent, equips you to spot them everywhere. Which is the right way to close this module: the domain that breaks the tools is also the one that best teaches how to test them.

Key points

  1. Finance is the edge case: the only domain in the module where the predicted system reacts to the predictions, the weather does not read forecasts, the market does.
  2. Three walls: a very low signal-to-noise ratio (the model learns the noise), permanent non-stationarity (regimes change; learned correlations collapse in a crisis), and an adversarial character (any exploited pattern erodes, the efficient markets argument).
  3. Backtest overfitting: testing a thousand strategies on the same history guarantees that one will look miraculous by pure chance, multiple comparisons plus overfitting, aggravated by a single, non-renewable historical record.
  4. What machine learning really does: order execution and microstructure, fraud detection, document reading with LLMs, risk mapping, mechanical and behavioural regularities, not predicting tomorrow's price.
  5. LLMs move the starting line without suspending the rules of the game: precious for reading documents, they create no signal where there is none.
  6. The regulatory constraint: explainability, independent validation and continuous monitoring are required for important decisions, which keeps simple, transparent models alive.
  7. The reflex for any dossier: ask how many variants were tested and whether the rule was frozen before the final test; a curve of past performance, on its own, proves nothing.
Check your understanding0 / 5

1. What sets a market series apart from every other series in the module, per the weather forecaster story that opens the page?

2. A thousand variants of a rule are tested on the same history and the best one is kept. Why does its past track record prove nothing?

3. What is survivorship bias, and why does it distort the evaluation of a strategy on historical data?

4. Finance is a massive employer of machine learning. What, per the page, do the uses that actually work rest on?

5. Why do simple, transparent models survive in finance long after being outperformed elsewhere in raw accuracy?