Trade Predictor - ARIMA vs LSTM for Price Forecasting: Which Actually Works?
AI & Machine Learning

ARIMA vs LSTM for Price Forecasting: Which Actually Works?

One is a statistical workhorse from the 1970s, the other a neural network. They fail in completely different ways, and knowing which is which matters more than picking a winner.

Comparison of ARIMA and LSTM forecasting curves against real price data

Most explanations of LSTMs either drown you in matrix notation or hand-wave with "it remembers things". Neither helps you judge whether the output is trustworthy. Here is the middle ground.

The problem LSTMs were built to solve

A plain recurrent network processes a sequence one step at a time, passing a hidden state forward. In theory it can carry information indefinitely. In practice, gradients shrink as they propagate backwards through time, so the network effectively forgets anything more than a handful of steps back. This is the vanishing gradient problem.

LSTMs fix it with an explicit memory line, called the cell state, that runs through the whole sequence with very little interference. Information can travel a long way along it without being repeatedly multiplied down to nothing.

What the three gates do

Each step, the cell decides three things:

  • Forget gate — how much of the existing memory to discard. On price data this often learns to flush memory after a volatility spike, because pre-spike context stops being relevant.
  • Input gate — how much of the current observation to write into memory. Not every candle deserves storage.
  • Output gate — how much of the memory to expose as this step's prediction.

These gates are learned, not hand-coded. The network works out from data when to remember and when to reset.

What actually goes in

Feeding raw closing prices is one of the most common mistakes. Price levels are non-stationary: a model trained when an asset was at 100 has no useful basis for one at 400. Most working systems feed returns rather than prices, often alongside volume, realised volatility and momentum measures, all scaled to comparable ranges.

Sequence length is the other decision. Too short and the model cannot see the pattern you care about. Too long and it drowns in irrelevant history and trains far more slowly. Sixty periods is a common starting point, but the right answer depends on what horizon you are forecasting.

Where it goes wrong

An LSTM that produces a chart hugging the real price almost perfectly is usually not a triumph. It is usually a model that has learned to predict "roughly today's value" — a one-step lag dressed up as a forecast. The tell is that the prediction line looks like the price line shifted right by one period.

If your forecast looks too good, check whether it is simply repeating the last known value.

The other classic failure is leakage: scaling your data before splitting it, so information from the test period bleeds into training. The backtest then measures memory rather than foresight.

What a well-built LSTM gives you

Not certainty. A directional estimate with an honest confidence attached, which is stronger in trending, liquid conditions and weaker around unexpected news. Used as one input among several, that is genuinely useful. Used as an oracle, it will eventually be expensive.

This article is educational and does not constitute financial advice. Trading involves substantial risk of loss.

Share

See the models in action

Reading about forecasting is one thing. Create a free account and get 5 AI predictions a month — no card required.

Start free

Keep reading

All articles