Questions tagged [quantlib-swig]

Language bindings for QuantLib

75 questions
2
votes
1 answer

How to pass boost::none to Python Quantlib

This is linked to one of my earlier question: Quantlib passing a date vector to Schedule class Basically, I have got everything working in C++. If I use Python, know how can I pass boost::none into a Python function? Many thanks.
Ben10
  • 121
  • 1
  • 13
2
votes
1 answer

build a simple BlackVarianceSurface in python

I am trying to build a BlackVarianceSurface so that I can compare interpolation result with mine. What i did is todaydate = Date(1, January, 2010) maturity=[] for i in range(24): maturity.append(Date(1, January, 2010)+Period(i, Months)) k =…
archlight
  • 687
  • 1
  • 6
  • 12
1
vote
1 answer

How to set the environment variable QL_NET in Visual Studio 2010 for QuantLib+SWIG

I have a pre-compiled QuantLib+SWIG* project that I am using in C# to calculate options prices. I would like to add a class to QuantLib but I am having trouble creating the SWIG glue. After adding the class to my copy of the QuantLib source, I…
user1214135
  • 625
  • 2
  • 11
  • 22
1
vote
0 answers

Actual365Fixed.NoLeap no ois fixing on 28 Feb - Quantlib

When building an ois curve in quantlib using dayCounter = ql.Actual365Fixed(ql.Actual365Fixed.NoLeap) The index is worth 0 for every 28 feb of every leap year. import QuantLib as ql YieldTS = ql.RelinkableYieldTermStructureHandle() index =…
vpvp
  • 11
  • 2
1
vote
1 answer

QuantLib how to use in goland?

to calculate option price which use QuantLib,but QuantLib do not supported in goland. "QuantLib is written in C++ with a clean object model, and is then exported to different languages such as C#, Java, Python, R, and…
1
vote
1 answer

Swig c++/c# keep getting "Type Initialized Exception"

I am currently creating my first swig project. I have some c++ code, where i am using 1 of the classes functions in my c# UI. I have created a .i file that looks something like this: %module mymodule %{ #include…
user812352
  • 83
  • 7
1
vote
1 answer

QuantLib-SWIG-1.19 python 'from . import _QuantLib' fails

I downloaded QuantLib-SWIG-1.19 for Windows 10 . I was able to build and install the python version. But it fails the test when it tries to run build_ext. SET QL_DIR=C:\Users\admuser\Workspace\QuantLib-1.19 SET…
Gerard N
  • 59
  • 6
1
vote
0 answers

AttributeError: module 'QuantLib._QuantLib' has no attribute 'delete_SwigPyIterator' in python

I just finished compiling QuantLib in Visual Studio and by installing module via SWIG. Testing and everything worked fine. Now in Spyder, when I want to import QuantLib, I get the following error: AttributeError: module 'QuantLib._QuantLib' has no…
Lorcan
  • 11
  • 1
1
vote
2 answers

Building QuantLib python bindings on windows 7: 'unrecognized command line option '-mno-cygwin''

I'm trying to build the QuantLib Python bindings. I managed to build QuantLib using these instructions (I found the libboost_serialization files here). When I try python setup.py build, I get the following error python setup.py build running…
John Salvatier
  • 3,077
  • 4
  • 26
  • 31
1
vote
0 answers

Failed Quantlib / Quantlib SWIG installation: undefined symbol

Wonder if you can help me. I am trying to install Anaconda / Boost / Quantlib for a financial markets proof of concept (determining counterparty potential forward exposure using Spark). I am using AWS EC2 Linux 2 (x86 - 64 bit) instance. I have…
F Smi
  • 51
  • 2
  • 6
1
vote
0 answers

QuantLib-Python: Solving non positive time forward error using quantlib Schedule for VanillaSwap instrument

I am trying to price a forward swap using a bootstrapped curve in the QuantLib environment. For my valuationDate of 2019-04-04, the curve bootstrap runs as expected. I am also able to easily price a 10Y10Y foward start swap. The problem arise when I…
1
vote
1 answer

Quantlib 1.14 and Quantlib1.14-SWIG: versions of Visual C++ prior to VC++10 (2010) are no longer supported

I downloaded tarbals for both quantlib 1.14 and quantlib 1.14-swig. The quantlib folder under SWIG does contain the quantlib_wrap.cpp. But the setup complains the the MSC version. Here is the new error. This post is associated with another post on…
MagicFatto
  • 21
  • 4
1
vote
1 answer

Quantlib-SWIG 1.12.x for Python error, missing Quantlib/quantlib_wrap.cpp in windows

I downloaded both Quantlib-SWIG 1.12.x and Quantlib 1.12.x from github. Quantlib is compiled without and problems. The examples ran normally. However, when run python setup.py build, there is an error indicating missing quantlib_wrap.cpp. Where to…
MagicFatto
  • 21
  • 4
1
vote
2 answers

Exposing Quantlib and another library to C# via SWIG

Compiling and linking Quantlib takes some time, as it is not a small project. I am building some additional functionality on top of Quantlib, and I want to keep this additional functionality in a separate project. Is there a way to easily expose two…
A-K
  • 16,804
  • 8
  • 54
  • 74
1
vote
2 answers

Issue installing QuantLib Python

I am trying to install QuantLib Python. So, I followed through and installed: 1) Anaconda3, boost_1_64_0, QuantLib-1.10, QuantLib-SWIG-1.10,swigwin-3.0.12. 2) I installed using Visual Studio 2017, QuantLib. I followed a youtube video and managed to…
Oniropolo
  • 879
  • 2
  • 12
  • 18