0
$\begingroup$

Is there a good python package for various option pricing models, e.g., Heston, SABR, etc? I found that it's even hard to find a good python implementation of Black-Scholes model (i.e., price + IV + all Greeks implemented in a class).

I know there's QuantLib python, but it is implemented in C/C++. Not to mention I have to install C/C++ compiler, it's quite difficult to quickly test/change for new ideas for research purpose.

$\endgroup$
2
$\begingroup$

If you follow the below instructions, you won't need a C++ compiler. Also, you don't care what language the library is implemented in, all you have to do is call the functions.

Installation from PyPI

If you don't need to modify the wrappers, you might want to try installing a precompiled binary version. The availability of binaries depend on your operating system; to try to install them, run:

pip install QuantLib-Python

If a binary package is available for your system, it will be installed and you will be able to leave this page and use it right away; if not, you'll have to compile it yourself as described in the next section.

source: https://www.quantlib.org/install/windows-python.shtml

$\endgroup$
  • $\begingroup$ Thanks. Changing code won't be easy with QunatLib-Python, but it'll be still helpful, e.g., for checking against my implementation. $\endgroup$ – Jaehyuk Choi Oct 24 '18 at 14:20
  • $\begingroup$ @JaehyukChoi what are you actually trying to do? Changing the code of the library defeats the purpose of using a third-party library. $\endgroup$ – 0xFEE1DEAD Oct 24 '18 at 14:23
  • $\begingroup$ I want to modify codes for research purposes, e.g. testing new methods, etc. It's always easier to do from existing code than from scratch. $\endgroup$ – Jaehyuk Choi Oct 27 '18 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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