Assessment of the dynamics of Asian and European option on the hybrid system

In this article the problem of performance optimization for estimation of European and Asian options pricing is discussed. The main goal is to substantially improve the performance in solving the problems on the hybrid system. The authors optimized the algorithms of the Monte Carlo method for solving stochastic differential equations and path integral derived from Black-Scholes model for pricing options.


Introduction
One of the typical spheres of "complex applications", i.e. computational tasks that deal with large amounts of significantly irregular information when the rate of input data subject to processing in a reasonably limited time varies by several orders is financial mathematics. Finally, the end user to make a decision should have information in a comprehensible form. Such applications are characterized by the following factors.
• Tremendous number of end users (brokers) • Large variety of heterogeneous sources of information • Unpredictable moments of sudden data volume "explosion" • Necessity to keep in mind as long prehistory as possible to make the prognoses more precise • Limited time to make decisions, in practice in a real time manner The current state and dynamics of changes in global financial system based on the financial markets play nowadays a significant role in the life of the world economic community. The financial markets are as active as never before. In modern electronic markets, stock prices may change several times within a few milliseconds. Participating traders (that can also be computers) have to evaluate the prices and react very quickly in order to get the highest profit, which requires a lot of computational effort. Information of huge volume received from a large variety of heterogeneous sources is then to be processed using properly adequate mathematical tools.
Over the years, increasingly sophisticated mathematical models and derivative pricing strategies have been developed, but their credibility was violated by the financial crisis of 2007-2010. Contemporary practice of mathematical finance has been subjected to criticism from such a notable figures within the field as Nassim Nicholas Taleb in his book "The Black Swan" [1]. The book focuses on the extreme impact of certain kinds of rare and unpredictable events and humans' tendency to find simplistic explanations for these events retrospectively. Taleb claims that the prices of financial assets cannot be characterized by the simple models currently in use, rendering much of current practice at best irrelevant, and, at worst, dangerously misleading. Many mathematicians and applied fields scientists are now attempting to establish more effective theories and methods.
Generally speaking, the fundamental computational problem for adequate providing activity of the army of brokers consists in huge amount and large variety of input heterogeneous sources of information still drastically enlarged by archives' stored data, limited time to make decisions, in practice in a real time manner, and in unpredictable moments of sudden data volume "explosion".

Formulation of the problem
In general, running such a computations on servers or clusters with standard CPUs is not feasible due to either long run times or high energy consumption. One of the typical in technical facilities approaches to solve the mentioned problems is to implement hardware accelerators, which is rather novel for financial mathematics issues. Using general purpose graphics processing units as accelerators helps to increase the speed.
A big challenge for hardware accelerators is the complexity of many models used to estimate the future price behavior of financial products. In many cases no mathematical closed-form solution exists so that approximation methods like Monte Carlo simulations or the finite difference method must be employed We will discuss the procedures of estimation for prices of European and Asian option in two ways, through the stochastic differential equation and path integral.

Stochastic differential equations.
For a European option Blake-Scholes pricing model is used. In accordance with the stochastic differential equation the dynamics of the underlying asset S(t) is represented as follows: where S (t) being the price of the underlying asset at time t, r being risk-free interest rate, σ being volatility, r, σ being constants, and B (t) is a standard Wiener process, The result of solution of (1) is famous formula: where ϵ is random variable with standard normal distribution.
Once the value has been generated price of the underlying asset is established it is necessary to calculate the payment of the cash flow of the option [2], with S(T) being the generated random price of the underlying asset at the date of expiration of the option, and K is the strike price. According to the Monte Carlo method for pricing of the options we need to generate as exact, as possible the price of the underlying asset value by (2) and calculate the cash flow of the option (3). It then gives the discounted average price of the option by the formula where S mid is the arithmetic mean of payments of the option.
For the Asian option algorithm is more complicated. The difference is that if the usual option was enough to generate a random value of the price of the underlying asset at the date of expiration, in the case of the Asian option you need to generate a random time series containing the price of the underlying asset to all observation dates.
Path integral. The partial differential equation for calculating the price of the European option is as follows: After the change of variables x = ln S it is reduced to the form: The solution of (6) can be represented using the Feynman-Kac formula: Integral (8) can be computed by Monte Carlo procedure as follows. First we need to generate the set of random numbers (x 0 , x 1 , ..., x n , x n+1 ), so that the distribution density x i is dependent on x i-1 via the formula Using the obtained set the integrand S(T) = max { ! !!! -K, 0} is calculated. For more accurate results you must perform these actions numerous times and find the arithmetic mean. Then, the option price will be equal to: In the case of an Asian option the procedure is similar. The only difference is that the integrand is more complicated:

Experiments
To improve performance, the solution of the problem by Monte Carlo method could be split into a large number of independent operations. To get optimal acceleration available on the GPU-system we implemented serial and parallel algorithm for this problem with C ++ and CUDA. Performance results are compared with the parallel implementation of coherent systems based on the CPU. All experiments were realized on GPU NVidia Tesla M2050.
In this study was used four programs on Asian and European pricing options prepared for calculations on the GPU. Empirically derived optimal set of random numbers was estimated at 50 million. On the picture one can see the final option price convergence (fig 1). Immediately it should be noted that not all implementations of GPU showed impressive acceleration. Table 1 shows the results of all programs. The price of the op7on The number of random variables The convergence of the price of the op7on From the table it can be noted that in general the GPU can seriously speed up computations in problems of options pricing. But it must be borne in mind that even though the GPU has more than a hundred times the number of CPU cores, the entire use of the GPU does not occur. This is due to the fact that the GPU core are the "lungs" i. e., they can not effectively carry out a large number of instructions as the CPU core. Therefore GPU show advantage only on the algorithms without large parallel portions. Thus, in Asian option pricing by stochastic differential equation could not get rid of data transfer between individual cores. The result was a slight acceleration in 1.9 times. Figure 2 is a graph of the computation time in this experiment. In other experiments, the problem of data dependence between operations was solved. For example, a European option via the path integral shows almost linear GPU acceleration with respect to one CPU (Fig. 3). Also this problem has been scaled for three GPU's (Fig 4). As a result the acceleration of 180 times was obtained.   Both graphs show a clear logarithmic dependence. Thus, given this fact, it is possible to choose the optimal number of the GPU to a specific task.

Conclusion
In this paper, the authors applied Monte Carlo method to solve the problem of options pricing. Thus, the search of option price is reduced to the implementation of a large number of independent operations. For such problems solution general purpose graphics processor seems to be very efficient.
Experiments have shown that a single GPU can give an increase by 100 times. But not all problems can be realized with such acceleration. In every parallel algorithm, it is necessary to get rid of the dependence between operations performed on a single core. It was also found, that the problem of options pricing easily scale to multiple GPU's. As a result, the performance obtained can be used to improve the accuracy, while increasing the number of random numbers, or to increase the computing speed.