GitHub - xuruilong100/QuantLibPythonExamples: Reimplementing QuantLib examples by Python (original) (raw)

QuantLibPythonExamples

MORE APIs, MORE examples, MORE test suites.

Introduction

Related blog (in Chinese): https://www.cnblogs.com/xuruilong100/p/13281006.html

Environment:


How to build Python wrapper

Open ../SWIGpy/ and run the following commands.

  1. Generate .cpp file:
swig4.0 -w509 -c++ -python -outdir QuantLib -o QuantLib/ql_wrap.cpp quantlib.i
  1. Compile .cpp file:
CC=icx CXX=icpx python3 setup.py build
  1. Install Python wrapper:
python3 setup.py install

Examples


Test suites