## Abstract

This paper deals with a comparative numerical analysis of the Black–Scholes equation for the value of a European call option. Artificial neural networks are used for the numerical solution to this problem. According to this method, we approximate the unknown function of the option value using a trial function, which depends on a neural network solution and satisfies the given boundary conditions of the Black–Scholes equation. We consider some optimization methods, not examined in the standard literature, such as particle swarm optimization and the gradient-type monotone iteration process, to obtain the unknown parameters of the neural network. Numerical results show that this proposed version of neural network method obtains all data from the terminal value and boundary conditions with sufficient accuracy.

This is a preview of subscription content, access via your institution.

## References

Amornwattana, S., Enke, D., & Dagli, C. H. (2007). A hybrid option pricing model using a neural network for estimating volatility.

*International Journal of General Systems*,*36*(5), 558–573.Andreou, P. C., Charalambous, C., & Martzoukos, S. H. (2008). Pricing and trading European options by combining artificial neural networks and parametric models with implied parameters.

*European Journal of Operational Research*,*185*(3), 1415–1433.Anwar, M. N., & Andallah, L. S. (2018). A study on numerical solution of Black–Scholes model.

*Journal of Mathematical Finance*,*8*, 372–381.Bangyal, W. H., Rauf, H. T., Batool, H., Bangyal, S. A., Ahmed, J., & Pervaiz, S. (2019). An improved particle swarm optimization algorithm with chi-square mutation strategy.

*International Journal of Advanced Computer Science and Applications*,*10*(3), 481–491.Bates, D. S. (1996) 20 Testing option pricing models, Handbook of Statistics, Elsevier, vol. 14, 1996, 567–611, ISBN: 9780444819642.

Black, F., & Scholes, M. S. (1973). The pricing of options and corporate liabilities.

*Journal of Political Economy*,*81*(3), 637–654.Chowdhury, R., Mahdy, M. R. C., Alam, T. N., Al Quaderi, G. D., & Rahman, M. A. (2020) Predicting the stock price of frontier markets using machine learning and modified Black–Scholes Option pricing model.

*Physica A-Statistical Mechanics and its Applications*,**555**, Article Number: 124444.Cybenko, G. (1989). Approximation by superpositions of a sigmoidal function.

*Mathematics of Control, Signals and Systems*,*2*(4), 303–314.Das, S. P., & Padhy, S. (2017). A new hybrid parametric and machine learning model with homogeneity hint for European-style index option pricing.

*Neural Computing & Applications*,*28*(12), 4061–4077.Eberhart, R. C., & Kennedy, J. (1995).

*A new optimizer using particle swarm theory, in Symposium on Micro Machine and Human Science*. Japan: Nagoya, Piscataway, NJ.Farnoosh, R., Sobhani, A., Rezazadeh, H., & Beheshti, M. H. (2015). Numerical method for discrete double barrier option pricing with time-dependent parameters.

*Computers and Mathematics with Applications*,*70*(8), 2006–2013.Farnoosh, R., Rezazadeh, H., Sobhani, A., et al. (2016). A numerical method for discrete single barrier option pricing with time-dependent parameters.

*Computational Economics*,*48*, 131–145.Freitas, D., Lopes, L. G., & Morgado-Dias, F. (2020). Particle swarm optimisation: A historical review up to the current developments.

*Entropy*,*22*(3), 1–32.Fusai, G., & Recchioni, M. C. (2008). Analysis of quadrature methods for pricing discrete barrier options.

*Journal of Economic Dynamics and Control*,*31*, 826–860.Golbabai, A., Nikan O. , & Nikazad, T. (2019). Numerical analysis of time fractional Black–Scholes European option pricing model arising in financial market.

*Computational and Applied Mathematics*,**38(4)**, Article Number: 173.Golbabai, A., & Nikan, O. (2020). A computational method based on the moving least-squares approach for pricing double barrier options in a time-fractional Black–Scholes model.

*Computational Economics*,*55*(1), 119–141.Halton, J. H. (1964). Algorithm 247: Radical-inverse quasi-random point sequence.

