Markets coveredMatch OddsCorrect ScoreOver / UnderFirst HalfSecond Half
Statometrics
Model Library · Bayesian methods and time series

Spectral Analysis

Break a price or volume series into repeating cycles to see whether any regular rhythm exists, such as the serve-by-serve swing in tennis.

Advancedtradingin-playevaluation

In one sentence

Spectral analysis splits a time series into cycles of different lengths and measures how much of the movement each cycle explains, revealing any regular rhythm hidden in the noise.

How it works

Any series, whether a price, traded volume or goals per week, can be rebuilt as a sum of waves of different lengths. Spectral analysis runs that process in reverse: it takes the series and reports how strong each wave length is. The chart of strength against cycle length is called a periodogram.

A pure random walk shows no standout peak. A series with a real rhythm shows a clear spike at that rhythm's length. In betting, candidates include the serve alternation in tennis, weekly patterns in traded volume, and time-of-day effects in trading activity.

For most punters this is a niche tool. Its main uses are confirming that a suspected cycle exists and checking whether a "pattern" in price moves is anything more than noise. It rarely leads directly to a profitable trade, because regular cycles are exactly what markets price in.

The maths

The periodogram at frequency f:

I(f)=1n∣∑t=1n(xt−xˉ) e−2πift∣2I(f) = \frac{1}{n}\left| \sum_{t=1}^{n} (x_t - \bar{x})\, e^{-2\pi i f t} \right|^2
  • xₜ: the series value at step t, for example the change in implied probability after each game.
  • x̄: the average of the series.
  • n: the number of observations.
  • f: frequency in cycles per step; the cycle length is 1 ÷ f.
  • I(f): how much of the series' variation is explained by a wave at that frequency.

In plain English: for each possible cycle length, measure how well a wave of that length lines up with the data, and look for lengths that stand out.

Worked betting example

In a tennis match with no breaks of serve, you record the change in Player A's implied win probability after each of 8 games: +4, −3, +5, −4, +3, −5, +4, −3 percentage points. A's price shortens a little when A holds and drifts a little when B holds.

  1. Periodogram. Computing it at the four possible frequencies (0.125, 0.25, 0.375 and 0.5 cycles per game), about 98% of the variation sits at 0.5 cycles per game, a cycle length of 2 games. Serve alternation is the rhythm.
  2. Can you trade it? Before A serves, A is 2.00 (50%). Suppose A holds 75% of the time; a hold moves A to 54% (1.85). For the price to be fair, a break must move A down to 38% (about 2.64), because 0.75 × 4 = 0.25 × 12.
  3. Back £50 at 2.00, trade out after the game. Hold: lay £54.05 at 1.85 for +£4.05. Break: lay £37.88 at 2.64 for minus £12.12.
  4. Expected value. Before commission: 0.75 × £4.05 minus 0.25 × £12.12 ≈ +£0.01, effectively zero. After 2% commission on winning trades: 0.75 × £4.05 × 0.98 minus 0.25 × £12.12 ≈ minus £0.05.

The rhythm is real and spectral analysis finds it, but a fair market already prices it. The edge only appears if your hold probability is better than the market's, and that comes from a player model, not from the cycle.

Where it's good

  • Confirming or rejecting suspected cycles in price moves before building a strategy around them.
  • Understanding traded-volume patterns by time of day or day of week, to schedule trading bots.
  • Checking model residuals: leftover periodic structure means your model has missed something.
  • Seasonal patterns in long series, such as goals per matchweek across seasons.

Limitations and pitfalls

  • Needs long, evenly spaced series. Betfair markets are short and trade irregularly, which blurs or fakes peaks.
  • Assumes the series' behaviour does not change over time; pre-match and in-play markets change character constantly.
  • With many frequencies to check, some peaks appear by chance; test against a random-walk baseline.
  • A detected cycle is usually already priced. Predictable does not mean profitable.
  • Tennis cycles break on every break of serve and tiebreak, so the neat pattern holds only in stretches.
  • Rarely useful for pre-match football or racing pricing; most bettors can safely skip it.

How to build it

  • scipy.signal.periodogram or welch; numpy.fft for the raw calculation; spectrum() in R.
  • Data: evenly spaced series (resample irregular Betfair trades to fixed intervals first).
  • Practical tip: compare your periodogram with one from a shuffled copy of the same series; only peaks well above the shuffled version are worth a second look.
18+ only. Educational content, not financial or betting advice. Past results do not guarantee future returns. If gambling stops being fun, get free, confidential help at BeGambleAware.org.
Members