The BDS statistic has proved to be one of several useful nonlinear dia
gnostics. It has been shown to have good power against many nonlinear
alternatives, and its asymptotic properties as a residual diagnostic a
re well understood. Furthermore, extensive Monte Carlo results have pr
oved it useful in relatively small samples. However, the BDS test is n
ot trivial to calculate, and is even more difficult to deal with if on
e wants the speed necessary to make bootstrap resampling feasible. Thi
s short paper presents a fast algorithm for the BDS statistic, and out
lines how these speed improvements are achieved. Source code in the C
programming language is included.