The COS Method for Option Pricing

Characteristic Function Approach

Under geometric Brownian motion, the log-price increment ln(ST/K)\ln(S_T/K) has a known characteristic function. Rather than working with the probability density directly, we exploit the fact that any density f(x)f(x) on a finite interval [a,b][a, b] admits a Fourier cosine expansion

f(x)=2bak=0Akcos ⁣(kπ(xa)ba), f(x) = \frac{2}{b - a} \sum_{k=0}^{\infty}{}' A_k \cos\!\left(\frac{k\pi(x - a)}{b - a}\right),

where the prime denotes that the first term is halved, and

Ak=abf(x)cos ⁣(kπ(xa)ba)dx. A_k = \int_a^b f(x) \cos\!\left(\frac{k\pi(x - a)}{b - a}\right) dx.

The key insight is that AkA_k can be recovered from the characteristic function ϕ(u)=E[eiux]\phi(u) = \mathbb{E}[e^{iux}] without knowing ff explicitly:

AkRe ⁣[ϕ ⁣(kπba)eikπaba]. A_k \approx \operatorname{Re}\!\left[\phi\!\left(\frac{k\pi}{b - a}\right) e^{-i\frac{k\pi a}{b - a}}\right].

For the GBM model, the characteristic function of x=ln(ST/K)x = \ln(S_T/K) is

ϕ(u)=exp ⁣[iu ⁣(r12σ2) ⁣τ12σ2τu2]. \phi(u) = \exp\!\left[iu\!\left(r - \tfrac{1}{2}\sigma^2\right)\!\tau - \tfrac{1}{2}\sigma^2\tau\, u^2\right].

The cosine expansion converges rapidly for smooth densities. With only a handful of terms, the standard normal density is already well approximated.

Normal density reconstruction via cosine series
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 FkF_k with the payoff coefficients VkV_k. The payoff coefficients decompose into two integrals, χk\chi_k and ψk\psi_k, that can be evaluated in closed form.

The χk\chi_k coefficient captures the exponential part of the payoff:

χk(c,d)=cdexcos ⁣(kπ(xa)ba)dx=11+uk2[cos(uk(da))edcos(uk(ca))ec+uksin(uk(da))eduksin(uk(ca))ec], \chi_k(c, d) = \int_c^d e^x \cos\!\left(\frac{k\pi(x - a)}{b - a}\right) dx = \frac{1}{1 + u_k^2}\left[\cos(u_k(d - a))\,e^d - \cos(u_k(c - a))\,e^c + u_k\sin(u_k(d - a))\,e^d - u_k\sin(u_k(c - a))\,e^c\right],

where uk=kπbau_k = \frac{k\pi}{b - a}.

The ψk\psi_k coefficient captures the constant part:

ψk(c,d)=cdcos ⁣(kπ(xa)ba)dx={dck=0sin(uk(da))sin(uk(ca))ukk>0. \psi_k(c, d) = \int_c^d \cos\!\left(\frac{k\pi(x - a)}{b - a}\right) dx = \begin{cases} d - c & k = 0 \\ \frac{\sin(u_k(d - a)) - \sin(u_k(c - a))}{u_k} & k > 0. \end{cases}

The integration limits (c,d)(c, d) depend on the option type: (0,b)(0, b) for calls and (a,0)(a, 0) for puts.

Truncation Range

The cosine expansion requires a finite domain [a,b][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 NN.

Two formulations appear in the literature. The first centres the range on the forward:

a,b=ln(S0/K)+rτLσ2τ, a, b = \ln(S_0/K) + r\tau \mp L\sqrt{\sigma^2 \tau},

and the second uses the first cumulant (the mean of the log-price increment):

a,b=ln(S0/K)+(r12σ2)τLσ2τ, a, b = \ln(S_0/K) + \left(r - \tfrac{1}{2}\sigma^2\right)\tau \mp L\sqrt{\sigma^2 \tau},

where LL 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 NN.

The COS Pricing Formula

Combining the density and payoff coefficients, the discounted option price is

V=erτk=0N1FkVk, V = e^{-r\tau} \sum_{k=0}^{N-1}{}' F_k \cdot V_k,

where

Fk=Re ⁣[ϕ ⁣(kπba)eikπba(ln(S0/K)a)] F_k = \operatorname{Re}\!\left[\phi\!\left(\frac{k\pi}{b - a}\right) e^{i\frac{k\pi}{b - a}(\ln(S_0/K) - a)}\right]

and

Vk=2baK(χkψk)(call),Vk=2baK(ψkχk)(put). V_k = \frac{2}{b - a}\, K\, (\chi_k - \psi_k) \quad \text{(call)}, \qquad V_k = \frac{2}{b - a}\, K\, (\psi_k - \chi_k) \quad \text{(put)}.

The computational cost is O(N)\mathcal{O}(N) per option price: all NN 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=100K = 100, r=0.03r = 0.03, T=1T = 1, σ=0.40\sigma = 0.40, the COS price is compared against the analytical Black-Scholes price across a range of spot values. At N=16N = 16 terms, the approximation deviates noticeably for deep out-of-the-money options where the truncation range [a,b][a,b] (width 2LσT9.62L\sigma\sqrt{T} \approx 9.6 with L=12L = 12) demands more basis functions to resolve. At N=64N = 64, the COS price is indistinguishable from the analytical result.

COS call price vs spot price
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 VCOSVBS/VBS|V_{\mathrm{COS}} - V_{\mathrm{BS}}| / V_{\mathrm{BS}} decreases exponentially as the number of terms NN grows, reaching machine precision around N=65N = 65 for a standard GBM parameterisation (S0=100S_0 = 100, K=110K = 110, r=0.04r = 0.04, T=1T = 1, σ=0.30\sigma = 0.30).

With L=12L = 12, both truncation formulas converge at nearly the same rate. The difference between their centres (0.5σ2τ0.5\sigma^2\tau) is small relative to the total range width (2Lστ2L\sigma\sqrt{\tau}), so the effect of mis-centring is negligible. With a smaller LL, the cumulant-based formula would show a more pronounced advantage.

Relative error vs number of terms
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 NN but stabilises rapidly. For the at-the-money case (S0=K=100S_0 = K = 100, r=0.03r = 0.03, T=1T = 1, σ=0.40\sigma = 0.40), the oscillations decay and both truncation formulas settle on the analytical value by N25N \approx 25.

Option value convergence vs N
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$.