A SOCIAL SPIDER ALGORITHM FOR PRICING A FINANCIAL OPTION: A FORWARD APPROACH BY MONTE CARLO SIMULATION UM ALGORITMO DE ARANHA SOCIAL PARA PRECIFICAÇÃO DE UMA OPÇÃO FINANCEIRA: UMA ABORDAGEM PARA FRENTE POR SIMULAÇÃO DE MONTE CARLO

An option is a type of financial derivative that creates an opportunity for a market player to minimize your risk exposure in the negotiation. The main objective is pricing this derivative. The options classified as American is quite challenging to pricing and one of the most popular options considered in the market. This paper proposes the adoption of the Social Spider Algorithm (SSA) to optimism the parameters of the optimal-stopping with the Monte Carlo Simulation (MCS) for pricing the options classified as American. The experiments were performed using a set of options values/characteristic available in the literature. The results showed the accuracy of the combination SSA+MCS when compared with reference values.


INTRODUCTION
An option is financial instruments that give the holder the right, not the obligation, to buy or sell an asset, such as insurance/warranty (DETEMPLE, 2005). Its main objective is to define the value of an option or simply called as option price. The relevance of the option can be observed every day in the market. For instance, Ngai, Valle e Longley (2019) and Roschnotti e Vasquez (2019) highlight its usefulness in the evaluation of risks, guidance in decision making and protective features.
An option is classified by: (i) type, call and put, and (ii) the exercise style, European style and American style (HULL, 2017). The call and put ensure to its holder, respectively, the right to buy or sell the underlying asset V at a predetermined price K during the period T of the contract with another part. Unlike other contracts, an option does not create an obligation to the contractor. Henceforward, assume V as the price underlying asset at the market, K is the negotiated price to buy or sell of the underlying asset and T as the period of validity to the contract.
The call options with American style is commonly called just American options and it will be the focus in this work. American options provide to the holder the right to buy the underlying asset at any time until T paying the value K. In other words, the holder can buy the asset now or wait for another opportunity, generating a possibility of early exercise. Differently from the well-known solution of Black-Scholes, applicable only for pricing European options, the pricing of American options is a problem without an exact solution, caused by the possibility of early exercise (SHARMA; THULASIRAM; THULASIRAMAN, 2013). More details about the features and definitions of financial options are found in Wilmott (2007), Dias (2015), Aiube (2013) and Detemple (2005).
Due to the flexibility of decision on the part of the holder, the problem of pricing American options is classified as a free boundary problem or optimal stopping problem (DIXIT; PINDYCK, 1994). In the mathematics, the theory of optimal stopping is a problem associated with the decision of choosing a time to execute a particular action to maximize an expected reward or minimize an expected cost, based on sequentially observed random variables. Hence, we need to solve the problem in optimal exercise boundary simultaneously with the option pricing (CHUNG; HUNG; WANG, 2010). This kind of problem is often solved using dynamic programming.
The American options are constantly the focus of studies. In Wong e Zhao (2010), it was argued about the need for the development of numerical techniques to options pricing, where the solution approach follows a backward methodology. For instance, Mather et al. Revista Mundi, Engenharia e Gestão, Paranaguá, PR, v. 5, n. 2, p. 231-01, 231-13, 2020 DOI: 10.21575/25254782rmetg2020vol5n21173 In addition to the methodologies mentioned above, stand out the Barone-Adesi and Whaley approximation's apud Fernandes, Brandão e Pinto (2017), the Stochastic Mesh Method described by Broadie, Glasserman e Ha (2000), the Fast Fourier Transform (FFT) by Lord et al. (2008). More methods to pricing the American Options are described in Liu e Pang (2016) and Musshoff e Hirschauer (2010).
Also, in Chockalingam e Muthuraman (2015) was adopted a sum of parameterized exponentials as an approximation to the free boundary and solve numerically a partial differential equation (PDE) for options price. But, this approach is limited by the stochastic model, complexity of payoff function and the number of dimensions.
Today the Computational Intelligence (CI) is an alternative to solve the problem of options pricing, due to the advantages derived from Monte Carlo Simulation (MCS) in modelling any stochastic process and bypass the dimensionality curse. For instance, Mather et al. (2017) and Singh, Thulasiram e Thulasiraman (2016) adopted the Firefly Algorithm to solve a multiobjective optimization problem in pricing options. In Thulasiram et al. (2016) and Sharma, Thulasiram e Thulasiraman (2013) were adopted a Particle Swarm Optimization (PSO), however with a different method to evaluate the option price (fitness). This paper proposes the use of the Social Spider Algorithm (SSA) to optimize the parameters of the free boundary representation is presented in Chockalingam e Muthuraman (2015) combined with the MCS for pricing American options, besides expanding the original proposition of Dias (2001).
The rest of this paper is organized as follows: Section 2 reviews the Social Spider Algorithm and the iterations step. Section 3 describe the option pricing problem by metaheuristic. The data about the option, the results and its analysis are presented in Section 4. Finally, Section 5 concludes the paper.

