Using QuantLib for American Basket Option Pricing
Summary
The document asks for free software to price high-dimensional American basket options under the Black–Scholes model using the Longstaff–Schwartz, or least squares Monte Carlo, method. It seeks control over the number of basis functions, simulation paths, and time steps. The accepted answer recommends QuantLib, an open-source C++ library with Python bindings, and points to its shipped option examples and an external tutorial demonstrating single-asset American option pricing with a binomial tree.
The answer identifies a plausible library and learning resources, but it does not show that QuantLib provides the specific basket-option implementation or the requested parameter controls. The cited tutorial uses a different pricing method and a single underlying, so it is introductory context rather than evidence that the requested high-dimensional least squares Monte Carlo setup is directly available. Readers would need to check the relevant QuantLib interfaces and examples before relying on it for this use case.
Key ideas
- The question concerns American basket options priced by least squares Monte Carlo under Black–Scholes assumptions.
- The answer recommends QuantLib, which is written in C++ and has Python bindings.
- The document points to library examples and a single-asset binomial-tree tutorial for orientation.
- It does not establish that the suggested resources cover high-dimensional baskets or expose the requested simulation controls.
Tags
Full text
# Software for American basket option pricing using Longstaff-Schwartz/Least Squares Monte Carlo method # Software for American basket option pricing using Longstaff-Schwartz/Least Squares Monte Carlo method Is there free software (preferably in Python) that computes American basket (high-dimensional!) option prices in the Black Scholes model using the Longstaff-Schwartz algorithm (also known as Least Squares Monte Carlo)? Optimally, I want to be able to control the number of basis functions, the number of Monte Carlo samples and the number of time steps used. ## Answer by byouness (score 1, accepted) https://quant.stackexchange.com/a/39539 QuantLib is what you are looking for. It is free/open source library written in C++, it is available in Python as well (via SWIG): https://www.quantlib.org/install/windows-python.shtml Examples are shipped with QuantLib and among them some show how to price options. To get a feel for what it's like, you can check this blog post, explaining how to price an American option on a single asset using a binomial tree in Python: http://gouthamanbalaraman.com/blog/american-option-pricing-quantlib-python.html
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.