The N-body problem is an active research topic in physics for which there are two major algorithms for efficient computation, the fast multipole method and treecode, but these algorithms are not popular in financial engineering. In this article, we apply a fast N-body algorithm called the Cartesian treecode to the computation of the integral operator of integro-partial differential equations to compute option prices under the CGMY model, a generalization of a jump-diffusion model. We present numerical examples to illustrate the accuracy and effectiveness of the method and thereby demonstrate its suitability for application in financial engineering.