The Fast Fourier Transform Algorithm
A clever algorithmic shortcut that computes the same result as a direct Fourier transform but in a fraction of the time — the reason option-pricing methods that integrate over frequencies are fast enough to run in production.
Prerequisites: Big-O Complexity
Pricing an option via the Carr-Madan method, or de-noising a high-frequency price series, requires computing a discrete Fourier transform — decomposing a sequence of numbers into a combination of oscillating frequencies. Computed the obvious way, this costs operations: for , that's a trillion operations, far too slow for a calibration loop. The Fast Fourier Transform (FFT) computes the mathematically identical result using a clever recursive trick, in only operations — roughly 20 million for the same million points, a difference of five orders of magnitude.
An analogy: sorting mail by splitting the pile in half, recursively
Imagine having to sort a huge pile of mail by zip code, and instead of comparing every letter to every other letter (which gets slow fast as the pile grows), you split the pile into two smaller piles based on one digit, sort each smaller pile the same way (splitting it again), and merge the sorted results back together. This "divide, solve the smaller pieces, recombine" pattern is dramatically faster than brute-force pairwise comparison once the pile is large, because the work per split is small and the number of splits needed grows only logarithmically. The FFT applies exactly this divide-and-recombine idea to computing a Fourier transform, splitting the problem in half at each level of recursion.
The math, one piece at a time
The discrete Fourier transform of a sequence produces output values:
In words: each output is a weighted sum of all input points, where the weights are complex numbers tracing out a specific oscillation (frequency ) — computing it directly for all costs multiplications for each of outputs, giving total. The FFT (assuming is a power of 2, for the classic version) observes that the sum for can be split into a sum over the even-indexed inputs and a sum over the odd-indexed inputs:
In plain English: computing the size- transform reduces to computing two size- transforms and combining them with a small amount of extra work — and each of those can, in turn, be split the same way into size- transforms, recursively, down to trivially small pieces. This recursive halving is what turns into : there are levels of splitting, each doing total combination work.
Worked example 1: counting operations by hand
For points: direct DFT costs on the order of operations. FFT costs on the order of operations — about 100x fewer, for the exact same mathematical output. For (rounding to the nearest power of 2, roughly ): direct DFT is on the order of operations, FFT is on the order of — a 50,000x speedup, which is the difference between a calculation finishing in milliseconds versus taking hours.
Worked example 2: a tiny 4-point FFT by hand
Sequence , . Split into evens and odds . The 2-point DFT of is ; of is . Combining with the twiddle factors for (): , , , . This matches direct computation exactly, but was assembled from two trivial 2-point transforms plus a small combination step — the same pattern that, scaled up recursively, produces the full speedup.
What this means in practice
The FFT is what makes Fourier-based option pricing methods (Carr-Madan and related characteristic-function techniques) fast enough for real calibration workflows, where an entire volatility surface's worth of strikes is priced from one FFT call rather than one integral per strike. It also underlies spectral analysis of price series, fast convolution (used in some volatility and correlation estimation routines), and any signal-processing task applied to market data. Whenever a computation involves a discrete Fourier transform on more than a few hundred points, using an FFT implementation rather than a direct sum is close to mandatory for production speed.
The FFT computes exactly the same result as a direct discrete Fourier transform, using a recursive divide-and-combine strategy that splits the problem in half repeatedly — this reduces the cost from to , a difference that becomes enormous (often many orders of magnitude) as grows into the thousands or millions.
The classic mistake is assuming the FFT computes something mathematically different or approximate compared to the direct DFT — it doesn't. The FFT is an exact algorithmic optimization, not an approximation; both methods produce the identical output up to floating-point rounding. The only real caveat is that the classic radix-2 FFT requires to be a power of 2 for the clean recursive split to work directly — inputs of other lengths need either zero-padding to the next power of 2 (which changes the frequency resolution) or a more general mixed-radix FFT variant, and forgetting this can lead to silently misinterpreting padded output frequencies as real data.
Practice in interviews
Further reading
- Cooley & Tukey, An Algorithm for the Machine Calculation of Complex Fourier Series
- Press et al., Numerical Recipes, ch. 12