Questions tagged [quantlib]

QuantLib is a free and open-source library for quantitative finance.

QuantLib is a free and open-source library for quantitative finance. Originally written in C++, it has since been ported to several other languages, including C#, Java, Python, and R.

References

399 questions
1
vote
2 answers

boost 1_48 what bjam? error with bjam mismatched versions of Boost

please help, I have WindowsXP, I have downloaded 3.1.18 bjam from https://sourceforge.net/projects/boost/files/boost-jam/ as it looks like the most recent (but is 2010?) becouse I can't run examples tests from QuantLib the error is: cannot find…
4pie0
  • 29,204
  • 9
  • 82
  • 118
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 Python: How to calculate the price of a zero coupon bond?

I would like to calculate the price of a 5-year zero-coupon bond at 10% interest with a face value of $1000. I expect such a bond to be priced at $620.92 since $620.92 = 1000/((1.10)^5). Here's my attempt in Python (Version 3.9.12) using QuantLib…
D I
  • 15
  • 4
1
vote
0 answers

Python Quantlib construct YTM (not zero) curve

I have non-par yields and maturities. Is there a way to construct a government bond YTM curve using quantlib and YTM of not spot/zero yields, but coupon paying bonds? I am looking at the documentation for Term Structures and Curves; but there is…
darkuss
  • 63
  • 1
  • 6
1
vote
1 answer

Python Quantlib ->TypeError: Wrong number or type of arguments for overloaded function 'new_Thirty360'

I am trying to run the code below, but for some reason on 1 pc it runs normally, on the 2nd one it fails with the below error message; what is the reason that on 1 pc it runs normally and on the 2nd one it fails? the code source…
darkuss
  • 63
  • 1
  • 6
1
vote
0 answers

Quantlib Zero Coupon Inflation Swap Ignores CPI Values

I am trying to price a zero-coupon USD CPI inflation swap in Quantlib and Python. My discount curve and NPV of the fixed leg looks good, but I'm a few percentage points out compared to BBG SWPM on the NPV of the inflation leg. One thing I've noticed…
AGPeddle
  • 65
  • 4
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

How do I amend parameters in a Quantlib Option?

So, I've built a PlainVanilla option in the C# QuantLib wrapper. This is then running in Excel to provide the greeks via Excel DNA. It's all working well. What do I do, for example if the Underlyer Price changes, and I want to reprice the option and…
Nick
  • 11
  • 1
1
vote
1 answer

Quantlib: Bond with both callable and puttable options

I am trying to use quantlib to price a bond with both callable and puttable options. I have seen examples for pricing callable bonds using ql.CallabilitySchedule(). I would like to ask how to include dates and strike prices for both put and call…
1
vote
1 answer

brace-enclosed initializer list conversion error

I have the following old code that used to work on "older" combinations/versions of C++, QuantLib and Boost. While was playing around with the idea of upgrading to newer versions ie C++11, QuantLib >= 1.76, boost >= 1_71 building now throws the…
GWD
  • 1,387
  • 10
  • 22
1
vote
1 answer

Pricing a Forward Rate Agreement using QuantLib Python

Can someone please help with the pricing of the following forward rate agreement using QuantLib Python? A 3x6 forward rate agreement, with a notional of $100,000, the FRA rate being 6%, The FRA settlement date is after 3 months (90 days) and the…
1
vote
1 answer

error: negative time (-9.94444) given when I use QuantLib python to price a floating rate bond

I am trying to use QuantLib python to price a basic floating rate bond but met error negative time (-9.94444) given. My logic is like this: first construct forecast curve (which is based on simply the risk free rate 1.5%); then I construct the…
1
vote
0 answers

QuantLib Python Hull-White Callable Bond with Normal Volatility

I am evaluating several callable bonds using QuantLib Python Cookbook's approach below with Hull-White model Is the sigma below in ql.HullWhite normal or log-normal volatility? If it is log-normal, are there any ways to feed normal volatility…
1
vote
0 answers

Does QuantLib Python provide pricing for bond options and preferred shares?

Does QuantLib Python provide pricing for bond options and preferred shares? If no existing methods available, any suggestions?
1
vote
1 answer

module 'QuantLib' has no attribute 'CallabilityPrice'

I have pip installed newest QuantLib for python 1.23 for Windows. ql.Callability() is available but ql.CallabilityPrice is not provided. Is there any issue?