Skip to main content

Questions tagged [quantlib]

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

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

Quantlib - Clarification on iborStartDate in FuturesRateHelper

I'm currently working with QuantLib's FuturesRateHelper and I'm a bit confused about the iborStartDate parameter. According to the documentation and some code snippets, iborStartDate is used like this:...
1 vote
1 answer
260 views

Bootstrapping yield curve with forward rates using QuantLib

I'm attempting to calculate a GBP yield curve using a USD OIS rate curve and the FX Forward rates using Quantlib. I am trying to replicate the output of a different library, and am close but can't ...
3 votes
1 answer
1k views

FX curve stripping beyond one year (with CCS and NDS)

In QuantLib, the FxSwapRateHelper allows to create bootstrap a curve FX Swap quotes. For instance, the link below includes example of bootstrapping PLN yield curve using EURPLN spot rate and forward ...
0 votes
1 answer
50 views

Difference in duration between zero 0 rate fixed coupon bond and zero coupon bond in Quantlib

I am trying the following example of calculating duration and convexity for a zero coupon bond. For the sake of an easy example, I set the Interest rate to be zero. In the first attempt, I try using ...
0 votes
1 answer
36 views

Type of rates required for ql.OvernightIndex

I'm trying to bootstrap the new F-TIIE curve for mexico. It is an overnight curve which fixings are 1 day forward rates published daily by the central bank of Mexico. On holidays, the last fixing is ...
0 votes
4 answers
138 views

Python QuantLib datecount ActualActual basis vs Matlab daycount basis

I am translating a code from MATLAB to Python and I need to find equivalent setting to MATLAB’s day-count basis of 0 = actual / actual. My MATLAB code uses date2time function to determine the length ...
1 vote
0 answers
45 views

How can calculate the American put option's vega,rho? [closed]

The QuantLib's version in my os: import QuantLib as ql ql.__version__ '1.34' All the arguments related to the put option: ...
0 votes
0 answers
27 views

"settlement day" setting in QuantLib for bootstrapping the interest rate curve

I have been attempting to bootstrap zero rates/discounting factors using QuantLib. It seems to me that the results I obtained using QuantLib are pretty close to Bloomberg values for SONIA curve, and ...
0 votes
0 answers
57 views

Quantlib Hull-White long term rate simulation

I have an idea of how to simulate short rate in Hull-White 1F model using QuantLib (Hull White Term Structure Simulations with QuantLib Python). I am not sure if there is any way to simulate a long-...
0 votes
0 answers
30 views

Bootstrapping a yield curve based on instruments with different spot lags

Recently I've had to pay closer attention to the minutiae of interest market conventions regarding fixing and settlement dates, and there's something I'm really struggling to get. If I understand it ...
0 votes
1 answer
2k views

Quantlib InterpolatedDiscountCurve zero forward-rate at endpoint

