Finding the rhythm
in a time series
Next Turn applies digital signal processing to financial time series: it looks for repeating waves inside the series, measures how clearly each one stands out from noise, and follows where it is in its cycle. Here is the idea as a short film, then step by step with a little mathematics.
A market is a time series
Every day the market sets a new value, and over time those values draw a jagged line. There may be a rhythm in it, but the eye cannot tell how long it is or where it stands today.
Take the trend away
First the long drift is removed, so the line swings around a flat level. The noise is still there, because nothing can tell it apart from the rhythm yet.
A wavelet scans the time series
A small wave slides along the line, tried at every length. Wherever it fits well, the map lights up. This map is the scalogram.
Each bright band becomes a wave
Each bright band marks a rhythm in the series, and each one becomes a smooth wave of its own length. Unlike the jagged line, a smooth wave can be extended past today.
Add them up: the projection
Added together, the waves form a single rhythm. Extended past today, it shows where the series would go if the rhythm holds.
When the next turn would come
Yes, there is a rhythm, and it can be projected into the future. Its first turn after today is the next turn, and the shaded window around it shows how early or late turns have typically come. A measurement, not a promise.
A time series is many waves added together
Any series can be written as a sum of waves of different lengths, each with its own size and timing, plus whatever is left over. A cycle is one of those waves that keeps coming back.
Pk is a wave's length in trading days (one value per trading day), Ak its size, φk its timing, and ε everything that is not a wave. Switch the waves on and off and watch the sum change.
Signal, or noise?
Pure noise also wiggles, and the eye finds cycles in it everywhere. So a cycle only counts if it is stronger than what noise alone would produce at the same length. That ratio is its strength.
Power at length P, divided by the power noise would give there. Add noise and watch a clear cycle of 60 trading days sink into it.
Why wavelets, not just Fourier
The Fourier transform (FFT) tells you which cycle lengths a series contains, but averaged over all of time. Markets change: a cycle can run for two years and then fade.
A wavelet is a short, localised wave. Sliding it along the series at every length gives strength over time and cycle length together: the scalogram.
Below, a cycle of 30 trading days lives in the first half and one of 100 trading days in the second. Fourier finds both but cannot say when. The scalogram shows exactly when each one was alive. Hover or tap it to read time and cycle length.
Phase: where in the cycle are we?
The wavelet's answer is a complex number. Its size is the cycle's strength; its angle, the phase, is where the cycle is right now. One full turn of the angle is one full cycle.
The arm turns at the cycle's own speed. Its angle is the dot on the wave, and it is what the phase figure on the charts page is built from.
The edge: what cannot be known yet
A wavelet looks at data on both sides of each bar. Deep in the past that is fine. Near today, half of its window has nothing in it yet: the future has not happened. The zone where that matters grows with the cycle's length.
So past turns are found with hindsight, the last stretch before today is provisional, and everything after today is a projection of the wave, not a prediction of the market. That is why the charts page marks the most recent turn as provisional, draws the projection dotted, and puts a shaded box around each projected turn: how early or late such turns have typically come — measured from past turns; the windows of later turns are wider and estimated.
What this is, and what it isn't
It is a measurement: which cycles a series contains, how clearly, and where each one stands. It is not a trading system and not advice. Cycles drift, fade and appear, and a projected turn may come early, late, or be overrun by a strong trend.
See it on SPYFurther reading: C. Torrence & G. P. Compo, A Practical Guide to Wavelet Analysis, Bulletin of the American Meteorological Society 79 (1998). S. Mallat, A Wavelet Tour of Signal Processing, 3rd ed., Academic Press (2009).
FAQ: plain answers about Next Turn — what a cycle is, why the date moves, which markets are free.