*Communications of the ACM*,*7*(12), 701–702.Hobson, D. (2004). Review Paper: A survey of mathematical finance.

*Proceedings of the Royal Society of London. Series A: Mathematical, Physical and Engineering Sciences*,*460*(2052), 3369–3401.Jang, H., & Lee, J. (2019). Generative Bayesian neural network model for risk-neutral pricing of American index options.

*Quantitative Finance*,*19*(4), 587–603.Kennedy, J., & Eberhart, R. (1995). Particle swarm optimization. In:

*Proceedings of ICNN’95 - International Conference on Neural Networks, Perth, WA, Australia*(pp. 1942–1948, vol. 4). https://doi.org/10.1109/ICNN.1995.488968.Kolmogorov, A. N. (1957). On the representation of continuous functions of several variables by superpositions of continuous functions of one variable and addition. Dokl. Akad. Nauk SSSR 114, 953–956. English Translation: American Mathematical Society Translation 28(2), 1963, 55–59.

Lajbcygier, P. (2004). Improving option pricing with the product constrained hybrid neural network.

*IEEE Transactions on Neural Networks*,*15*(2), 465–476.Levy, G. (2016). Computational Finance Using C and C#. Derivatives and Valuation, 2nd Edition, Quantitative Finance Series, Academic Press, London, UK, ISBN: 978-0-12-803579-5.

Malek, A., & Shekari Beidokhti, R. (2006). Numerical solution for high order differential equations using a hybrid neural network-optimization method.

*Applications and Mathematical Computation*,*183*, 260–271.Malliaris, M., & Salchenberger, L. (1993). A neural-network model for estimating option prices.

*Applied Intelligence*,*3*(3), 193–206.Martinez-Cantin, R. (2014). BayesOpt: A bayesian optimization library for nonlinear optimization, experimental design and bandits.

*Journal of Machine Learning Research*,*15*(115), 3915–3919.Muller, B., Reinhardt, J., & Strickland, M. T. (2002).

*Neural networks: An introduction*(2nd ed.). Berlin: Springer.Ojha, V. K., Abraham, A., & Snasel, V. (2017). Metaheuristic design of feedforward neural networks: A review of two decades of research.

*Engineering Applications of Artificial Intelligence*,*60*, 97–116.Ozbayoglu, A. M., Gudelek, M. U., & Sezer, O. B. (2020). Deep learning for financial applications : A survey.

*Applied Soft Computing*, Article Number: 106384.Ömür, U. (2008).

*An introduction to computational finance*. Imperial College Press: Series in Quantitative Finance. World Scientific Publishing Co.Pradip Roul, P. (2020). A high accuracy numerical method and its convergence for time-fractional Black–Scholes equation governing European options.

*Applied Numerical Mathematics*,*151*, 472–493.Roul, P., & Goura, V. M. K. P. (2020). A sixth order numerical method and its convergence for generalized Black–Scholes PDE.

*Journal of Computational and Applied Mathematics*,*377*, 112881.Sobol, I. Y. M. (1967). On the distribution of points in a cube and the approximate evaluation of integrals.

*Zhurnal Vychislitel’noi Matematiki i Matematicheskoi Fiziki*,*7*(4), 784–802.Susan, S., Ranjan, R., Taluja, U., et al. (2020). Global-best optimization of ANN trained by PSO using the non-extensive cross-entropy with Gaussian gain.

*Soft Computation*.Wilmott, P., Dewynne, J., & Howison, S. (1994).

*Option pricing: Mathematical models and computation*. Oxford: Oxford Financial Press.Yao, J. T., Li, Y. L., & Tan, C. L. (2000). Option price forecasting using neural networks.

*Omega-International Journal of Management Science*,*28*(4), 455–466.Yarpiz, (2020). Particle Swarm Optimization (PSO), 2015, https://www.mathworks.com/matlabcentral/fileexchange/52857-particle-swarm-optimization-pso, MATLAB Central File Exchange. Retrieved July 8.

## Acknowledgements

We would like to gratefully thank the anonymous reviewers for their constructive comments and recommendations, which are definitely helped to improve the paper. Thanks are also given to Ian Collins, the Assistant Director of the School of Foreign Languages at Yaşar University, for his contribution in proof-reading.