I use QuantLib Python to calibrate a curve based on interpolated discount factors (https://github.com/lballabio/QuantLib-SWIG/blob/master/SWIG/discountcurve.i). Using LogLinear interpolation on ...
4 votes
1 answer
3k views

Bootstrapping OIS curve

I am trying to get a zero curve from a series of EONIA-based OIS rates with Quantlib. When comparing my output with Bloomberg, I find some differences (see at the end of the question), and and I don't ...
1 vote
1 answer
283 views

GBP OIS Curve - Zero Rate Curve Calculation in Quantlib

I am new to Quantlib and I am looking to create a Zero Rate Curve from GBP OIS to then use to calculate the present value of fixed rate bonds. I have Looked at the documentation: https://quantlib-...
1 vote
1 answer
581 views

Central Bank Meeting Date Curve in QuantLib

Is it possible to construct a central bank meeting date curve, using futures prices & OIS rates, in QuantLib? Specifically, I mean a yield curve with flat (constant) forward rates in between ...
1 vote
0 answers
463 views

Quantlib: swap curve discount rate from spot rates

I'm new to Quantlib on Python and I'd like to use the overnight swap rate from Bloomberg to derive the swap curve discount factors. I don't know which yield term structure I should specify? I checked ...
0 votes
1 answer
88 views

Pick the price of plain bond off Hull-White Tree

Since we can use Hull-White tree to calculate the price of a option embedded bond, which can be achieved by the QuantLib pricing engine TreeCallableFixedRateBondEngine, can this engine be also used to ...
2 votes
0 answers
94 views

Can effective duration > modifed duration for a callable bond? I get that in QuantLib

I am using QuantLib to create a CallableFixedRateBond. I set up the HullWhite model as the pricing engine and compute effective duration and modified duration. Given the price of the bond is heavily ...
1 vote
1 answer
879 views

SOLVED Manually Recomputing Forward Rates from QuantLib Python

I have used QuantLib Python to compute 1-month forward rates from zero rates as at 05 December 2019. My codes can be found below: ...
2 votes
3 answers
1k 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
0 answers
32 views

How to Bootstrap a daily compounding future in QuantLib

Hi I am currently tying to bootstrap the F-TIIE curve for mexican swaps In the short term it uses the F-TIIE Futures. These F-TIIE futures are 1 month futures that start on the first day of the month ...
0 votes
0 answers
57 views

ql.OvernightIndexFutureRateHelper asking for a fixing, but not able to add it

I´m trying to make a Overnight Index FutureRateHelper but when bootstrapping, the following Error arises: RuntimeError: 1st iteration: failed at 1st alive instrument, pillar May 31st, 2024, maturity ...
0 votes
1 answer
294 views

Quantlib: How to bootstrap FedFunds Index having other tenors 3M, 1Wk, etc?

I am valuing few Basis Swaps having combination of USD-FedFunds-H.15-OIS-COMPOUND3M vs USD3MLibor. However, I can understand to value 'USD-FedFunds-H.15-OIS-COMPOUND1D' by using ql.FedFunds(). But ...
0 votes
1 answer
504 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 ...
5 votes
1 answer
270 views

Recommended Setup for QuantLib-Python AmortizingFloatingRateBond

I am trying to model a term loan in QuantLib-Python that makes quarterly interest payments at CME Term SOFR 3M + 10bps + 525bps paid in arrears with a 2 business ...
3 votes
1 answer
2k views

Quantlib: day-by-day evaluation of option value

I'm using Quantlib in Python to price an FX option. I'm comparing the result to Bloomberg, to make sure the code is working correct. I want to calculate the P&L of a certain option trading ...
-2 votes
1 answer
85 views

Get upfront bps from a CDS with QuantLib

I have an example the pricing of a CDS in Excel and I am trying to match it with QuantLib, in order to get the upfront bps. Below there is a print of the excel screen where I know all the values are ...
2 votes
2 answers
201 views

Ibor Index with Flat Curve 5% not retrieving exact 5% fixings

I have defined an Ibor Index with the python version of Quantlib using a Flat Forward Curve of 5%. When I get an estimate for a date in 3 months from now, I would expect to get ...
0 votes
1 answer
145 views

QuantLib swap Fair Rate not the same as the constructed curve nodes

I'm having trouble getting the same nodes when evaluating Fair Rates for a Mexican TIIE swap. I think my problem is in the MXNOIS curve creation, but I'm not sure. For evaluating, I am creating the ...
0 votes
0 answers
75 views

Quantlib: SOFR IRS Fair Rate not the same as inputs

I am making an OIS curve and a SOFR curve with bloomberg quotes When I valuate a SOFR swap in the same tenors as the SOFR inputs, the FairRates are not the same as the quotes I used to create the ...
1 vote
1 answer
242 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
0 answers
26 views

Quantlib IndexManager

I am doing some research on how to leverage QuantLib for calculating XVAs in Python and I am now struggling to understand something. Basically, I would like to simulate n paths. Each one of the paths ...
1 vote
0 answers
80 views

Setting up QuantLib to get correct yield for bond with long first payment period

I am dealing with fixed rate bonds. There is one particular bond, 34659UAC0, that caught my eye. This bond has a first coupon period of a whopping 5 years, followed by regular periods of 6 months. My ...
2 votes
1 answer
120 views

Quantlib OIS USD discount rates don't match Bloomberg discount rates

The Bloomberg USD OIS discount factors for 2024-03-01 do not match the values calculated using Quantlib beyond the 18M tenor. What do I need to do get them to match? Sorry, I am unable to paste a ...
0 votes
1 answer
71 views

Yield to Maturity (YTM) to Zero Coupon Yield Curve (ZCYC) Forward Rate and Discount Factor mismatch in QuantLib

I have a set of YTM data for various tenors, and I'm constructing a ZCYC using the QuantLib library. However, when I calculate the forward rates and discount factors from the ZCYC and compare them ...
0 votes
1 answer
261 views

Bumping forward rates in Quantlib for Bartlett SABR greeks

This might be a naive question, but in order to compute the Barlett vega: $$ \frac{d\sigma}{d\alpha} + \frac{d\sigma}{dF}\frac{\rho F^\beta}{\nu}$$ (for forward rate $F$, implied vol $\sigma$, and ...
0 votes
2 answers
160 views

QuantLib Python: Calculate ZSpread

I am trying to use quantlib-python to calculate the z-spread of a fixed rate US corporate bond using a zero curve from swap rates provided. Here is the provided ...
1 vote
1 answer
234 views

Find the right module for CDI DI BRL swaps valuation Quantlib

I'm trying to find a way to price BRL CDI Swaps with Quantlib but I can't find any solutions so far - so I was wondering if anyone encountered this issue: I don't see any solution on Quantlib. I ...
1 vote
0 answers
52 views

Heston++ with QuantLib

Is it possible to implement in QuantLib the Heston++, hence, the Heston with a displacement factor? Thanks!
0 votes
1 answer
488 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 ...
1 vote
2 answers
3k views

QuantLib-Python: Getting a list of all holidays between D1 & D2 with function "holidayList"

I figured out that the C++ version of QuantLib offers a function called holidayList in the calendar class. ...
0 votes
1 answer
114 views

Quantlib Vanilla Swap Amount not based on Forwards

I have the following code: ...
0 votes
1 answer
911 views

Bootstrapping SOFR curve and Swap Payment Lag

Can someone provide me an intuitive explanation of how discount factors are bootstrapped for SOFR when Swaps are trading with payment delay/ lag (e.g. of 2 business days). I can intuitively derive the ...
0 votes
1 answer
147 views

QuantLib: Problem with IRS valuation

I would like to value an IRS. My first problem is with "RuntimeError: more than one instrument with pillar". Theres is clearly no overlapping instruments. I can't get the valuation of the ...
1 vote
1 answer
184 views

Best Practices for Maintaining and Automating Interest Rate Curve Bootstrapping in QuantLib"

We are a small team managing about 20 scripts for bootstrapping interest rate curves using QuantLib. Our process involves taking in interest rate swap data, bootstrapping curves, and then using these ...
0 votes
0 answers
72 views

QuantLib: IRS valuation

I tried to value a simple IRS in QuantLib and failed. I have few questions, which will probably help to resolve these issues. Would be super grateful for answers in these matters. When I set up a ...
0 votes
0 answers
31 views

QuantLib error: `RuntimeError: negative local vol^2 at... the black vol surface is not smooth enough` for calibrating the SLV model

I am trying to generate the SLV process using QuantLib on real SPX data. The issue that I am having is that calendar arbitrage is being violated. I put my data in a list in my code, and am using $r\...
0 votes
1 answer
38 views

Is End of Month (Eom) Rule overrides Unadjusted convention rule in Quantlib?

Concerning the post Is End of Month (Eom) Rule overrides convention rule in Quantlib Schedule? I noticed that with Unadjusted convention has the same behavior. Is this wanted? For example, with Target ...
1 vote
1 answer
1k views

BootStrap with quantlib USD SOFR (vs. FIXED RATE) swap curve

I struggle to understand why my market rates does not match my bootstrap model. So I wonder why the spread is that high between market & model. ...
1 vote
0 answers
76 views

Python Quantlib Loop to calculate cap prices: Setting of evaluationDate

I am trying to calculate cap prices for different points in time (valuation dates) with Quantlib. I have built three loops for this. The first one creates the quantlib yield curve object ts_handle ...
3 votes
1 answer
878 views

CallableFloatingRateBond in QuantLib: just a matter of multiple inheritance?

I would like to know what are the issues related to a possible CallableFloatingRateBond class in QuantLib and to have some hints on implementation. My (very ...

1
2 3 4 5
11