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.