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
30 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 ...
Esteban's user avatar
  • 11
5 votes
1 answer
182 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 ...
cpage's user avatar
  • 64
2 votes
2 answers
190 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 ...
jamoreiras's user avatar
-2 votes
1 answer
64 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 ...
Gustavo Amarante's user avatar
0 votes
0 answers
57 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 ...
Esteban's user avatar
  • 11
0 votes
1 answer
123 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 ...
Esteban's user avatar
  • 11
0 votes
0 answers
23 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 ...
Lorenzo R's user avatar
1 vote
0 answers
69 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 ...
Jerry's user avatar
  • 11
2 votes
1 answer
89 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 ...
scorpio's user avatar
  • 123
0 votes
2 answers
108 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 ...
cpage's user avatar
  • 64
1 vote
0 answers
46 views

Heston++ with QuantLib

Is it possible to implement in QuantLib the Heston++, hence, the Heston with a displacement factor? Thanks!
BloomShell's user avatar
0 votes
1 answer
64 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 ...
Roshan Yadav's user avatar
1 vote
1 answer
185 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-...
TheGr8Destructo's user avatar
0 votes
1 answer
140 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 ...
Kid000's user avatar
  • 1
0 votes
0 answers
60 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 ...
Antek's user avatar
  • 1
0 votes
0 answers
29 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\...
Xerium's user avatar
  • 89
0 votes
1 answer
33 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 ...
Alessandro Ruo Bernucchio's user avatar
1 vote
0 answers
68 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 ...
Marc157's user avatar
  • 55
1 vote
1 answer
115 views

Using QuantLib to build Flat Forward Curve using Changes assumed from central bank meetings to price FRAs

What I am trying to do is price EURIBOR6M FRAs using a curve built in quantlib with changes in rate due to central bank meetings. For concreteness, my goal is to price EURIBOR6M FRAs, say 1x7 FRA, ...
Naim Hussain's user avatar
3 votes
2 answers
238 views

QuantLib calculations for a Canadian corporate fixed rate bond differ from BBG YAS

I am pricing a non-callable, fixed-rate, Canadian corporate bond with the following parameters: Name Value CUSIP 12657ZAT0 Evaluation Date 2/14/2024 Settlement Date 2/16/2024 Bond Issue Date 3/6/...
Juice's user avatar
  • 31
0 votes
1 answer
70 views

How does the isInArrears affect the quantlib IborLeg? [closed]

Deal details ...
Roshan Yadav's user avatar
2 votes
1 answer
92 views

Is there Multilevel Monte Carlo in QuantLib?

Is the Multilevel Monte Carlo method implemented in QuantLib? If not, would it make sense to implement it? Is it doable taking into account the structure of the library?
Sebastian's user avatar
  • 158
1 vote
1 answer
211 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 ...
user7631642's user avatar
0 votes
1 answer
137 views

Python Quantlib G2 calibration with negative interest

I am currently calibrating the G2++ in Python with Quantlib in negative interest rate environments with cap volatilities. Unfortunately, this does not work as intended and I get error messages:...
Marc157's user avatar
  • 55
0 votes
1 answer
222 views

How to bootstrap the zero coupon curve for US treasuries

Here is my understanding of the process: Capture price of most recently sold gov security at each tenor of the curve (reference treasuryDirect) For coupon paying securities, (i.e. tenor>2yr) you ...
dbojanin's user avatar
2 votes
1 answer
263 views

Python Quantlib for the calibration of interest rate caps

I am trying to calibrate the G2++ model to interest rate caps using the Quantlib library in Python. I have the problem that my optimization always stops with the starting values. So probably either my ...
Marc157's user avatar
  • 55
2 votes
0 answers
68 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 ...
Eduardo's user avatar
  • 21
0 votes
0 answers
110 views

Quantlib Python bootstrapping with ArithmeticOISRateHelper: cannot find a soluton for forward rate

I am trying to construct a curve based on OIS quotes. Fixed rates in those OIS are quoted againgst the arithmetic average of the floating rate. Consequently, I am using the correspoding helper class - ...
feeshee 's user avatar
0 votes
1 answer
114 views

QuantLib: How to compute the forward rate using historical fixing rate and discount factor data

Let's say the valuation date is 08/24/2023. The effective date and maturity date of the swap are 03/12/2022 and 01/10/2024. I want to apply the given historical fixing rates till the valuation date ...
John83's user avatar
  • 37
1 vote
0 answers
109 views

Match CDS upfront amount between Quantlib and Markit Converter model

I'm trying to reconciliate the upfront amount between the Markit converter model (https://cds.ihsmarkit.com/converter.jsp) and the result from the quantlib IsdaCdsEngine function. the difference is ...
benr2506's user avatar
0 votes
1 answer
102 views

QuantLib FittedBondDiscountCurve does not produce expected rates

I am using the QuantLib library to fit yield curves. For a $\\\$100$ face bond, with price equal to $\\\$100$, and coupon equal to $\\\$0$, I would expect it to provide a zeroRate of $0.0\%$. However, ...
Trevor J Richards's user avatar
1 vote
1 answer
146 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 ...
AB123's user avatar
  • 41
2 votes
2 answers
227 views

QuantLib Python - Discount Factor Interpolation within curve nodes

