Questions tagged [quantlib]

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

Filter by
Sorted by
Tagged with
2 votes
1 answer
237 views

Generating normally distributed random numbers using Sobol generator in QuantLib

I am trying use low discrepancy Sobol RNG to generate normally distributed random numbers and fill an Eigen matrix with those random numbers. The matrix represents a basket of 5 assets (rows) each ...
1 vote
1 answer
437 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 ...
0 votes
1 answer
65 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 ...
1 vote
1 answer
89 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 ...
3 votes
2 answers
157 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/...
0 votes
2 answers
322 views

Plotting a CSA curve in QuantLib

IRS under a CSA Let's consider an example of Interest Rate Swap under a CSA. To calculate discount factors that can be used to discount cashflows in one currency, $C_{1}$, collateralized in another ...
0 votes
1 answer
59 views

How does the isInArrears affect the quantlib IborLeg?

Deal details ...
1 vote
1 answer
70 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
960 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 ...
1 vote
1 answer
683 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
1 answer
80 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?
0 votes
1 answer
161 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 ...
0 votes
1 answer
107 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:...
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++: ...
2 votes
1 answer
166 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 ...
0 votes
1 answer
265 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
94 views

Pillar Date of Overnight Interest Swap Helper

I am not being able to set the pillar date of an overnight interest swap helper to its maturity date. I have the following code: ...
0 votes
1 answer
436 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 ...
2 votes
0 answers
54 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 ...
0 votes
0 answers
86 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 - ...
0 votes
1 answer
220 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
1 answer
68 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, ...
1 vote
1 answer
141 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 ...
2 votes
0 answers
75 views

Using Quantlib's Constraint and Parameter classes

I coded (independently from QuantLib) a small "toy" pricer. The bump risks are calculated as follows in client code : ...
1 vote
0 answers
56 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 ...
0 votes
1 answer
181 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 ...
1 vote
1 answer
166 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 ...
0 votes
1 answer
460 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
4k views

QuantLib python ql.schedule getting end of month dates

i'm trying to get payment schedule of a bond that pays coupon quarterly. value date is 2020-04-01, first coupon date is 2020-06-30, maturity date is 2022-09-30. so I expect to have a list of dates: ...
0 votes
1 answer
99 views

Quantlib Vanilla Swap Amount not based on Forwards

I have the following code: ...
3 votes
3 answers
8k views

How to build a cross currency swap pricer?

We're looking to build a pricer to convert a funding spread in a given currency over a specific funding basis e.g. 20 bps EUR 3m€ and convert it to a funding spread to a different currency with a ...
0 votes
1 answer
182 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 ...
2 votes
2 answers
163 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....
1 vote
1 answer
62 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 ...
3 votes
0 answers
77 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/...
2 votes
1 answer
99 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, ...
0 votes
0 answers
441 views

How to compute the Brazilian Plain vanilla swap using Quantlib?

How to compute the BRL plain vanilla swap. I have followed the below methodology to calculate the valuation for other indexes but BRL-CDI is far off from actual valuation. Please suggest if anything ...
1 vote
2 answers
473 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
1 answer
682 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
138 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 ...
0 votes
1 answer
2k views

Instrument valuation using Monte Carlo simulation with Quantlib

I am looking for some example to value an American swaption using monte carlo simulation of ...
0 votes
1 answer
179 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 ...
0 votes
0 answers
49 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 ...
-1 votes
1 answer
394 views

Guidelines for building complex C++ such as QuantLib and Open Source Risk Engine in VS Code in Windows

I am looking for a guide for build correctly complex C++ projects such as those for quantitative finance and financial engineering such as QuantLib and Open Source Risk Engine. I can configure ...
1 vote
1 answer
222 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 ...
0 votes
0 answers
55 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 ...
2 votes
2 answers
202 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++....
2 votes
1 answer
352 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
0 answers
47 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 ...
3 votes
0 answers
323 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. ...

1
2 3 4 5
11