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
5
votes
2 answers

QuantLib C++ library - FixedRateBond coupons

With the QuantLib C++ library, I'm trying to evaluate bonds which have different coupons during their lifetime (for example 6% for the first three years, then 4% for the remaining three years). I noticed that the constructor of the FixedRateBond…
Enrico Detoma
  • 3,159
  • 3
  • 37
  • 53
4
votes
1 answer

Cash-settled swaptions pricing in QuantLib-Python

I am trying to price a cash-settled swaption in QuantLib using the swigged python version, the code is as follows: import QuantLib as ql # QL session today = ql.Date(2, ql.January, 2019) ql.Settings.instance().evaluationDate = today # Underlying…
byouness
  • 1,746
  • 2
  • 24
  • 41
4
votes
1 answer

install RQuantLib on Microsoft Windows

I need to install the R package RQuantLib on a Microsoft Windows machine. There is no binary for this package so I downloaded the tar source. I opened it and it contains the QuantLib C++ libraries. So I need to compile the package. I don't want to…
RockScience
  • 17,932
  • 26
  • 89
  • 125
4
votes
1 answer

QuantLib: Building Key Rate Risks

I was able to build a discount curve for the Treasury market. However, I'm looking to use this to find the key rate risks of an individual bond (and eventually a portfolio of bonds). The key rate risk I'm looking for is if I have a 30Y bond and we…
user6142489
  • 512
  • 2
  • 10
  • 28
4
votes
1 answer

QuantLib cpibond bond example in Python

I am trying to get the official C++ cpibond example working in Python. The original example is here: https://github.com/lballabio/quantlib/blob/master/QuantLib/test-suite/inflationcpibond.cpp and for scala here:…
Charles
  • 439
  • 4
  • 18
4
votes
1 answer

How to set a Custom Schedule Quantlib?

I'm working on a project where I'm using Quantlib to perform some bond calculations, such as yield and duration. Plugging in listing date maturity date, face value, calendar, day count convention etc and get the yield and duration value out is…
4
votes
0 answers

Linker warnings in boost and quantlib for ios - cant seem to get rid visibility warnings

I've been able to compile and build the frameworks for boost and quantlib on XCode 4.6 and iOS 6.1 (and armv7s!): boost - used boostoniphone-galbraithjosephs script modified to ios 6.1 and boost 1_53_0 (thank you Joseph!) quantlib - used Philip…
ski_squaw
  • 972
  • 1
  • 11
  • 21
3
votes
1 answer

Swaption pricing in QuantLib

I posted this on Wilmott too, wasn't sure which would get more of a response. I'm relatively new to the world of Quantlib (and C++ . . .), so perhaps this is quite obvious. I'm trying to figure out if Quantlib can price forward premium vanilla…
keynesiancross
  • 3,441
  • 15
  • 47
  • 87
3
votes
1 answer

QuantLib in Python - cannot pickle 'SwigPyObject' object

I complied QuantLib in Visual Studio 2017 and built the library under Release x64. Then I installed QuantLib Swig according to the instruction here: https://www.quantlib.org/install/windows-python.shtml The directories in VS are set as in the…
yi_fr
  • 33
  • 1
  • 3
3
votes
1 answer

Can I manage QuantLib (nicely) with CMake and vcpkg?

I would like to use vcpkg to manage my packages. I would also like to use CMake to manage my builds. Is it possible to include quantlib library without resorting to hard coded links? Something like find_package(quantlib)? EDIT: Things I've tried to…
Steven
  • 253
  • 3
  • 11
3
votes
1 answer

Quantlib-python No constructor defined

I am trying to instanciate the class Forward as below import QuantLib as ql calculation_date = ql.Date().todaysDate() ql.Settings.instance().evaluationDate = calculation_date day_count = ql.Thirty360() yield_ts_handle =…
3
votes
0 answers

RQuantlib - FixedRate Bond with negative Rates

Following up on this thread, is there a way to price a Bond with negative rates? I use R (3.5.3) and installed the current version of RQuantlib (0.4.10). When I try to price a Bond with negative rates I always get the same error as in the linked…
rainer
  • 929
  • 2
  • 14
  • 25
3
votes
2 answers

FX vanilla call price in Quantlib doesn't match Bloomberg

Quantlib price for vanilla european EURUSD call option doesn't match bloomberg OVML price. e.g. for below option Quantlib value =4.60991, BBG value=4.6137, error=0.0038 (while it should be ~1e-6 difference ) As far as I know the time for volatility…
alex
  • 1,757
  • 4
  • 21
  • 32
3
votes
2 answers

Using QuantLib to compute cash flows for floored FloatingRateBonds

I'm encountering an issue generating cash flows from bonds with a floor. I initially had an issue because I neglected to set a pricer. I've since set a pricer as below. ql_bond = QuantLib.FloatingRateBond(settlement_days, #settlementDays …
3
votes
1 answer

Using QuantLib to compute cash flows for FloatingRateBond with Floor

Very new to QuantLib so guessing this is a rookie mistake. Enjoyed getting to know this powerful library so thank you to the authors and contributors! I'm able to generate amounts for cashflows for a FloatingRateBond without a pricer if there isn't…
user402078
  • 63
  • 3
1
2
3
26 27