Generated a discount curve, dCurve.PiecewiseLogLinearDiscount() using input par rate for terms (.5Y, 1Y, 2Y, 3Y, 5Y, 7Y, 10Y, 15Y, 20Y, 30Y) and output discount curve matching the input term structure....
Mike's user avatar
  • 21
1 vote
1 answer
152 views

QuantLib: Latin American FixedFloat Swap pricing with multiple payment frequency specification

With reference to the post of latin american swap, I am valuing the FixedFloat CLP swap.The specifications of this swaps has payment frequency upto 18 months as Zero coupon(1T) and after that ...
John83's user avatar
  • 37
3 votes
0 answers
80 views

When is the Quantlib's C++ to python package faster than just coding natively in python? [duplicate]

Every package I have used of the QL's python package thus far have been slower than my own local python functions. From what I understand, it's running C++ underneath, but if you are running loops/...
THATS MY QUANT MY QUANTITATIVE's user avatar
2 votes
1 answer
129 views

QuantLib: Pricing BRL zero coupon swap using relevant attributes in Quantlib

I am trying to price the BRL zero coupon swap. As we know that ZC swaps fixed payer pays a single payment at maturity and the float payer pays the interim payments till maturity. So in this case, ...
John83's user avatar
  • 37
0 votes
1 answer
226 views

QuantLib: How to price or construct a zero coupon swap using Quantlib

I am trying to construct and price the zero coupon swap. However its giving me the AttributeError: module 'Quantlib' has no attribute 'ZeroCouponSwap'. Please let me know how to price the zero coupon ...
John83's user avatar
  • 37
0 votes
1 answer
236 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 ...
user35980's user avatar
  • 1,396
1 vote
1 answer
213 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 ...
Gloomy's user avatar
  • 21
0 votes
1 answer
97 views

ConstNotionalCrossCurrencyBasisSwapRateHelper in QuantLib doesn't give expected result

I'm trying to bootstrap to get discount curve based on cross currency basis swap using ConstNotionalCrossCurrencyBasisSwapRateHelper in QuantLib. As a test, I tried to bootstrap the discount curve ...
Fei's user avatar
  • 1
0 votes
1 answer
164 views

Quantlib FRA and interpolated rate in Swaps vs BBG valuation

I am building a CZK swap pricer on quantlib, and I am trying to understand my differences with Bloomberg pricing. I believe the way I set up my FRA is wrong, the reason is because even though I match ...
Gloomy's user avatar
  • 21
1 vote
1 answer
248 views

Quantlib - mismatch with BBG Swap

I'm trying to price a CZK swap via Quantlib with BBG data, so far nothing complicated but I can't seem to match the floating leg cashflows, and NPV, when I price my swaps, even if I find the right Par ...
Gloomy's user avatar
  • 21
0 votes
0 answers
74 views

Quantlib Bond yield jump on front end of the curve

I'm trying to build up a US treasury curves using Bills and bonds with the FixedRateBond class, however when I compared the ParYield from .bondYield() and zero_rate from yield curve instance. The ...
ETH's user avatar
  • 1
1 vote
1 answer
71 views

Why the biz day convention of OIS Rate helper is hard coded as Modified Following in QL?

I am using QuantLib OIS Rate Helpers, and traced schedule creation back to the following function, and noticed that the business convention is hard coded as MF. Is the biz day convention hard coded ...
Nick's user avatar
  • 11
2 votes
2 answers
261 views

Extending/Subclassing QuantLib Classes in Python?

I'm using quantlib via the quantlib-python or open-source-risk-engine both on pypi. The question relates whether it's possible to extend QuantLib term structure base classes in python rather than C++....
Phil's user avatar
  • 123
0 votes
1 answer
234 views

Wrt speed, how optimised is QuantLib's Heston pricing class?

I have a pricing formula that is 300x the speed of the QuantLib's Heston pricing class. Is it incredibly slow? For context, on a slow 1.6 GHz Dual-Core Intel Core i5 processor, my method can reliably ...
THATS MY QUANT MY QUANTITATIVE's user avatar
1 vote
0 answers
52 views

Quantlib's --enable-indexed-coupons flag

When building Quantlib from source there used to be an --enable-indexed-coupons flag option. This was an override for the default 'par coupon' setting which came with the standard Quantlib ...
user35980's user avatar
  • 1,396
3 votes
0 answers
494 views

Best practices for building an FX volatility surface with Quantlib in Python

Generally my question is: what are best practices for building FX volatility surfaces with Quantlib? In FX options, I would like to price structures such as risk reversals, strangles and butterflies. ...
Wynn's user avatar
  • 105
0 votes
0 answers
61 views

Commercial bank mortgages schedule calculation

I need to calculate the schedule of a fixed rate mortgage and an adjustable rate mortgage. Is there an open source library, preferable in python, that already makes these calculations? I tried ...
ps0604's user avatar
  • 50
0 votes
0 answers
47 views

Computation of CouponLegNPV using IsdaCdsEngine

I've recently been trying to work on and understand the concepts around CDS. By making simplifications (flat hazard rate, flat forward rate), I wanted to compare the values I could obtain by manual ...
Sakhr's user avatar
  • 1

1
2 3 4 5
11