Quant Memo
Advanced

The Periodogram and Spectral Density

A way to re-view a time series not as a sequence over time but as a mixture of hidden cycles of different lengths — so a repeating pattern in the data shows up as a spike you can point to, instead of something you have to spot by eye.

Prerequisites: Autocorrelation and Serial Correlation, Stationarity

Some patterns in a time series are easy to see by eye — a trend, an obvious weekly cycle. Others are buried: a faint 22-day rhythm in a volatility series, mixed in with noise so much larger than the signal that no amount of staring at the raw plot will reveal it. The periodogram is a change of lens: instead of plotting the series against time, it plots how much of the series' total variance is attributable to cycles of each possible length. A hidden 22-day rhythm that's invisible in the time plot becomes an unmistakable spike at the corresponding frequency in the periodogram. It's the same information, decomposed differently — and the decomposition is where the invisible becomes visible.

An analogy: unmixing a chord into its notes

If you hear a chord — several musical notes played together — your ear registers one complex sound, not three separate pitches you could name on demand. A spectrum analyzer, though, takes that same sound wave and shows you exactly which frequencies are present and how loud each one is: three clean spikes at the three notes' frequencies, out of what looked like one messy waveform. A time series is the audio waveform; the periodogram is the spectrum analyzer. A series that "looks like noise" over time can still be, underneath, a mixture of a few dominant cycles plus genuine randomness — and the periodogram is what separates the notes from the noise.

series over time spike: dominant cycle frequency
The time-domain series (left) looks like undifferentiated wiggle. Recomputed as a periodogram (right) — power at each frequency — one frequency clearly dominates: a hidden cycle the eye couldn't isolate in the original plot.

The tool, one symbol at a time

Let yty_t, t=1,,nt = 1, \dots, n, be the series, and let ω\omega ("omega") be a candidate frequency, measured in cycles per observation (so ω=1/22\omega = 1/22 means "one full cycle every 22 observations"). The periodogram at frequency ω\omega is

I(ω)=1nt=1nytei2πωt2.I(\omega) = \frac{1}{n}\left| \sum_{t=1}^{n} y_t\, e^{-i2\pi\omega t} \right|^2 .

In words: for each candidate frequency, correlate the series against a pure sine/cosine wave oscillating at exactly that frequency (that's what the complex exponential ei2πωte^{-i2\pi\omega t} does — it's a rotating unit vector, and multiplying by it and summing measures how well the series lines up with a wave of that frequency); square the result to get a power, and divide by nn to normalize. You never have to touch complex numbers to use this: what matters is that I(ω)I(\omega) is large exactly when the series contains a strong component oscillating at frequency ω\omega, and near zero when it doesn't.

The periodogram is a noisy, sample estimate of a theoretical target called the spectral density, f(ω)f(\omega), which is the frequency-domain twin of the autocorrelation function:

f(ω)=k=ρkei2πωk.f(\omega) = \sum_{k=-\infty}^{\infty} \rho_k\, e^{-i2\pi\omega k} .

In words: the spectral density is built directly from the autocorrelations ρk\rho_k at every lag kk — it's the same information as the ACF, just repackaged by frequency instead of by lag. A series with strong, slowly-decaying autocorrelation (an AR(1) with ϕ\phi near 1) has a spectral density concentrated at low frequencies — long, slow cycles dominate. A series with autocorrelation that flips sign every lag has its spectral density concentrated at high frequencies — fast, choppy oscillation dominates.

The periodogram takes the same variance a time plot shows you and sorts it by cycle length instead of by date. A hidden periodic pattern — seasonal, calendar-driven, mechanical — shows up as an unmistakable spike, even when it's completely invisible by eye in the raw series.

Worked example 1: finding a hidden weekly cycle by hand (mini version)

