Questions tagged [quantlib]

Quantlib is an open-source C++ library for quantitative finance.

Filter by
Sorted by
Tagged with
0
votes
0answers
29 views

QuantLib Python: how to retrieve the Yield Term Structures connected to a VanillaSwap Object

For pricing a fix vs. float swap in QuantLib Python two YieldTermStructure Objects are necessary: one for forward rate estimation connected to a FloatingRateIndex Object, and one for discounting the ...
8
votes
1answer
5k views

Use QuantLib Python to calculate Swap DV01

I would want to use QuantLib Python to calculate DV01 of an interest rate swap. Initially I was thinking of calculating the fixed leg DV01 and floating leg DV01 separately, then add both legs DV01 ...
8
votes
0answers
567 views

Replicating Bloomberg Swap Prices with QuantLib

I'm trying to learn more about the QuantLib python package and as an exercise I'm trying to replicate some swaps on Bloomberg. However, when I do so, it seems like my swaps are consistently ...
2
votes
2answers
799 views

In quantlib (python), is there a way to specify settlementdays for a swapratehelper without having to also give discountCurve?

Using the following Python code I am setting USD LIBOR Swap quotes. I found that by default settlementdays uses whatever is associated with the Index (in C++: ...
0
votes
0answers
26 views

Price of a forward delivery bond - Quantlib python

I would like to find the bond price today which has already been issued but delivered later. Basically, the price won't include some of the coupons till the delivery date. Let's say 10 year bond ...
1
vote
2answers
495 views

Quantlib ZeroCurve interpolation

I'd like to check how QuantLib does interpolation on rates if I use ZeroCurve constructor. As it was mentioned here, by using curve.nodes() you can get a list of ...
0
votes
1answer
125 views

Canada House Trust Floater pricing

I am using python quantlib, according to one of the Quantlib sample code to evaluate the CHT (Canada Housing Trust) Floaters, and the index I am using is CDOR, and somehow the price I got is always ...
0
votes
1answer
28 views

Using QuantLib to get all holidays currently published by an exchange in multiyears without specifying a range

Is there a way to get a list of all the holidays published in an exchange calendar without specifying a date range? For example, NYSE has published their holiday calendar up to 2024 and I want to see ...
1
vote
2answers
231 views

Repricing SOFR Quotes and Non-Zero NPV

I generated/calibrated a SOFR Curve using Quantlib Python and would like to know why when repricing the swaps have non-zero NPVs. Appreciate any assistance. Thank you. Parameters ...
0
votes
1answer
238 views

Bootstrapping the 6m Sterling Libor curve

I am trying to bootstrap the 6m sterling swap curve using the depos and swap rates codes are below. I am a newbie and have been following (or at least trying to!) the python cookbook. I wanted to know ...
0
votes
0answers
39 views

Quant Lib Reconcilation of output with Open Gamma Java Library

The Strata project is the new pure Java market risk quant library from OpenGamma. If we price a vanilla swap and compare results between Strata and Quant Lib or Bloomberg terminal will it reconcile?
10
votes
3answers
9k views

What is the best alternative of Quantlib library

We need to build a Fixed Income Portfolio Risk Analytics solution. Somehow due to administrative reason we can't use Quantlib which is written in C++, even call it through SWIG via JNI. We have tried ...
1
vote
0answers
202 views

Quantlib : Valuation of inflation swaps of EUR-RPI using quantlib python?

Below is the sample code to compute the inflation swaps. I have referred the Quantlib cookbook to get the flavor of Inflation swaps. But I feel that the term structure and final NPV is not accurate ...
1
vote
1answer
122 views

QuantLib: How to import indexes from QuantLib?

I am trying to import indexes from QuantLib for my further analysis and term structures. But below code is not working and giving me 'ModuleNotFoundError'. Please suggest if this the correct way of ...
0
votes
0answers
42 views

Forward Price from Spot Price QuantLib

Is there a way to compute the forward price of a bond from its spot price in QuantLib? Based on the documentation and on examples online, it seems that it is only meant to be used with a yield term ...
1
vote
1answer
141 views

QuantLib in Python - RuntimeError: could not bootstrap optionlet:

I receiving the following error when I try to compute a cap price. However, I'm not sure how to solve this error. " error: nu (-1.00062) must be >= -1.0 expiry: June 4th, 2020 annuity: 0....
0
votes
1answer
155 views

Configuring barrier option in Quantlib-Python

Is there a possibility to configure the period the barrier is active, using Quantlib for python? Namely to set up the start and the end dates we compare the spot vs the barrier. If we look at quantlib-...
0
votes
2answers
271 views

How to make futuresHelpers in Quantlib work with monday settlement day not IMM?

My EuroDollar futures have monday of third week expiration and settlement date from CME exchange how ever Python Quantlib doesn't seem to like it. Anyway I can get away with IMM check? futures = { ql....
2
votes
1answer
47 views

Quantlib: How to print the maturity dates or pillars from the helpers in Quantlib python?

I am trying to value inflation swaps using necessary functions from quantlib and successfully completed the valuation. Underneath helper function is working well for most of the swaps. But few swaps ...
0
votes
1answer
87 views

Evaluating swaptions with negative interest rates

Does anyone know if it is possible to evaluate swaptions with negative interest rates with Quantlib? ...
1
vote
2answers
580 views

QuantLib: ImportError: DLL load failed:

I intalled quantlib using "pip install QuantLib" and now I'm getting the below error. I'm using windows 10 and Spyder IDE. I don't see any dll file called _QuantLib, only _QuantLib.cp37-...
0
votes
0answers
33 views

Antithetic method in GaussianMultiPathGenerator quantlib

I am trying to generate MS simulation paths as well as antithetic paths, however when I try to use the Pathgenerator.antithetic(), it gives me the exact same result of the Pathgenerator.next(). here's ...
1
vote
1answer
54 views

Quantlib endOfMonth bool

my question is two fold and if the legend Luigi answers this question it would make my day. what is the purpose of this endofMonth boolean in the depoit or fra or swap helper functions. what is the ...
1
vote
1answer
99 views

Quantlib match clean price with bbg clean price

I'm trying to match QL clean price with BBG clean price for POLGB 2.75 10/25/29 1029 priced for 15th of October 2021 for 2.5% yield. I'm not sure if my setup of bond is wrong or if there is a problem ...
1
vote
1answer
92 views

Quantlib HW 1f model calibration not fitting to market normal vol quotes

I am using Quantlib python to calibrate HW 1f model parameters from normal swaption vols quoted in the market (following the code in the cookbook - I fit both the mean-reversion & vol to market ...
0
votes
1answer
271 views

QuantLib Compounded vs CompoundedThenSimple and Simple vs SimpleThenCompounded

I was experimenting on a FixedRateBond on QuantLib python port and have a question on the use of Compounded vs. CompoundedThenSimple methods of discounting. I am using the FixedRateBond.dirtyPrice() ...
1
vote
1answer
135 views

QuantLib Inaccurate - American Put Option with Discrete Dividends

I'm trying to use the QuantLib library to price American options that pay discrete dividends. The call options are priced with good accuracy (generally <0.1% error), however the same inputs for a ...
3
votes
1answer
1k views

QuantLib CDS pricing error: negative time given

I am new to QuantLib, and I am using it to price CDS. Following is my python code: ...
2
votes
0answers
69 views

Actual360 convention in quantlib schedule

I'm trying to make a payment schedule for different bonds in quantlib. For example, I made such a schedule: ...
1
vote
0answers
65 views

Pricing Asian and barrier option using Quantlib

I am exploring to use the ql.FdBlackScholesAsianEngine and ql.FdBlackScholesBarrierEngine using python code to price commodity options with implied volatility from traded European or American options. ...
0
votes
1answer
122 views

Specify fixing days for floating leg in Interest Rate Swap valuation using QuantLib Python

I am trying to price an Interest Rate Swap using QuantLib Python, and everything seems to be fine. However, I can't seem to understand where I can specify the number of fixing days. Below are my codes....
0
votes
1answer
92 views

How to make a schedule for amortizing bonds in python quantlib?

I am trying to make a schedule for amortizing bonds in quantlib, but have no idea how to include amortization in this schedule. I have the following bond: ...
0
votes
2answers
208 views

question on QuantLib schedule to get bond coupon payment dates - python

sorry the original question was answered by an expert but somehow I cannot edit the original question and add comments. so posting it again with some follow up questions: i have a number of bonds that ...
0
votes
0answers
54 views

Help with aligning discount factors and forwards for Interest Rate Swap valuation using Quantlib

I am trying to price an IRS using Quantlib. As a natural benchmark for pricing, I use Bloombergs SWPM function. Before digging into the actual pricing, I want to see if my bootstrapping of the curves ...
0
votes
0answers
59 views

QuantLib - Help buiding a simple T-Bond (Mischievous Pricing Conventions)

Im having a problem getting the right price for a simple T-Bond, maybe a Mischievous Pricing Conventions like Luigi says in his book. Im tying to price "912810SZ Govt" ...
1
vote
1answer
65 views

30E/360 bond payment schedule

I have a bond that was issued on the 30th of April with 30/360 European day convention basis and semiannual compounding. As far as I understand payments should be every 180 days according to the day ...
0
votes
0answers
36 views

VS 2019 error when implementing Equity-linked note using Monte Carlo framework

I am trying to follow the QuantLib codes listed here for Monte-Carlo pricing on an Equity-linked note: [1]: http://mikejuniperhill.blogspot.com/2017/12/quantlib-implementing-equity-linked.html However,...
0
votes
0answers
79 views

Pricing an OIS referencing SONIA with fixing lag

I'm trying to price an Overnight Index Swap referencing SONIA. The swap will have a 5 day fixing lag (i.e using compounded SONIA over the current interest period but with the last rate set 5 days ...
0
votes
0answers
27 views

QuantLib Python - stripped caplet volatilities as input

My market data source provides me with already stripped caplet volatilities as a matrix with strikes in one dimension and caplet maturities in the other dimension. Is there any way to put these caplet ...
0
votes
0answers
41 views

Local Evaluation Date in QuantLib

I am trying to construct a price history for swaps in QuantLib, i.e. to have a timeseries of daily prices for a given swap. I have my rates data on each day, but what I'm struggling with is the ...
3
votes
1answer
112 views

Bootstrapping discount and forward curve (using ESRA) and price a vanilla swap

I am just starting to use Quantlib, and want to try and replicate the SWPM-functionality in Bloomberg, and price a vanilla 5Y EUR OIS. Below is the overall swap data used in BBG: Overall settings ...
0
votes
0answers
22 views

QuantLib C++: Extract RateHelpers from PiecewiseYieldCurve

Is there any way to extract RateHelpers that are used to build the PiecewiseYieldCurve in QuantLib? More specifically, I would like to know whether there is a way to obtain the instruments that are ...
7
votes
1answer
2k views

Mixed local-stochastic volatility model in Quantlib

At a conference the speaker mentioned that it is a standard approach today to use a mix of local and stochastic volatility model in equity, FX and interest rates. Can you please suggest the most ...
3
votes
0answers
59 views

Manual Computation of Python QuantLib's NPV for Pricing of a Forward Rate Agreement

Following the question that I have asked on this link and response obtained, I have managed to price a 3x6 FRA using QuantLib Python, using the following codes: ...
2
votes
1answer
165 views

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 ...
0
votes
1answer
86 views

Is it possible to price a plain vanilla interest rate swap in Python and simulate the price using Hull White 1 Factor Model simultaneously?

I am trying to price plain vanilla interest rate swap (IRS) using QuantLib. What I am trying to do is to generate a path of simulated IRS price by simulating the interest rates using HW 1 Factor model....
0
votes
1answer
46 views

quantlib: make AmortizingFixedRateBond coupon payments equal

I found some unexpected result when trying to call AmortizingFixedRateBond wiht daily coupon payments, but starting in the last day of the month. ...
0
votes
2answers
86 views

Generating a PAR curve from Bond Price Inputs

I am a brand new user to QuantLib and I am running it in Python. I am attempting to generate a PAR yield curve from time to maturity and price input as shown here 'time to maturity': ['30-03-2020','...
0
votes
0answers
22 views

Incorporate Transaction Date to Price Fixed Rate Bond using Quantlib Python

I am trying to use QuantLib Python to price a fixed rate bond, based on the following data: Issue date is 28 September 2017 (issueDate), maturity date is 28 ...
1
vote
0answers
84 views

Schedule, Yield-to-Maturity, and NPV of Fixed Rate Bond from QuantLib Python

I would like to price a fixed rate bond using QuantLib Python. The pricing is fine, however I would like to understand how to extract the Yield-to-Maturity (YTM) of the fixed rate bond, that is, the ...

1
2 3 4 5
8