Products
kdb+
kdb Insights
KDB.AI
Delta
Sensors
Surveillance
Market Partners
Cloud Service
Data Lake
Market Data
Services & Support
Learn
Documentation
KX Academy
Developer Blog
YouTube Channel
Connect
KX Community
Slack Community
StackOverflow
Events
Build
By Deanna Morgan
As an addition to the technical whitepapers curated on the KX Developer’s site, this paper compares methods of pricing options in kdb+/q. This work looks specifically at Black-Scholes, Monte Carlo and Quasi-Monte Carlo Methods and the use of Sobol sequences to improve results, in place of more traditional random number generation algorithms. This work follows the methods presented in a paper by S. Kucherenko et. al 2007. [1]
For almost 50 years, the most commonly used model for pricing options is Black-Scholes. In the paper, I look specifically at the use of the Black-Scholes models for European and Asian call options. In each case, the Black-Scholes model produces a closed-form solution with a deterministic result. In addition to Black-Scholes, Monte Carlo (MC) methods can also be used in option pricing, where random experiments are run with an average price returned based on the option type and the strike price.
The use of MC simulations in the financial industry stems from the need to evaluate complex financial instruments and the lack of analytical solutions available to do so. MC methods are used to mimic the uncertainty associated with the underlying price of an instrument and are subsequently used to generate a price based on the possible underlying factors. These models are based on pseudo-random numbers which despite being ubiquitous, exhibit very slow convergence, often at a rate of O(1N) where N is the number of sampled points.
To improve upon these models, Quasi-Monte Carlo methods have been developed which use a low-discrepancy sequence (LDS) to generate rates of convergence on the order of O(1N). Many practical studies have proven that the Sobol’ LDS is superior to other LDS’s in a number of ways. The most effective Quasi-Monte Carlo method as applied in financial engineering is based on Sobol’ LDS. [2-5]
In the whitepaper, I compare the use of both Monte Carlo (MC) and Quasi-Monte Carlo (QMC) methods for pricing Asian and European call options. In doing so, I consider the use of two discretization schemes – standard discretization and Brownian bridge construction. The Black-Scholes price for each market is compared to an average price generated using the following combinations of simulation and discretization methods:
Once both the Black-Scholes and MC/QMC prices have been calculated for each market, the RMSE can be calculated between the two. This is demonstrated in the final example in the paper. The process is repeated for an increasing number of paths, with resulting errors compared.
The full paper, code and Jupyter notebook explaining how to price Asian and European call options using the aforementioned methods can be found on the KX Developer’s site.
If you have any questions about the above work, please reach out to dmorgan1@kx.com or Sergei Kucherenko at s.kucherenko@broda.co.uk.
References
[1] S. Kucherenko et al. 2007, ‘The Importance of Being Global – Application of Global Sensitivity Analysis in Monte Carlo Option Pricing’, Wilmott, pp. 82–91. Available at http://www.broda.co.uk/gsa/wilmott_GSA_SK.pdf. Accessed September 3, 2019.
[2] S. Kucherenko et al. 2001, ‘Construction and Comparison of High-Dimensional SobolGenerators’, Wilmott, Nov, pp. 64-79. Available at http://www.broda.co.uk/doc/HD_SobolGenerator.pdf. Accessed September 23, 2019.
[3] Broda. Broda.co.uk. http://www.broda.co.uk. Published 2019. Accessed September 23, 2019.
[4] P. Jäckel 2001, ‘Monte Carlo Methods In Finance’, pp. 122.
[5] P. Glasserman 2003, ‘Monte Carlo Methods in Financial Engineering’, Springer.