1
$\begingroup$

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.

$\endgroup$

1 Answer 1

1
$\begingroup$

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

$\endgroup$
1
  • $\begingroup$ thanks for the suggestion. It works quite nicely, but I have a question on the configuration of the Longstaff-Schwartz algorithm, in case you want to check it out: quant.stackexchange.com/questions/39614/… $\endgroup$
    – Bananach
    May 4, 2018 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.