Page 1 of 1

The Ljung-Box test: checking whether returns, or trade results, have any memory at all

Posted: Tue Nov 24, 2026 4:08 pm
by Shadow Trader
A lot of short-term strategies quietly assume returns have memory: a move is more likely to continue, or more likely to snap back. The Ljung-Box test is one of the standard ways to check that assumption. It takes the autocorrelations of a series up to some lag, say the first ten, and asks whether they are jointly different from zero, rather than testing each lag on its own and getting fooled by one that looks significant by chance.

Applied to raw M1 forex prices there's a trap. If the chart is built from bid prices, or from last-quote prices that bounce between bid and ask, you'll often find negative autocorrelation at lag one. That's not a tradeable mean reversion; it's mostly quotes jumping across the spread. Running the test on mid prices usually shrinks the effect a lot, and that comparison is informative in itself.

The more useful place to apply it, arguably, is to your own trade results. Take the sequence of R-multiples in the order they happened and test them. If there's significant autocorrelation, results cluster in a way you could exploit or protect against, perhaps by scaling down after a bad patch. If there isn't, rules like "stop after two losses" are emotional risk control rather than a response to any real pattern, which is fine, but it's worth knowing which one you have.

A couple of cautions. The test has low power on small samples, so "no significant memory" from 80 trades doesn't prove there's none. And the choice of how many lags to include changes the answer, so pick it before you look rather than after.

Does anyone test their trade sequences for autocorrelation, or is it more common just to eyeball the equity curve for streaks?