Skip to content
All library documents

Custom Random Distributions in Longstaff–Schwartz Option Pricing

Article Quant Q&A · Author: Dan La Russa

Summary

The post asks whether QuantLib’s Longstaff–Schwartz Monte Carlo engine for American options can use non-Gaussian random draws, such as Student-t variates, while pricing under a Black–Scholes–Merton process. The author considers changes to distribution and random-number traits, Monte Carlo model components, and possibly the Longstaff–Schwartz and American option engines, then asks how a custom engine might be exposed through Python bindings.

This is an implementation question rather than a completed method: the document gives no answer, code, pricing results, or validation. Its central modeling caveat is that changing the distribution of simulation draws may change the modeled price process, so a custom random source must be consistent with the intended dynamics and risk-neutral pricing assumptions. The proposed QuantLib extension points are tentative and should not be taken as confirmed guidance.

Key ideas

  • The post explores replacing Gaussian simulation draws in an American option Monte Carlo engine.
  • It identifies random-number traits and Monte Carlo engine components as possible extension points.
  • The author also raises the separate task of exposing a custom C++ engine to Python.
  • No implementation guidance or evidence is provided, and the desired process must remain consistent with pricing assumptions.

Tags

Full text
# Can I use the QuantLib Monte Carlo engine to price American options using heavy/fat tailed-distributed random numbers?


# Can I use the QuantLib Monte Carlo engine to price American options using heavy/fat tailed-distributed random numbers?












This might be silly, but I’m seeking to use QuantLib to price vanilla American call and put options using a Black-Scholes-Merton process and the Monte Carlo pricing engine based on the Longstaff Schwartz algorithm.

My question is: Am I confined to Gaussian pseudorandom numbers in this engine? Or can I use pseudo RNs drawn from some other underlying distribution, like Student T, or some other distribution I can generate via the inverse CDF?

Put another way, how do I define a pricing engine for American call and put options that uses random numbers drawn from a student t (or custom) distribution based on mcamericanengine.hpp in QuantLib?

I recognize that I may only have the volatility parameter to modify the shape of my distribution. After investigating the Monte Carlo framework in Quantlib and reading over chapter 6 of “Implementing QuantLib”, here’s what I think I need to do:

• Define a distribution function (mydistribution.cpp and mydistribution.hpp) in math/distributions with a InverseCumulativeMyDistribution class

• Instantiate a class template in rngtraits.hpp

• Define a new SingleVariate traits class in mctraits.hpp

• Define (I think) a MonteCarloModel as in montecarlomodel.hpp

• Do I need to make changes to mcsimulation.hpp, mclongstaffschwartzengine.hpp, and mcamericanengine.hpp as well?

Am I on the right track here? Please pardon my ignorance on this framework as I’m very new to both QuantLib and cpp programming. If by some miracle I get this working, how do I take the extra step and expose this new pricing engine in python via QuantLib-SWIG? I’m willing to put in the work! For reference I have vs 1.25 of QuantLib and QuantLib-Python installed on Windows 10 and confirmed both are working.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.