Under geometric Brownian motion, the log-price increment ln(ST/K) has a known characteristic function. Rather than working with the probability density directly, we exploit the fact that any density f(x) on a finite interval [a,b] admits a Fourier cosine expansion
f(x)=b−a2k=0∑∞′Akcos(b−akπ(x−a)),
where the prime denotes that the first term is halved, and
Ak=∫abf(x)cos(b−akπ(x−a))dx.
The key insight is that Ak can be recovered from the characteristic function ϕ(u)=E[eiux] without knowing f explicitly:
Ak≈Re[ϕ(b−akπ)e−ib−akπa].
For the GBM model, the characteristic function of x=ln(ST/K) is
ϕ(u)=exp[iu(r−21σ2)τ−21σ2τu2].
The cosine expansion converges rapidly for smooth densities. With only a handful of terms, the standard normal density is already well approximated.Standard normal density reconstructed using the Fourier cosine expansion with $N = 2, 4, 8, 16, 32, 64$ terms. The approximation converges to the true density as $N$ increases.
Chi and Psi Coefficients
The option price requires computing the inner product of the density coefficients Fk with the payoff coefficients Vk. The payoff coefficients decompose into two integrals, χk and ψk, that can be evaluated in closed form.
The χk coefficient captures the exponential part of the payoff:
The integration limits (c,d) depend on the option type: (0,b) for calls and (a,0) for puts.
Truncation Range
The cosine expansion requires a finite domain [a,b]. This range must be wide enough to capture the mass of the density, but not so wide that the cosine basis functions oscillate excessively relative to the number of terms N.
Two formulations appear in the literature. The first centres the range on the forward:
a,b=ln(S0/K)+rτ∓Lσ2τ,
and the second uses the first cumulant (the mean of the log-price increment):
a,b=ln(S0/K)+(r−21σ2)τ∓Lσ2τ,
where L controls the number of standard deviations included. Both formulations converge, but the cumulant-based formula places the interval symmetrically around the true mean of the distribution, which leads to faster convergence at moderate N.
The COS Pricing Formula
Combining the density and payoff coefficients, the discounted option price is
The computational cost is O(N) per option price: all N terms involve elementary trigonometric and exponential evaluations with no matrix inversions or root-finding. This makes the COS method substantially faster than PDE or Monte Carlo methods for European-style contracts.
Results
Price vs Spot
With K=100, r=0.03, T=1, σ=0.40, the COS price is compared against the analytical Black-Scholes price across a range of spot values. At N=16 terms, the approximation deviates noticeably for deep out-of-the-money options where the truncation range [a,b] (width 2LσT≈9.6 with L=12) demands more basis functions to resolve. At N=64, the COS price is indistinguishable from the analytical result.European call price as a function of spot price $S_0$: COS method with $N = 16$ and $N = 64$ terms (dashed) versus the analytical Black-Scholes price (solid). With $N = 64$, the two curves overlap.
Convergence of the Relative Error
The relative error ∣VCOS−VBS∣/VBS decreases exponentially as the number of terms N grows, reaching machine precision around N=65 for a standard GBM parameterisation (S0=100, K=110, r=0.04, T=1, σ=0.30).
With L=12, both truncation formulas converge at nearly the same rate. The difference between their centres (0.5σ2τ) is small relative to the total range width (2Lστ), so the effect of mis-centring is negligible. With a smaller L, the cumulant-based formula would show a more pronounced advantage.Relative pricing error as a function of $N$ for the two truncation range formulas. Both converge exponentially to machine precision.
Value Convergence
The raw option value oscillates at small N but stabilises rapidly. For the at-the-money case (S0=K=100, r=0.03, T=1, σ=0.40), the oscillations decay and both truncation formulas settle on the analytical value by N≈25.COS call value as a function of $N$ for both truncation range formulas, with the analytical Black-Scholes value shown as a dashed line. Both formulas converge by $N \approx 25$.