_{1}

^{*}

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.

The standard and celebrated model for option pricing in the financial industry has been the Black-Scholes model [

One approach to price options under jump-diffusion models is to solve the corresponding partial integro-differential equations (PIDEs) numerically, but the PIDEs include non-local integral operators which make the direct numerical evaluation of PIDEs computationally expensive. An efficient approach for computing the integral term is to use the FFT [

The present paper introduces an application of the Cartesian treecode [

Little study has been done on the application of these fast N-body algorithms to financial engineering. One application of FMM called the fast Gauss transform (FGT, [

In the present paper, we apply another efficient approach, called the Cartesian treecode [

Furthermore, we examine whether treecode is also applicable in the field of financial engineering.

In the N-body problem studied in physic, the main goal is to compute the summation of pairwise interactions over the particles in a given system (e.g., gravitational forces of stars in a galaxy or the Coulomb forces of atoms in a molecule). Herein, we consider N particles located at x 1 , x 2 , ⋯ , x N . Then given coefficients C 1 , C 2 , ⋯ , C N and potential K ( x , y ) which describes some relation between particles at positions x and y, we want to compute

F ( x i ) = ∑ j = 1 N C j ⋅ K ( x i , z j ) . (1)

However, naive computation of the direct summation results in an O ( N 2 ) computational cost. The Cartesian treecode [

K ( x i , z j ) : = e − κ | z j − x i | | z j − x i | . (2)

The intuitive idea behind treecode is that one imagines wanting to compute gravitational force F ( x i ) of a star located at some point x i . Given clusters of stars which are very far from the target star, instead of summing the gravita- tional force of all the stars in the clusters, if D/r is very small, where D is the size of the cluster and r is the distance of the cluster point from the target point, then we can approximate the force for each cluster as that of a star whose mass is equal to the total sum of the stars in the cluster and is located at the center of the cluster (called the cluster point). Treecode applies the Barnes-Hut algorithm [

A more concrete explanation of the Cartesian treecode is as follows (see [

F ( x i ) = ∑ c F c ( x i ) , F c ( x i ) = ∑ z j ∈ c C i ⋅ K ( x i , z j ) . (3)

Second, truncated expansion of the Taylor series of K ( x i , z j ) up to order p around cluster point z c gives

K ( x i , z j ) = ∑ k = 0 p 1 k ! ∂ k K ( x i , z ) ∂ z k | z = z c ( z j − z c ) k . (4)

For each cluster c, the Taylor expansion is applied if r R ≤ θ , where r is the

radius of the cluster, R is the distance from x i to the cluster c, and θ is the multipole acceptance criterion (MAC) parameter. If the condition is not satisfied, then the children of c are examined, or simple direct summation is applied if the cluster is a leaf of the tree. Finally, substituting (4) into (3) gives

F c ( x i ) = ∑ z j ∈ c C j ⋅ ∑ k = 0 p 1 k ! ∂ k K ( x i , z ) ∂ z k | z = z c ( z j − z c ) k = ∑ k = 0 p 1 k ! ∂ k K ( x i , z ) ∂ z k | z = z c ∑ z j ∈ c C j ( z j − z c ) k : = ∑ k = 0 p L k ( x i , z c ) M c , k . (5)

Because L k ( x i , z c ) is independent of z j and M c , k is independent of x i , L k ( x i , z c ) and M c , k can be calculated independently and computation of F c ( x i ) is more efficient (notice that in order to compute (1), the summation is required at each x i ). Furthermore, the upshot of this Cartesian treecode is that the Taylor coefficients L k ( x i , z c ) are evaluated recursively.

Generally, FMM is a more sophisticated model for N-body problems in the sense that it also uses near-field expansions, which reduces the computational cost from O ( N log N ) to O ( N ) , but the additional use of near-field expansions complicates the algorithm and affects the actual performance, whereas the treecode method is simple and straightforward to implement.

We apply the Cartesian treecode to option pricing under the CGMY model with diffusion coefficients ( [

V t = 1 2 σ 2 S 2 V S S + ( r − q ) S V S − r V + ∫ R [ V ( S e z , t ) − V ( S , t ) − S ( e z − 1 ) V S ] f ( z ) d z , (6)

where ω = ∫ R ( 1 − e z ) f ( z ) d z , r is the risk-free rate, q is the dividend, t is the time to maturity, and f ( z ) is the jump measure. The initial condition is given by

V ( S , 0 ) = max ( S − K , 0 ) , (7)

where K is the strike price. Substituting x = ln ( S / K ) gives

V t = 1 2 σ 2 V x x + ( r − q ) V x − r V + ∫ R [ V ( x + z , t ) − V ( x , t ) − ( e z − 1 ) V x ( x , t ) ] f ( z ) d z (8)

with

V ( x , 0 ) = max ( K e x − K , 0 ) . (9)

The major drawback of this approach is that we need to compute the integral operator given in this PIDE at each time-step; however, use of the Cartesian treecode makes this efficient. Under the CGMY model, f ( z ) is expressed as

f C G M Y ( y ) = C e − G | y | | y | 1 + Y ⋅ 1 y < 0 + C e − M y y 1 + Y ⋅ 1 y > 0 (10)

for C > 0 , G ≥ 0 , M ≥ 0 , and Y < 2 . The CGMY model has both finite and infinite activity: in the case of Y < 0 , it has finite activity. Also, the CGMY mo- del has both finite and infinite variance: if 0 < Y < 1 , the process has finite variance, whereas it has infinite variance in the case of 1 < Y < 2 . As mentioned previously, the CGMY model is a generalization of a jump-diffusion model in the sense that Y = 0 corresponds to what is also referred to as the variance gamma (VG) model [

Furthermore, a more general jump-diffusion model exists known as the generalized tempered stable model [

f a l p h a ( y ) = C 1 e − G | y | | y | 1 + Y 1 ⋅ 1 y < 0 + C 2 e − M y y 1 + Y 2 ⋅ 1 y > 0 , (11)

for C 1 , C 2 > 0 and Y 1 , Y 2 < 2 , and application of the Cartesian treecode is straightforward.

For numerical evaluation of the PIDE, we employed a simple scheme of the Crank-Nicholson method for the case of a uniform discretization of points, 0 ≤ i ≤ N S and 0 ≤ j ≤ N T , where N S and N T represent the numbers of dis- cretization points and time steps, respectively. Under this scheme, we decom- pose the integral part as

∫ R [ V ( x + z , t ) − V ( x , t ) − ( e z − 1 ) V x ( x , t ) ] f C G M Y ( z ) d z ≈ ∫ x min x i − Δ x [ V ( z ) − V ( x i ) ] f C G M Y ( z − x i ) d z + ∫ x i + Δ x x max [ V ( z ) − V ( x i ) ] f C G M Y ( z − x i ) d z − V x ( x i ) ∫ x min − Δ x ( e z − 1 ) f C G M Y ( z ) d z − V x ( x i ) ∫ Δ x x max ( e z − 1 ) f C G M Y ( z ) d z + ∫ − Δ x Δ x [ V ( x i + z ) − V ( x i ) − ( e z − 1 ) V x ( x i ) ] f C G M Y ( z ) d z , (12)

where we employ the following approximation [

∫ − Δ x Δ x [ V ( x i + z ) − V ( x i ) − ( e z − 1 ) V x ( x i ) ] f C G M Y ( z ) d z ≅ ( Δ x ) 3 2 [ f C G M Y ( − Δ x ) + f C G M Y ( Δ x ) ] ⋅ V x x ( x i ) . (13)

Then the PIDE is solved numerically via a simple Crank-Nicholson scheme:

V i j + 1 − V i j Δ t − r − q − L 2 2 [ V i + 1 j − V i − 1 j 2 Δ x + V i + 1 j + 1 − V i − 1 j + 1 2 Δ x ] + r 2 [ V i j + V i j + 1 ] − L 1 2 [ V i − 1 j − 2 V i j + V i + 1 j Δ x 2 + V i − 1 j + 1 − 2 V i j + 1 + V i + 1 j + 1 Δ x 2 ] = L 3 ( x i ) − L 4 ( x i ) , (14)

where

L 1 : = ( Δ x ) 3 2 [ f C G M Y ( − Δ x ) + f C G M Y ( Δ x ) ] ,

L 2 : = ∫ x min − Δ x ( e z − 1 ) f C G M Y ( z ) d z + ∫ Δ x x max ( e z − 1 ) f C G M Y ( z ) d z ,

L 3 ( x i ) : = ∫ x min x i − Δ x V ( z ) f C G M Y ( z − x i ) d z + ∫ x i + Δ x x max V ( z ) f C G M Y ( z − x i ) d z ,

L 4 ( x i ) : = V ( x i ) ⋅ [ ∫ x min x i − Δ x f C G M Y ( z − x i ) d z + ∫ x i + Δ x x max f C G M Y ( z − x i ) d z ] .

The boundary conditions are given by

V ( x , t ) ( → 0, x → − ∞ , ≃ K e x − K e − r τ , x → + ∞ .

Use of an iterative scheme [

The Taylor coefficients can be evaluated as follows. Let Φ = e − κ | z − x | | z − x | 1 + Y and Ψ = e − κ | z − x | | z − x | , where κ : = G ⋅ 1 z − x < 0 + M ⋅ 1 z − x > 0 . Then | z − x | Y Φ = Ψ and differ-

entiating with respect to z k times ( k ≥ 2 ) gives

| z − x | 2 ∂ k Φ ∂ z k + [ 2 ( k − 1 ) + Y ] ( z − x ) ∂ k − 1 Φ ∂ z k − 1 + ( k − 1 ) [ ( k − 2 ) + Y ] ∂ k − 2 Φ ∂ z k − 2 = ∂ k − 1 ∂ z k − 1 ( | z − x | 2 − Y ∂ Ψ ∂ z ) . (15)

On the other hand,

| z − x | 2 − Y ∂ Ψ ∂ z = [ 1 + κ | z − x | ] Φ , (16)

and differentiation with respect to z k times ( k ≥ 2 ) gives

∂ k − 1 ∂ z k − 1 ( | z − x | 2 − Y ∂ Ψ ∂ z ) = − ( k − 1 ) ( k − 2 ) κ | z − x | − 1 ( z − x ) ∂ k − 3 Φ ∂ z k − 3 ⋅ 1 k ≥ 3 − ( k − 1 ) ( 1 + 2 κ | z − x | ) ∂ k − 2 Φ ∂ z k − 2 − ( z − x ) [ 1 + κ | z − x | ] ∂ k − 1 Φ ∂ z k − 1 . (17)

From (15) and (17), we get

| z − x | 2 ∂ k Φ ∂ z k + [ 2 ( k − 1 ) + Y ] ( z − x ) ∂ k − 1 Φ ∂ z k − 1 + ( k − 1 ) [ ( k − 2 ) + Y ] ∂ k − 2 Φ ∂ z k − 2 = − ( k − 1 ) ( k − 2 ) κ | z − x | − 1 ( z − x ) ∂ k − 3 Φ ∂ z k − 3 ⋅ 1 k ≥ 3 − ( k − 1 ) ( 1 + 2 κ | z − x | ) ∂ k − 2 Φ ∂ z k − 2 − ( z − x ) [ 1 + κ | z − x | ] ∂ k − 1 Φ ∂ z k − 1 ,

and

| z − x | 2 ∂ k Φ ∂ z k = − ( z − x ) [ 2 k − 1 + Y + κ | z − x | ] ∂ k − 1 Φ ∂ z k − 1 − ( k − 1 ) ( k − 1 + Y + 2 κ | z − x | ) ∂ k − 2 Φ ∂ z k − 2 − ( k − 1 ) ( k − 2 ) κ | x − z | − 1 ( z − x ) ∂ k − 3 Φ ∂ z k − 3 ⋅ 1 k ≥ 3 . (18)

Finally, dividing by k ! and substituting x = x i and z = z c gives the following recursive equation for L k ( x i , z c ) :

k | z c − x i | 2 L k ( x i , z c ) = − ( z c − x i ) [ 2 k − 1 + Y + κ | z c − x i | ] L k − 1 ( x i , z c ) − ( k − 1 + Y + 2 κ | z c − x i | ) L k − 2 ( x i , z c ) − κ | z c − x i | − 1 ( z c − x i ) L k − 3 ( x i , z c ) ⋅ 1 k ≥ 3 . (19)

^{1}The code is available at https://bitbucket.org/cdcooper/yukawatree

We conducted the following numerical experiments, which were executed in Python. The following parameter settings were used [

The flexibility of treecode allows it to achieve higher efficiency of decreasing computational time by choosing target grid points to compute L 3 ( x i ) , as is done in Treecode 2.

For Treecode 2, because L 3 ( x i ) is a smooth curve with respect to x i , it suffices to only compute one-eighth the number of grid points x i equally distributed and interpolating the other grid points via a spline scheme for evaluation of L 3 ( x i ) . As shown in

In this article, we describe applying one of the fast N-body algorithms used in physics, the Cartesian treecode [

high efficiency compared to the original finite difference method without losing accuracy. In addition, the Cartesian treecode can be directly applied to a non- uniform grid, and the use of transformation maps [

We appreciate Professor Lorena Barba, Simon Layton, and Christopher Cooper for helpful advice and support. I would especially like to note my appreciation of Christopher Cooper for his support in instructing me on how to use his Python code of the Cartesian treecode.

Sakuma, T. (2017) Application of Fast N-Body Algorithm to Option Pricing under CGMY Model. Journal of Mathematical Finance, 7, 308-318. https://doi.org/10.4236/jmf.2017.72016