Language bindings for QuantLib
Questions tagged [quantlib-swig]
75 questions
1
vote
1 answer
How to obtain the "time" values of a schedule
Assuming a fixed rate bond with the schedule shown in the sample code below.
I am able to obtain the number of days between the tenors by using the businessDaysBetween function.
Now I would like the "time value". Is there a way of doing it without…

ulrich
- 3,547
- 5
- 35
- 49
1
vote
1 answer
QuantLib installation in Python
Can someone assist with up-to-date instructions for the installation of the QuantLib in Python. I have used the instructions on this link https://vineetv.wordpress.com/2015/07/07/installing-quantlib-python-windows/ and followed the video on this…

ccc
- 189
- 1
- 3
- 12
1
vote
1 answer
Quantlib 1.9.1 in Python breaks after call to SimpleQuote.setValue
I cannot use one of the useful functions in QuantLib when using python. Here is a simple example from QuantLib manual (one of Jupyter notebooks). I am reproducing a piece of code that reliably breaks on my Mac.
from QuantLib import *
today =…

mnos
- 11
- 2
1
vote
1 answer
java.lang.UnsatisfiedLinkError when trying to follow an MIT example on SWIG usage of C++ callbacks
I am trying to implement a simple application which enables C++ to do callbacks into Java. To this, I found some examples written many years ago by some people at MIT: https://github.com/swig/swig/tree/master/Examples/java/callback
However, when…

Evil Washing Machine
- 1,293
- 4
- 18
- 43
1
vote
1 answer
Visual Studio 2015 Python 3.5 debug startup error
Python 3.5 debug startup error
I tried to start a small Python program in DEBUG mode using Visual Studio 2005. But it fails to get to the first statement which is an import statement. Why does it get a __file__ error as described below?
A Quantlib…

Gerard N
- 59
- 6
1
vote
1 answer
Daily Pricing of a Bond with QuantLib using Python
I would like to use QuantLib within python mainly to price interest rate instruments (derivatives down the track) within a portfolio context. The main requirement would be to pass daily yield curves to the system to price on successive days (let's…

Charles
- 439
- 4
- 18
1
vote
1 answer
How to add QuantLib to a virtualenv (ubuntu)
I am using pydev and a virtualenv (which has already been set up successfully). How do you add quantlib (and for that matter any python wrapper plus its C++ native library) to a virtualenv?
I successfully built quantlib and the quantlib-SWIG from…

rnoodle
- 534
- 2
- 5
- 21
1
vote
1 answer
Quantlib-SWIG - how to do a clean rebuild on windows/msvc
I had Quantlib (1.4) and Quantlib-SWIG/Python successfully installed (compiled using MS Visual Studio Express 2013 for quantlib and as per the readme, using python setup.py build followed by python setup.py install. )
I then wanted to modify some of…

Bubz0
- 392
- 2
- 10
1
vote
2 answers
QuantLib bindings for Octave?
I want to use QuantLib from Octave.
From the QuantLib site:
QuantLib is written in C++ with a clean object model, and is then
exported to different languages such as C#, Objective Caml, Java,
Perl, Python, GNU R, Ruby, and Scheme. The…

Homunculus Reticulli
- 65,167
- 81
- 216
- 341
1
vote
1 answer
QuantLib + Python: TARGET() macro and default calendar (RuntimeError: option expired)
I am using Quantlib to perform calculations on historic data.
After setting up the required framework (curves etc), When I call option.ImpliedVolatility() I get the following exception thrown (for options that have expired):
File…

Homunculus Reticulli
- 65,167
- 81
- 216
- 341
1
vote
1 answer
quantlib-swig bindings via python in visual C++ 2008 express, appear link error
files:
D:\Program Files (x86)\Microsoft Visual Studio 9.0
D:\Program Files (x86)\Microsoft Visual Studio 9.0\boost_1_50_0
D:\Program Files (x86)\Microsoft Visual Studio 9.0\QuantLib-1.2
D:\Program Files (x86)\Microsoft Visual Studio…

coolahao
- 25
- 6
0
votes
1 answer
QuantLib: null term structure set to this instance of index
I'm playing around with QuantLib-Python and trying to price an interest rate cap using Hull-White 1-Factor model.
import QuantLib as ql
sigma = 0.35
a = 0.1
today = ql.Date(18, ql.May,…

Hasek
- 209
- 1
- 5
- 13
0
votes
1 answer
QuantLib swap pricing, index fixing leg missing
I upgraded QuantLib to the latest version 1.29, but my existing code started an error of vanilla swap pricing. I went back to documentation, and tried the sample code, but the error comes too.
The error message as followings,
RuntimeError: 2nd leg:…

Nick
- 73
- 6
0
votes
0 answers
problem using Quantlib to get price/yield/interest of a CPIbond instrument
I am trying to analyze a TIP security using Quantlib. I have not been able to find much documentation but I managed to find an example from 2015 that supposed worked because it was posted as a solution. The example no longer works and the problem…

mf409
- 1
0
votes
1 answer
Quantlib Mac OSX - ld: symbol(s) not found for architecture arm64
I want to install Quantlib from source to enable intraday support for Python. When installing QuantLib from source on Mac OSX 11.1 with M1 chip I am facing a problem during the 'make' in the tests.
Undefined symbols for architecture arm64:
…

pipino
- 1