Questions tagged [quantlib]

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

Filter by
Sorted by
Tagged with
-1 votes
0 answers
41 views

Implied volatility of American options on quantlib [closed]

Is there an implied volatility function in the python quantlib api? So I can insert like 10 equity American option quotes to get their corresponding IV’s?
Xerium's user avatar
  • 53
1 vote
1 answer
99 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
124 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
36 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
18 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
  • 53
0 votes
1 answer
27 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
49 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
  • 43
1 vote
1 answer
80 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
199 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
68 views

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

Deal details ...
Roshan Yadav's user avatar
2 votes
1 answer
91 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
115 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
120 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
  • 43
0 votes
1 answer
188 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
208 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
  • 43
2 votes
0 answers
60 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
98 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
86 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
75 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
81 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
113 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
183 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
146 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/...
THAT'S MY QUANT MY QUANTITATIV's user avatar
2 votes
1 answer
107 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
200 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
198 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,386
1 vote
1 answer
178 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
85 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
154 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
237 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
63 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
65 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
223 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
199 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 ...
THAT'S MY QUANT MY QUANTITATIV's user avatar
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 ...
user35980's user avatar
  • 1,386
3 votes
0 answers
404 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
55 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
44 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
4 votes
2 answers
433 views

Calculation of Cashflows Using ISMA Day Count in Fixed-Rate Bond

I'm working with a fixed-rate bond in QuantLib, and I have set the day count convention to ISMA, but I would like to understand how this specific day count convention is used in the calculation of the ...
Roshan Yadav's user avatar
1 vote
1 answer
97 views

PV different from Dirty Price in QuantLib

As far as I understand, dirty price is the sum of clean price and accrued amount and should be equal to the Present Value (PV) of a bond at a certain yield rate. However, I can't replicate this ...
Oliver Mohr Bonometti's user avatar
0 votes
1 answer
99 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: ...
Sávio Brilhante's user avatar
1 vote
1 answer
105 views

Zero Curve Interpolation Does Not recover Node point input rates

I having an issue with interpolation in QuantLib Python. Please see the code below for a minimum working example ...
Tomi Adewusi's user avatar
0 votes
0 answers
506 views

Building a forward curve for multiple tenors - Quantlib python

I am attempting to build a forward curve for multiple tenors (1M / 3M / 6M / 12M) using the quantlib library. The input to my model are sofr swaps(1W through 50Y). It appears I am building my curve ...
dummy_quant's user avatar
2 votes
1 answer
247 views

Why is the NPV of this FX Forward 0?

I've checked similar questions and answers but even after setting the evaluation date in ql.settings I still get zero. Like another poster, I also have the QL cookbook and have read everything I could ...
PythonAutomation's user avatar
2 votes
1 answer
183 views

QuantLib Python: How to print each caplet/floorlet value, intrinsic value and time value at each fixing date?

I have the following code to price a floor (can also be used for cap), and have been computing the payoff myself, but I think QL can already do this. Since the cashflows I print out aren't correct as ...
PythonAutomation's user avatar
3 votes
1 answer
280 views

QuantLib: Analytical Greeks and Numerical Greeks do not match?

I use the Black Scholes Merton (BSM) model from QuantLib to calculate Call options price and its analytical Greeks. I also manually calculate its Numerical Greeks (Theta, Vega), but the results do not ...
Scoodood's user avatar
  • 133
2 votes
1 answer
287 views

Pricing an American FX Option using Quantlib

I need some guidance on valuing American style FX options (spots and forwards) using quantlib in Python. Given the following parameters: Domestic and foreign risk-free rates Current market spot and ...
bouwerp's user avatar
  • 123
2 votes
1 answer
280 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 ...
Yoshiro's user avatar
  • 23
0 votes
1 answer
188 views

QuantLib Yield Curve Bootstrapping Fails with Bracketing Error

I'm trying to build the yield curve simply using Treasury yields one would get by querying the FRED API, but as my code below will show, I'm told on the 1st iteration that there was failure at the 4th ...
pmse234's user avatar
  • 15

1
2 3 4 5
11