## Author information

### Affiliations

### Corresponding author

## Ethics declarations

### Conflict of interest

The authors declare that they have no conflict of interest.

## Additional information

### Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Appendix 1: The Partial Derivatives of Cost Function

### Appendix 1: The Partial Derivatives of Cost Function

The partial derivatives of the cost function *F* depending on the unknown parameters of the neural network given in Eqs. 27, 28, 29 and 30

where \(\dfrac{\partial e_{ij}}{\partial \alpha _k} = \dfrac{\partial ^2 \psi }{\partial \alpha _k \partial t_j} +\dfrac{1}{2}S_i^2\sigma ^2 \dfrac{\partial ^3 \psi }{\partial \alpha _k \partial S_i^2} + rS_i \dfrac{\partial ^2 \psi }{\partial \alpha _k \partial S_i} -r\dfrac{\partial \psi }{\partial \alpha _k}\), \(e_{ij}\) is defined in Eq. 16, and \(\psi \) is the trial function formalized as in Eq. 13 for \(k = 1, 2, \ldots m\) such that *m* is the total number of neurons in the neural network.

One can easily determine that the partial derivatives in Eq. 27 are calculated as follows with respect to Eqs. 17, 18 and 19.

where \(\dfrac{\partial Net(S,t;\mathbf {p})}{\partial \alpha _k} = f(z_k)\), \(\dfrac{\partial ^2 Net(S,t;\mathbf {p})}{\partial \alpha _k \partial t} = \omega _k f(z_k)(1 - f(z_k)),\) \(\dfrac{\partial ^2 Net(S,t;\mathbf {p})}{\partial \alpha _k \partial S} = \eta _k f(z_k)(1 - f(z_k))\) and \(\dfrac{\partial ^3 Net(S,t;\mathbf {p})}{\partial \alpha _k \partial S^2} = \eta _k^2 f(z_k)(1 - f(z_k))(1 - 2f(z_k))\) for \(k=1, 2, \ldots , m.\)

Similarly,

where \(\dfrac{\partial e_{ij}}{\partial \omega _k} = \dfrac{\partial ^2 \psi }{\partial \omega _k \partial t_j} +\dfrac{1}{2}S_i^2\sigma ^2 \dfrac{\partial ^3 \psi }{\partial \omega _k \partial S_i^2} + rS_i \dfrac{\partial ^2 \psi }{\partial \omega _k \partial S_i} -r\dfrac{\partial \psi }{\partial \omega _k}.\)

Here, the partial derivatives \(\dfrac{\partial \psi }{\partial \omega _k},\) \(\dfrac{\partial ^2 \psi }{\partial \omega _k \partial t},\) \(\dfrac{\partial ^2 \psi }{\partial \omega _k \partial S}\) and \(\dfrac{\partial ^3 \psi }{\partial \omega _k \partial S^2}\) are computed with regard to Eqs 17, 18 and 19 as

and

where \(\dfrac{\partial Net(S,t;\mathbf {p})}{\partial \omega _k} = \alpha _k t f(z_k)(1 - f(z_k))\), \(\dfrac{\partial ^2 Net(S,t;\mathbf {p})}{\partial \omega _k \partial t} = \alpha _k f(z_k)(1 - f(z_k))(1 + w_kt -2w_ktf(z_k)),\) \(\dfrac{\partial ^2 Net(S,t;\mathbf {p})}{\partial \omega _k \partial S} = \alpha _k\eta _k t f(z_k)(1 - f(z_k))(1 - 2f(z_k))\) and \(\dfrac{\partial ^3 Net(S,t;\mathbf {p})}{\partial \omega _k \partial S^2} = \alpha _k\eta _k^2 t f(z_k)(1 - f(z_k))(1 - 2f(z_k))\left\{ (1-2f(z_k))^2 - 2(1-f(z_k))\right\} \) for \(k=1, 2, \ldots , m.\)

And as with to the previous partial derivative, \(\dfrac{\partial F}{\partial \eta _k}\) is calculated as

