Market pricing parameters.
Abstract
This paper introduces parallel computation for spread options using two-dimensional Fourier transform. Spread options are multi-asset options whose payoffs depend on the difference of two underlying financial securities. Pricing these securities, however, cannot be done using closed-form methods; as such, we propose an algorithm which employs the fast Fourier Transform (FFT) method to numerically solve spread option prices in a reasonable amount of short time while preserving the pricing accuracy. Our results indicate a significant increase in computational performance when the algorithm is performed on multiple CPU cores and GPU. Moreover, the literature on spread option pricing using FFT methods documents that the pricing accuracy increases with FFT grid size while the computational speed has opposite effect. By using the multi-core/GPU implementation, the trade-off between pricing accuracy and speed is taken into account effectively.
Keywords
- spread option
- single core
- parallel computing
1. Introduction
Spread options have widespread uses across many industries, remarkably in the seasonal commodity market futures. One notable example is the crack spread, which is the pricing difference between a barrel of crude oil and the petroleum products refined from it. Traditionally, crack spreads involve the purchase of oil futures and the simultaneous sale of futures of the refined product, whether it be gasoline, heating oil, or other similar products. Refiners seek a positive spread between the prices of crude oil and refined products, meaning that the price of the input (oil in this case) is lower than the price of the output (gasoline, kerosene, etc.).
Beyond the oil industry, spread options are utilized by suppliers in industries as disparate as the soybean and electricity markets. Soybean spread options are known as crush spreads, and electricity spread options are known as spark spreads. Similar to crack spreads, both these options seek to maximize the spread between input costs and output prices for suppliers to maximize profit.
The use of spread options across such disparate fields is but a testament to their widespread use. Considering the popularity of spread options, it thus prompts the needs of accurate and fast pricing of price of these options. This paper dwells on the discussion of fast algorithms for these options.
As mentioned previously, pricing spread options tends to be something that cannot be easily performed using traditional closed-form solutions. Therefore, we explore the utilization of the fast Fourier transform method to price these securities. Specifically, we perform the FFT on the spread options payoff, assuming knowledge of the model joint characteristic function, which we represent as a pointwise multiplication of the characteristic function and the complex gamma function in the Fourier domain.
Regarding our implementation, we adapt the parallel computing Toolbox in MATLAB to take advantage of the multi-core capabilities of GPU processing, to substantially improve the performance and computational efficiency of the algorithm for spread options. This methodology may serve a great deal especially in model calibration and risk management approach. For measuring performance, we only time the execution of the inverse Fast Fourier Transform, as the prior steps are merely initialization of the necessary arrays. For measuring accuracy, we compute the Euclidean norms of each of the resulting option price arrays from each implementation (single-core and GPU), and find the percent error between the norms as follows:
The main contribution of this paper is the use of parallel computation for the spread option value using two-dimensional Fourier transform. Our implementation is developed both for single-core processors, as well as for parallel processing on multi-core/GPU systems. For both execution methods, we have implemented our algorithm using MATLAB built-in functions to produce a version of the algorithm compatible for multi-core systems. To ascertain the impact of the different environments as well as the different methods of execution on the computational efficiency of the algorithm, we record the times of execution for different values of FFT grid size
2. Model description
2.1 Spread option valuation
We fix the trading time horizon
The goal is to compute the value of an European spread option between stock price processes
At expiration time
and under a risk-neutral conditional measure1
Under normality assumption, Eq. (3) can be analytically approximated as done in [1]. However, a departure from normality assumption ushers into numerical computational difficulties. In option pricing literature of finance, Fourier transform-based method is usually the best candidate to approximate the solution for Eq. (3), in this case whenever the joint characteristic function of the asset price processes,
where
Fast and accurate pricing is often the most desirable feature of the model. In [4], the authors consider spread options pricing in C++ using fast Fourier transform in the west (FFTW). They observed the trade off between fast computation and numerical accuracy; pricing accuracy is monotonic in the number of FFT grid size used in the price computation. However, using a large number of FFT grid size slow down the speed of price computation.
2.2 Model characteristic function
Fast Fourier transform (FFT) method is generically applicable in finance because it only requires the specification of the characteristic function of the random variable. In terms of spread options, one just need a characteristic function of the joint distribution of the financial variables in question. Here, we employ two characteristic functions: one based on two-dimensional normal distribution and the other one based on two-dimensional normal inverse Gaussian (NIG) distribution.
2.2.1 Two-dimensional geometric Brownian motion (GBM)
The characteristic function for a spread option comprised of two assets, each of which is modeled as a correlated GBM, is given by
where
2.2.2 Two-dimensional normal inverse Gaussian (NIG) Levy process
Let
where
The covariance matrix corresponding to the two-dimensional NIG-distributed random variable
2.3 FFT algorithm
The FFT algorithm for spread option pricing along the line of [3] can be described as follows
3. Numerical results
3.1 Implementation outlook
As mentioned earlier, two versions of the algorithm were programmed in MATLAB, namely a single-core variant and a multi-core GPU variant. In MATLAB, the Parallel Processing Toolbox was used to exploit multi-core GPU capabilities to run the algorithm. Among its capabilities is the ability to run for loops and perform array operations in parallel, both on multi-core CPUs as well as GPUs.
As in the Algorithm 1 given above, the for loop in lines 3–6 was run in parallel, across six CPU cores, employing the parfor directive available in the MATLAB Parallel Processing Toolbox. We also sought to run computationally heavy functions on the GPU we had available, to improve the efficiency of our algorithm beyond what would be possible on a multi-core CPU. In that regard, we executed the inverse FFT, as described in line 7, on the GPU. We accomplished this by copying our H and A arrays onto the GPU, such that any further processing of those arrays would only occur on the GPU. To perform this operation, we utilized the MATLAB inbuilt function gpuArray() and copied the two aforementioned arrays to the GPU after the for loop. To transfer the GPU results (following execution of the inverse FFT) back to the local workspace, we used the MATLAB function gather().
Table 1 shows the market parameters, and these inputs are taken from [5] where
100 | 96 | 0.1 | 1.0 | 0.05 | 0.05 |
The computer used to produce the following results was an ASUS ROG Strix Scar II GL704GW, with an Intel Core i7-8750H processor clocked at 2.20 Hz and comprising of 6 cores, 16GB RAM, and an NVIDIA GeForce RTX 2070 GPU with 8GB memory, running Windows 10. The computational times of the algorithm are tabulated in Table 2 and Figure 1. In a single run, we compute the price of
Grid points: | Pricing accuracy | Single core (s) | GPU parallel (s) | GPU speed factor |
---|---|---|---|---|
(a) 2d-GBM model: | ||||
8 | 1.10E-04 | 2.671126 | 0.213765 | 12.49561902 |
9 | 4.29E-05 | 10.155822 | 0.254708 | 39.87241076 |
10 | 1.97E-05 | 39.884087 | 0.650358 | 61.32635718 |
11 | 1.06E-05 | 157.833762 | 2.422815 | 65.14478489 |
12 | 6.19E-06 | 317.858516 | 9.474695 | 33.54815284 |
13 | 3.80E-06 | 1316.938937 | 38.519949 | 34.18849119 |
(b) 2d-NIG model: | ||||
---|---|---|---|---|
8 | 1.20E-04 | 2.528521 | 0.21573 | 11.72087536157 |
9 | 5.21E-05 | 9.768831 | 0.31099 | 31.41244621944 |
10 | 3.00E-05 | 39.372496 | 1.03477 | 38.04969824066 |
11 | 2.12E-05 | 162.069306 | 4.57217 | 35.44691939427 |
12 | 1.72E-05 | 651.850506 | 19.92393 | 32.71695934733 |
13 | 1.50E-05 | 2592.307476 | 83.77870 | 30.94232156861 |
where
From Table 2, we can see that the optimal values of
4. Conclusion
In this work, we built on the literature on fast and accurate pricing of spread options based on two-dimensional FFT method using parallel computation. We examined the effectiveness of this approach by comparing the computational times of CPU and GPU implementations of the FFT Spread Option Pricing Algorithm in MATLAB. We have taken benchmarks prices from Monte Carlo simulations with
As an extension to this work, one could develop a 3-asset spread option pricing algorithm using the 3D Fast Fourier Transform Algorithm. Such a scheme, while computationally heavy, could be rendered more efficient by harnessing the power of GPUs through the tools available in MATLAB.
References
- 1.
Kirkpatrick S, Gelatt C, Vecchi M. Optiminization by simulated annealing. Science. 1983; 1 (23):671-680 - 2.
Dempster M, Hong S. Spread option valuation and the fast Fourier transform. In: Mathematical Finance-Bachelier Congress. Vol. 2000. 2002. pp. 203-220 - 3.
Hurd T, Zhou Z. A Fourier transform method for spread option pricing. SIAM Journal on Financial Mathematics. 2010; 1 :142-157 - 4.
Alfeus M, Schlögl E. On spread option pricing using two-dimensional Fourier transform. International Journal of Theoretical and Applied Finance. 2019; 22 (5) - 5.
Hurd T, Zhou Z. A Fourier transform method for spread option pricing. SIAM Journal on Financial Mathematics. 2010; 1 (1 ):142-157
Notes
- 3 Specifically: Under the risk–neutral measure associated with taking the continuously compounded savings account as the numeraire, and (for expositional simplicity) assuming a constant interest rate r.