THE SOCIAL SPIDER ALGORITHM -SSA
In Yu e Li (2015) was proposed a bio-inspired and population metaheuristic called Social Spider Algorithm (SSA) to solve global optimization problems. The inspiration for the SSA came from the foraging strategy of social spiders which, in turn, interact with others spiders that live on the same web through sharing of its personal information by vibrations on the web Revista Mundi, Engenharia e Gestão, Paranaguá, PR, v. 5, n. 2, p. 231-01, 231-13, 2020 DOI: 10.21575/25254782rmetg2020vol5n21173 and thus builds a collective knowledge.
The SSA treats the optimization problem domain as a hyper-dimensional spider web representing the search space, where N artificial spiders are living. It is assumed that the spiders are on the web and the fitness function is a representation of the possibility/probability to find prey at that source position (YU; LI, 2015).
When a spider moves in the web to a new position, it sends a vibration carried through the web (a signal) to the others spiders in different intensity. The signal received by others spiders depend on the distances between each pair of them and based in this signal, each spider will decide the next destination (DUARTE; LEMONGE; FONSECA, 2017).
Let P s (g), or simply P s , the position of a spider (s = 1, 2, ..., N ) at iteration g and I(P j , P h , g) the vibration intensity sensed by the spider h in P h position generated by the spider j at the position P j in g-th iteration. Hence, I is a N × N matrix with elements i jh given by: where D(P j , P h ) is the distance between the spiders j and h, defined by L 1 −norm, Φ is the average of the standard deviation along each dimension of all spider positions and r a ∈ [0, ∞] is the attenuation rate of the vibration intensity over distance, such as (ELSAYED et al., 2016).
In the initialization phase of the SSA, it is generate a population with N spiders randomly in the search space. The fitness values are performed and the matrix I is updated. Let v tar s,g−1 the target vibration of each artificial spider at (g − 1)-th iteration, each spider s receives the N different vibrations, at g-th iteration. Then each spider selects the strongest (v best s,g ) and proceeds to update the target. If the intensity of v best s,g ≥ v tar s,g−1 , the spider s will update v tar s,g by v best s,g , otherwise v tar s,g−1 is retained.
The algorithm manipulates each spider s to perform a random walk towards v tar s,g using a dimension mask to guide. The mask is a s × d matrix with binary values, where d represents the dimension of the problem and each row represents a corresponding spider s. Initially, all values in the mask are 0 and at each iteration, it has a probability p c ∈ [0, 1] to be changed by 1. A new position P s n is generated based on the mask and each of it is coordinate ii ⊂ d is given by: where P tar s,ii is the current position produced by v tar s , P r s,ii is the position of a random spider r Hence, the movement of each spider s over the iterations is given by: where P s (g + 1), P s (g), P s (g − 1) are the position of spider s in the next iteration, the current iteration, and the previous iteration, respectively. α is a uniform random number generated for spider s. R is a 1×d vector of random numbers uniformly distributed between zero and one and ⊗ denotes element-wise multiplication. The benefits of SSA are described by Duarte, Lemonge e Fonseca (2017) and Elsayed et al. (2016).