where \(\dfrac{\partial e_{ij}}{\partial \eta _k} = \dfrac{\partial ^2 \psi }{\partial \eta _k \partial t_j} +\dfrac{1}{2}S_i^2\sigma ^2 \dfrac{\partial ^3 \psi }{\partial \eta _k \partial S_i^2} + rS_i \dfrac{\partial ^2 \psi }{\partial \eta _k \partial S_i} -r\dfrac{\partial \psi }{\partial \eta _k}.\) In this case, the partial derivatives are respectively equal to

and

where \(\dfrac{\partial Net(S,t;\;\mathbf {p})}{\partial \eta _k} = \alpha _k S f(z_k)(1 - f(z_k))\), \(\dfrac{\partial ^2 Net(S,t;\;\mathbf {p})}{\partial \eta _k \partial t} = \alpha _k \omega _k S f(z_k)(1 - f(z_k))(1 - 2f(z_k)),\) \(\dfrac{\partial ^2 Net(S,t;\;\mathbf {p})}{\partial \eta _k \partial S} = \alpha _k f(z_k)(1 - f(z_k))(1 +\eta _k S -2\eta _k Sf(z_k))\) and \(\dfrac{\partial ^3 Net(S,t;\;\mathbf {p})}{\partial \eta _k \partial S^2} = \alpha _k\eta _k f(z_k)(1 - f(z_k))\left\{ 2 - 4f(z_k) + \eta _k S - 2\eta _k f(z_k)(1-f(z_k))\right\} \) for \(k=1, 2, \ldots , m.\)

The partial derivative \(\dfrac{\partial F}{\partial \beta _k}\) is computed as

where \(\dfrac{\partial e_{ij}}{\partial \beta _k} = \dfrac{\partial ^2 \psi }{\partial \beta _k \partial t_j} +\dfrac{1}{2}S_i^2\sigma ^2 \dfrac{\partial ^3 \psi }{\partial \beta _k \partial S_i^2} + rS_i \dfrac{\partial ^2 \psi }{\partial \beta _k \partial S_i} -r\dfrac{\partial \psi }{\partial \beta _k}.\) The partial derivatives \(\dfrac{\partial \psi }{\partial \beta _k},\) \(\dfrac{\partial ^2 \psi }{\partial \beta _k \partial t},\) \(\dfrac{\partial ^2 \psi }{\partial \beta _k \partial S}\) and \(\dfrac{\partial ^3 \psi }{\partial \beta _k \partial S^2}\) are set out below.

where \(\dfrac{\partial Net(S,t;\mathbf {p})}{\partial \beta _k} = \alpha _k f(z_k)(1 - f(z_k))\), \(\dfrac{\partial ^2 Net(S,t;\mathbf {p})}{\partial \beta _k \partial t} = \alpha _k \omega _k f(z_k)(1 - f(z_k))(1 - 2f(z_k)),\) \(\dfrac{\partial ^2 Net(S,t;\mathbf {p})}{\partial \beta _k \partial S} = \alpha _k \eta _k f(z_k)(1 - f(z_k))(1 -2f(z_k))\) and \(\dfrac{\partial ^3 Net(S,t;\mathbf {p})}{\partial \beta _k \partial S^2} = \alpha _k\eta _k^2 f(z_k)(1 - f(z_k))(1 - 2f(z_k) +2f^2(z_k))\) for \(k=1, 2, \ldots , m.\)

## Rights and permissions

## About this article

### Cite this article

Eskiizmirliler, S., Günel, K. & Polat, R. On the Solution of the Black–Scholes Equation Using Feed-Forward Neural Networks.
*Comput Econ* (2020). https://doi.org/10.1007/s10614-020-10070-w

Accepted:

Published:

### Keywords

- Black–Scholes equation
- Option pricing
- Neural networks
- Particle swarm optimization
- Gradient descent

### JEL Classification

- C45-neural networks and related topics
- C61-optimization techniques
- Programming models
- Dynamic analysis
- G13-contingent pricing
- Futures pricing

### Mathematics Subject Classification

- MSC 91G80
- MSC 35Q91