Take a toy series of 8 observations with a faint alternating pattern buried in noise: y=[1,3,0,4,1,3,0,4]y = [1, 3, 0, 4, 1, 3, 0, 4] — an exact period-4 cycle (values repeat every 4 steps), no noise added, to make the arithmetic checkable by hand. The mean is yˉ=2.0\bar y = 2.0; demeaned: [1,1,2,2,1,1,2,2][-1, 1, -2, 2, -1, 1, -2, 2]. Test frequency ω=1/4\omega = 1/4 (one cycle per 4 steps). At integer multiples of a quarter-turn, ei2πt/4e^{-i2\pi t/4} cycles through 1,i,1,i,1,i,1,i1, -i, -1, i, 1, -i, -1, i for t=1,,8t=1,\dots,8. The real part of the sum ytcos(2πt/4)\sum y_t \cos(2\pi t/4): at t=1t=1 (cos=0\cos = 0): 00; t=2t=2 (cos=1\cos=-1): (1)=1-(1)=-1; t=3t=3 (cos=0\cos=0): 00; t=4t=4 (cos=1\cos=1): 22; and the pattern repeats for t=5t=588 giving another 1+0+2-1+0+2 from the demeaned values... rather than trace every term, the key fact anyone can verify by eye is simpler: the series is exactly the 4-step pattern [1,1,2,2][-1,1,-2,2] repeated twice, so it aligns perfectly with a period-4 wave and no other. Computing I(ω)I(\omega) across candidate frequencies ω=1/8,2/8,3/8,4/8\omega = 1/8, 2/8, 3/8, 4/8 and finding the largest value lands exactly at ω=2/8=1/4\omega = 2/8 = 1/4 — the periodogram recovers the period-4 cycle exactly, because that's the only frequency the data actually contains.

Worked example 2: reading spectral concentration from an AR(1)'s ACF

An AR(1) with ϕ=0.9\phi = 0.9 (strong persistence) has autocorrelations ρk=0.9k\rho_k = 0.9^k: ρ1=0.9\rho_1 = 0.9, ρ2=0.81\rho_2 = 0.81, ρ3=0.729\rho_3 = 0.729, decaying slowly. Plugging into the spectral density formula, the low-frequency value works out (using the closed form f(ω)=σ2/(12ϕcos(2πω)+ϕ2)f(\omega) = \sigma^2/(1 - 2\phi\cos(2\pi\omega) + \phi^2)) to f(0)=1/(12(0.9)(1)+0.81)=1/(0.01)=100f(0) = 1/(1-2(0.9)(1)+0.81) = 1/(0.01) = 100 at ω=0\omega=0 — a huge concentration of power at the lowest frequency, meaning the series is dominated by slow, trend-like movement. At the highest frequency ω=0.5\omega = 0.5: f(0.5)=1/(12(0.9)(1)+0.81)=1/(1+1.8+0.81)=1/3.61=0.277f(0.5) = 1/(1-2(0.9)(-1)+0.81) = 1/(1+1.8+0.81) = 1/3.61 = 0.277 — almost no power in fast oscillation. Contrast an AR(1) with ϕ=0.9\phi = -0.9 (alternating): the same formula flips the concentration to ω=0.5\omega = 0.5, giving f(0.5)=100f(0.5)=100 and f(0)=0.277f(0)=0.277 — power concentrated in the fastest possible oscillation, matching a series that flips sign almost every step.

Distribution · normal
-2.000.002.00μvalue →
Within ±1σ 68.3%mean μ 0.00std σ 1.00

Under the null of pure white noise, periodogram ordinates at different frequencies are (asymptotically) independent draws proportional to a chi-squared distribution — no frequency should stand out from the others, which is the baseline you're comparing a suspected spike against.

What this means in practice

  • Detecting seasonality and calendar effects. A spike at ω=1/5\omega = 1/5 in daily trading data (a 5-day cycle) points at day-of-week effects; a spike at 1/2521/252 points at annual seasonality — frequencies you can then encode directly as dummy variables or seasonal ARIMA terms.
  • Volatility clustering shows up as low-frequency power. Realized volatility series typically have spectral density concentrated at low frequencies — slow-moving vol regimes — which is the frequency-domain signature of long-memory-like behavior.
  • Smoothing the periodogram matters. The raw periodogram is a very noisy estimator of the true spectral density (its variance doesn't shrink as nn grows) — practitioners smooth it by averaging neighboring frequencies before trusting any single spike.
  • Market microstructure noise pollutes high frequencies. In tick-level data, bid-ask bounce inflates power at the very highest frequencies, unrelated to any real signal — this is exactly the problem realized volatility estimators have to correct for.

The classic confusion: treating a large periodogram value at one frequency as automatically meaningful. The raw periodogram is an extremely noisy estimate — even pure white noise produces jagged periodograms with some frequencies looking much larger than others purely by chance, and that noise does not shrink as you add more data (only averaging or smoothing reduces it). A single tall spike in a short, unsmoothed periodogram is exactly what pure randomness looks like some of the time; it takes either a formal significance test (comparing the spike to its expected size under white noise) or a plausible mechanical reason for that specific frequency (a known 5-day trading week, a known settlement cycle) before you should trust it as a real cycle.

Related concepts

Practice in interviews

Further reading

  • Hamilton, Time Series Analysis, ch. 6
  • Shumway & Stoffer, Time Series Analysis and Its Applications, ch. 4
ShareTwitterLinkedIn