OptionMC: A Python Package for Monte Carlo Pricing of European Options
How to cite (IJASEIT) :
This article presents OptionMC, a Python package designed for educational purposes that implements Monte Carlo methods for European option pricing. We describe the package's architecture and demonstrate its application through systematic testing against established Black-Scholes analytical solutions. The implementation supports both standard Monte Carlo estimation and variance reduction via antithetic variates, allowing examination of convergence patterns and computational efficiency. Our results suggest that Monte Carlo estimates converge toward analytical solutions as the number of iterations increases, with convergence behavior generally consistent with theoretical expectations. Analysis of parameter sensitivity indicates the package appropriately captures fundamental pricing relationships, including volatility effects, time decay, and moneyness considerations. The distributional characteristics of simulated stock prices and option payoffs align reasonably well with theoretical predictions. While OptionMC primarily serves pedagogical objectives rather than high-performance applications, it offers a transparent framework that may benefit students and researchers seeking to understand the practical implementation of option pricing algorithms through Monte Carlo techniques.
J. C. Hull, Options, Futures, and Other Derivatives, 10th ed. New York, NY, USA: Pearson, 2018.
R. Quail and J. A. Overdahl, Financial Derivatives: Pricing and Risk Management. Hoboken, NJ, USA: John Wiley & Sons, 2009.
P. P. Boyle, "Options: A Monte Carlo approach," J. Financ. Econ., vol. 4, no. 3, pp. 323–338, May 1977, doi: 10.1016/0304-405X(77)90005-8.
P. Glasserman, Monte Carlo Methods in Financial Engineering, ser. Stochastic Modelling and Applied Probability, vol. 53. New York, NY, USA: Springer, 2004. doi: 10.1007/978-0-387-21617-1.
F. Black and M. Scholes, "The pricing of options and corporate liabilities," J. Polit. Econ., vol. 81, no. 3, pp. 637–654, May-Jun. 1973, doi: 10.1086/260062.
R. C. Merton, "Theory of rational option pricing," Bell J. Econ. Manage. Sci., vol. 4, no. 1, pp. 141–183, Spring 1973, doi: 10.2307/3003143.
G. M. Jabbour and Y.-K. Liu, "Option pricing and Monte Carlo simulations," J. Bus. Econ. Res., vol. 3, no. 9, pp. 67–72, Sep. 2005, doi: 10.19030/jber.v3i9.2802.
M. Broadie and P. Glasserman, "Estimating security price derivatives using simulation," Manage. Sci., vol. 42, no. 2, pp. 269–285, Feb. 1996, doi: 10.1287/mnsc.42.2.269.
S. Asmussen and P. W. Glynn, Stochastic Simulation: Algorithms and Analysis, ser. Stochastic Modelling and Applied Probability, vol. 57. New York, NY, USA: Springer, 2007. doi: 10.1007/978-0-387-69033-9.
P. Rebentrost, B. Gupt, and T. R. Bromley, "Quantum computational finance: Monte Carlo pricing of financial derivatives," Phys. Rev. A, vol. 98, no. 2, p. 022321, Aug. 2018, doi: 10.1103/PhysRevA.98.022321.
L. Xiong, J. Luo, H. Vise, and M. White, "Distributed least-squares Monte Carlo for American option pricing," Risks, vol. 11, no. 8, p. 145, Aug. 2023, doi: 10.3390/risks11080145.
P. Rebentrost, B. Gupt, and T. R. Bromley, "Quantum computational finance: Monte Carlo pricing of financial derivatives," Phys. Rev. A, vol. 98, no. 2, p. 022321, Aug. 2018, doi: 10.1103/PhysRevA.98.022321.
C. Coleman, S. Lyon, L. Maliar, and S. Maliar, "Matlab, Python, Julia: What to choose in economics?" Comput. Econ., vol. 58, pp. 1263–1288, Oct. 2021, doi: 10.1007/s10614-020-09983-3.
S. H. S. Herho, Tutorial Pemrograman Python 2 Untuk Pemula. Bandung, Indonesia: WCPL ITB, 2016.
S. H. S. Herho, M. R. Syahputra, and N. J. Trilaksono, Pengantar Metode Numerik Terapan: Menggunakan Python. Bandung, Indonesia: WCPL ITB, 2023. doi: 10.22541/au.170689157.78106030/v1.
S. Herho et al., "Comparing scientific computing environments for simulating 2D non-buoyant fluid parcel trajectory under inertial oscillation: A preliminary educational study," Indones. Phys. Rev., vol. 7, no. 3, pp. 451–468, 2024, doi: 10.29303/ipr.v7i3.335.
S. Herho, S. N. Kaban, D. E. Irawan, and R. Kapid, "Efficient 1D heat equation solver: Leveraging Numba in Python," Eksakta: Berkala Ilmiah Bidang MIPA, vol. 25, no. 2, pp. 126–137, 2024, doi: 10.31224/3422.
S. Herho et al., "Reappraising double pendulum dynamics across multiple computational platforms," CLEI Electron. J., vol. 28, no. 1, p. 10, 2025, doi: 10.19153/cleiej.28.1.10.
S. Herho, S. Kaban, and I. Anwar, "Benchmarking modern scientific computing platforms for 2D potential flow solver," Eng. Archive, Preprint, 2025, doi: 10.31224/4270.
B. C. Jenkins, "A Python-based undergraduate course in computational macroeconomics," J. Econ. Educ., vol. 53, no. 2, pp. 126–140, 2022, doi: 10.1080/00220485.2022.2038322.
A. Y. F. Zhu, "Upgrading financial education by adding Python-based personalized financial projection: A randomized control trial," Brit. J. Educ. Technol., vol. 55, no. 2, pp. 731–750, Mar. 2024, doi: 10.1111/bjet.13401.
R. Seydel, Tools for Computational Finance, 6th ed. London, U.K.: Springer, 2017. doi: 10.1007/978-1-4471-7338-0.
Y. Hilpisch, Python for Finance: Mastering Data-Driven Finance, 2nd ed. Sebastopol, CA, USA: O'Reilly Media, 2020.
J.-P. Chavas, J. Li, and L. Wang, "Option pricing revisited: The role of price volatility and dynamics," J. Commodity Markets, vol. 33, p. 100381, Mar. 2024, doi: 10.1016/j.jcomm.2023.100381.
M. F. Salami, "Empirical examination of the Black-Scholes model: Evidence from the United States stock market," Front. Appl. Math. Stat., vol. 10, p. 1216386, Jan. 2024, doi: 10.3389/fams.2024.1216386.
B. Dumas, J. Fleming, and R. E. Whaley, "Implied volatility functions: Empirical tests," J. Finance, vol. 53, no. 6, pp. 2059–2106, Dec. 1998, doi: 10.1111/0022-1082.00083.
N. P. B. Bollen and R. E. Whaley, "Does net buying pressure affect the shape of implied volatility functions?" J. Finance, vol. 59, no. 2, pp. 711–753, Apr. 2004, doi: 10.1111/j.1540-6261.2004.00647.x.
Y.-F. Liu, W. Zhang, and H.-C. Xu, "Collective behavior and options volatility smile: An agent-based explanation," Econ. Model., vol. 39, pp. 232–239, Apr. 2014, doi: 10.1016/j.econmod.2014.03.011.
G. Bakshi, C. Cao, and Z. Chen, "Empirical performance of alternative option pricing models," J. Finance, vol. 52, no. 5, pp. 2003–2049, Dec. 1997, doi: 10.1111/j.1540-6261.1997.tb02749.x.
S. L. Heston, "A closed-form solution for options with stochastic volatility with applications to bond and currency options," Rev. Financ. Stud., vol. 6, no. 2, pp. 327–343, Apr. 1993, doi: 10.1093/rfs/6.2.327.
M. Rubinstein, "Implied binomial trees," J. Finance, vol. 49, no. 3, pp. 771–818, Jul. 1994, doi: 10.1111/j.1540-6261.1994.tb00079.x.
E. Derman and I. Kani, "Riding on a smile," Risk, vol. 7, no. 2, pp. 32–39, Feb. 1994.
B. Dupire, "Pricing with a smile," Risk, vol. 7, no. 1, pp. 18–20, Jan. 1994.
J. Gatheral and M. Lynch, "Lecture 1: Stochastic volatility and local volatility," in Case Studies in Financial Modeling, Courant Inst. Math. Sci., New York Univ., New York, NY, USA, Lect. Notes, 2004, pp. 1–20.
P. N. Kolm and G. Ritter, "Beyond Black-Scholes: A new option for options pricing," WorldQuant J., vol. 2, no. 1, pp. 1–12, 2022. [Online]. Available: https://www.worldquant.com/ideas/beyond-black-scholes-a-new-option-for-options-pricing/.
P. Virtanen et al., "SciPy 1.0: Fundamental algorithms for scientific computing in Python," Nat. Methods, vol. 17, no. 3, pp. 261–272, Mar. 2020, doi: 10.1038/s41592-020-0772-5.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Attribution-ShareAlike 4.0 International License
https://creativecommons.org/licenses/by-sa/4.0/