OPTIONS PRICING BY METAHEURISTICS
This section will present the methodology that combines SSA with MCS, called SSA+MCS. Initially, the optimization context will be explained and, later, the relationship of the fitness function and with MCS will be introduced.
Consider that the holder has the right to buy an asset written on V paying the fixed value in contract K until the time T . However, V is a stochastic process governed by Brownian Geometric Motion (BGM) representing the dynamics of the asset price in differentiable terms, the Ordinary Differential Equation (ODE) is given by: where dW = √ dt · N is known as Weiner process (DIXIT; PINDYCK, 1994), N is a standard normal distribution, δ the dividend yield, r the risk-free interest rate, σ the volatility and assuming the principles of complete markets jointly with no arbitrage opportunities (perfect market) (WILMOTT, 2007).
Consider that the time T is discretized in tk parts equally spaced with ∆t = T /tk. Hence, we have the discrete time for each period ∈ {t, t + ∆t, t + 2 × ∆t, ..., T } such that initial time is 0. The value of tk determines the degree of refinement of the pricing.
Thus, let t the moment now, the holder needs to decide between buy the asset for K and sell immediately by V (t), where V (t) denote the value of asset V at time t or wait for t + ∆t to decide under the expectation of the possible values for V (t + ∆t). Each decision is represent by values described in Eq. (5) for immediate execution (buy now) and Eq. (6) Eq. (5) and Eq. (6) can be understood as the profit obtained now and the expected future profit, respectively, and the holder need to decide between both.
One solution for this situation is identify the value of V * , optimized, for each time step that allows the holder has a rule that will decide between to buy the asset now if V > V * or wait otherwise. In other words, V * create two regions in the search zone: (i) under V * where the holder wait and (ii) over V * where the immediate exercise is optimal. In Chung, Hung e Wang (2010) was described the monotonicity feature of V * , being this the constraint of the problem, according to Figure 1. In Chockalingam e Muthuraman (2015) was proposed the specific formulation for V * , which it was showed in Eq. (7) with some modifications for the proposition of this paper, where α 1 , α 2 and b w are parameters that need to be optimized, while the values of K, T are kept constant. The values α 1 , α 2 and b w dictate the format of the decision rule.
Revista Mundi, Engenharia e Gestão, Paranaguá, PR, v. 5, n. 2, p. 231-01, 231-13, 2020 Therefore, this paper adopted the SSA to optimize α 1 , α 2 and b w , while the fitness evaluation of each spider is performed according to the algorithm described ahead. We will call this approach by SSA+MCS. Thus, the L simulations are generated follow the Eq. (4) and considering the Euler-Maruyama method for ODE discretization, we have V = (v iii,t ), ∈ R L×tk and iii = [0, 1, 2, · · · , L − 1]. While the evaluation follow the algorithm showed at Figure 3, proposed by Dias (2001) and supplemented in Pacheco e Vellasco (2009), where i represent the each possible solution, V * s,t is the value for V * at time t with the parameters of the s-th candidate, iii each simulated path, v iii,t is the value for iii-th path at time t and e −rt the discount rate.
Note that algorithm finds the first value upper than (V * ) until T (breaking the loop on while) and compute the average profit obtained for each simulated path in each candidate Revista Mundi, Engenharia e Gestão, Paranaguá, PR, v. 5, n. 2, p. 231-01, 231-13, 2020 DOI: 10.21575/25254782rmetg2020vol5n21173 solution. The maximum operator ensures that the exercise occurs only in positive cases, keeping the holder's rationality to avoid unfavorable situations. We highlight that the approach this consider a merely an analysis forward at the time, since others models to option pricing consider the dynamic programming (backwards or recursively) to solve this problem.
One advantage of the method described here is that it avoids the problem of the curse of dimensionality and additionally no suffers from the numerical instability of Finite Differences (FD) in some situations or the limitation in a stochastic model of the CRR and others backward models. These characteristics make such methods of difficult modelling or unworkable for real options problems with more the two stochastic process or complex decision schemes, while our solution is ably applied for any situation.
The method SSA+MCS is computationally more expensive than CRR and FD considering the similar precision. However, the proposed approach greatly benefits from the parallelism available, unlike the other methods considered . The results from the American options values and the confidence interval are described in Table 1, where it was considered the CRR method with ∆t = 3.3 · 10 −5 as the benchmark, FD are the values obtained by finite difference with ∆t = 2 · 10 −5 in Chockalingam e Muthuraman (2015), SSA+MCS+d1 represents the values obtained by SSA optimization with MCS and considering ∆t = 0.02, while SSA+MCS+d2 considering ∆t = 0.005.  The results of SSA+MCS showed in Table 1 suggests a difference between our methodology and FD or CRR. This discrepancy could be attributed to the difference in ∆t Revista Mundi, Engenharia e Gestão, Paranaguá, PR, v. 5, n. 2, p. 231-01, 231-13, 2020 DOI: 10.21575/25254782rmetg2020vol5n21173 when compared with other tools, corroborating with the error. In other words, the refinement in ∆t minimizes the difference between the models, such as SSA+MCS+d1 and SSA+MCS+d2.

EXPERIMENTAL RESULTS
Further analysis showed that the refinement of d1 to d2 reduce the absolute error in approximately 47.5%, reinforcing the situation where case we consider the same discretization and keeping the number of simulated paths, we will obtain values close of the benchmark. Fig. 4 shows the Root Mean Square Error (RMSE) in the both discretization schemes for each V (t 0 ). Two important observations can be seen in the same figure. First, the combination of SSA+MCS has a significance accuracy, mainly if compare with the conclusion introduced in Musshoff e Hirschauer (2010) and Powell (2013), demonstrating the efficiency of SSA+MCS in the optimization of exercise boundary.
Second, the RMSE is directly proportional to the rate of V (t 0 )/K, required special attention for cases where V (t 0 )/K > 0.8 and it aligns with the conclusions showed by Fernandes, Brandão e Pinto (2017). Although this situation can be minimized with the downscaling in ∆t. Further statistical tests revealed that the downscaling is different for all V (t 0 ), with the exception for V (t 0 ) = 60 and V (t 0 ) = 110, according to with ANOVA test and Tukey Test (Tukey Significant Difference-TSD).
Analyzing the algorithm in Fig. 3 and Fig. 4, we can infer that these results occur due to an incomplete optimization because the premature exercises are more probable in situations where the difference between V (t 0 ) − K is reduced and, so, it increases the difficulty in the optimization. Thus, we recommend the increment in the number of iterations and the refine in ∆t to keep the efficiency.

CONCLUSIONS
This paper proposed the use of the SSA to optimism the parameters of an expression that represent the optimal exercise boundary to pricing an American option using the MCS. Hence, this paper enriched the literature with a forward approach to find the optimal exercise boundary and, so, adopt the advantages of MCS to pricing American options.
Although the higher computational cost, we showed a novel method with intrinsic parallelism and that is exempt from the most common problems in options pricing models, such as the stochastic model, problems with the curse of dimensionality, numerical instability and difficult to model the problem in scenarios with different payoff function.
The results found in this paper can highlight the utility of the metaheuristics adoption to optimism the options price. Since this approach has the adaptability for modelling complex Revista Mundi, Engenharia e Gestão, Paranaguá, PR, v. 5, n. 2, p. 231-01, 231-13, 2020 DOI: 10.21575/25254782rmetg2020vol5n21173 feature that is present in some financial options and all real options, such as non-Markov processes, multiple stochastic variables, correlations of stochastic variables, interactions of different options, etc.
We emphasize the relationship between the overpriced and underpriced options and the relation with the exercise boundary for proper management and decision making. The values obtained for the option price and the exercise boundary showed the accuracy which can be achieved with an adequate optimizer. A highlight should be given for the cases where V (t 0 )/K > 0.8, indicating the need for improvement from this model in terms of the problems in MCS, such as the number of simulations paths and discretization step.
We suggest as future work: (i) modelling the problem with different stochastic diffusion process, (ii) increase the number of iterations g aiming minimize the RMSE, (iii) consider nuncertainties with correlation and (iv) analyze SSA in real options approach.