Questions tagged [quantlib]

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

Filter by
Sorted by
Tagged with
4
votes
1answer
87 views

QuantLib Python: caplet/swaption pricing under dual curve

Is there a way to price caplets/swaptions in QuantLib python (v 1.6.2) under dual curve i.e. pass projection curve for forwards and discounting curve for discounting the cash flows? Goutham has an ...
-1
votes
0answers
24 views

Quantlib python FRA rate helper

Can i get an example of how to use quantlib python FRAratehelper? I would like to use it to get discount factors, with 3month Jibar as a reference rate.
3
votes
1answer
52 views

QuantLib: Which CalibrationHelper to use for Normal Volatilities

I am using the SwaptionHelper class to create the swaptions. Reading the documentation: https://www.quantlib.org/reference/class_quant_lib_1_1_swaption_helper.html I realize that one of the ...
0
votes
0answers
37 views

Constructing Daily Term Structure

I am very new to QuantLib and am trying to do Swaption Model calibration following the example here:http://gouthamanbalaraman.com/blog/short-interest-rate-model-calibration-quantlib.html Appreciate ...
1
vote
0answers
32 views

Quantlib Yield Curve

Is it possible to create yield curve object in Quantlib given some function of time? For example, given Nelson-Siegel parameters, create yield curve which can compute zero yield for any date >= ...
3
votes
1answer
172 views

Bootstrap ESTER and SOFR curves with Quantlib Python

Is it possible to bootstrap the new ESTER and SOFR term structures in Quantlib? More in general, does the process work as the usual one? Given these are simple indices that are published on a daily ...
2
votes
1answer
62 views

Heston calibration using Quantlib and Python: failure in BlackVarianceSurface function

I have an error when trying to use the fucntion BlackVarianceSurface from quantlib. Can you help me? the error is RunTime Error: dates must be sorted unique. ...
0
votes
0answers
39 views

Fixed rate bond pricing issue in Quantlib

I cannot retrieve the same price for a fixed bond using quantlib. ...
2
votes
0answers
110 views

Using Python Quantlib's FittedBondDiscountCurve as Evaluator of Parametric Curve - Errors

I am using Quantlib's FittedBondDiscountCurve in Python 3.7 and setting MaxIterations to 0, and giving a guess_solution, which then turns the routine into an evaluator for the parametric form I choose,...
1
vote
2answers
123 views

What are the best [free]resources to learn C++ particularly for quantitative finance?

What are the best free, online resources to learn C++ for quant finance? The course by quantnet seems too expensive for a broke student like me! If there are any free online resources, let me know! ...
3
votes
1answer
138 views

Basis Swaps in Quantlib/Python

I am aware that I can create a IRS in Quantlib/Python by using the following function: ...
1
vote
0answers
50 views

Quantlib Python OISRateHelper using Quantlib Cookbook - hands on Quant Finance

I am completely new to Python, just trying to reference Quantlib Cookbook to construct eonia curve, here is my code. I didn't change much compared to the cookbook Eonia Curve BootStrapping chapter, ...
4
votes
1answer
190 views

Valuing structured loans in QuantLib

I'm trying to figure out if it's possible to value structured products, mainly loans, in quantlib. The idea is to build a bond class with different cash flows. For example, a loan could have coupons ...
1
vote
0answers
47 views

Building OIS curve in Quantlib from Fed Funds Futures and handling steps

Has anyone tried building an OIS curve with Quantlib from Fed Funds futures? If so, could you share a code snippet for how you do it. (Assuming you already have the prices for the futures) How do ...
2
votes
0answers
73 views

Quantlib Bond PV01 by Tenor

Having built a fixed rate bond object, and looking at here and here , is there any way of retrieving the NPV impact of a repriced bond by bucket/tenor of the Spot Curve instead of getting a simple NPV ...
2
votes
0answers
81 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 ...
2
votes
1answer
115 views

Roll Down of Forward Starting Interest Rate Swap

I have the data for a lot of forwarding starting interest rate swaps. i.e 2Y1Y, 3Y1Y, 5Y1Y, 3Y2Y, 5Y2Y, ... (so different forwarding and maturities). I would like to calculate the roll down over 1 ...
0
votes
0answers
35 views

Role of the evaluation date ( ql.Settings.instance().evaluationDate )

I have questions about the evaluation date. (set up with ql.Settings.instance().evaluationDate). I'm trying to build the zero-coupon curve from deposit rates and swap rates, however I don't ...
0
votes
1answer
229 views

How to calculate premium in Black Scholes model with quantlib?

I am new to quantlib as well as option price modelling. I need to get premium from black scholes model and found this code in internet ...
1
vote
1answer
213 views

Implementation of the Hull and White short rate model

This is the first time I'm using quantlib, and I wanted to compare the velocity of quantlib with my own Python code. I found a tutorial about Hull and White to generate the short rate paths with ...
1
vote
0answers
74 views

Matching the yield on a bond with the zeroRate on a curve in Quantlib

I am using QuantLib to generate a US Treasury curve from 1y, 3y, 5y, and 10y yield quotes. However, after building the curve and running zeroRate on it, it ...
0
votes
0answers
64 views

Bootstrapping spot rates based on swap rates using QuantLib

I am bootstrapping the shibor curve and fr007 curve using swap rates in China. I created my own index like following: ...
2
votes
1answer
94 views

Difference between modelValue from HestonModelHelper and NPV() from VanillaOption

I am trying to calibrate an Heston model and price vanilla option using Quantlib 1.15 and Python 2.7. I use the following code ...
0
votes
0answers
51 views

Why doesn't tenor of Euribor index change spot rate in Quantlib?

I'm trying to create a yield curve in QuantLib based on swap rates. The swap rates I'm using have a 6 months fixed frequency and a 3 month float frequency based on LIBOR. What I don't understand is ...
2
votes
2answers
155 views

How to use both yield curve and discount curve to value call in QuantLib

I'm new to QuantLib, and I'm trying value a simple European call. QuantLib's Black-Scholes-Merton Process makes sense to me, but I don't know how to incorporate a discount curve into it. Please see ...
1
vote
0answers
60 views

How to apply multiplicative price seasonality to bond prices in quantlib?

Can someone please give a brief or any link which explains how to apply multiplicative price seasonality to inflation linked bonds in Quantlib using python modules. Have gone through most of the ...
3
votes
0answers
177 views

How to calculate YTW (yield-to-worst) in QuantLib?

After defining a CallableFixedRateBond object in QuantLib, I can calculate YTM (yield-to-maturity) right now. I'm using Python so the function is bondYield(). Is there any way to calculate YTW (yield-...
1
vote
0answers
29 views

How do I calculate from discountfactor to zerorate in Python using Quantlib [closed]

I knew rate to discountfactor InterestRate.discountFactor(yearFraction) I want to calculation discountfactor to zerorate
2
votes
0answers
154 views

How to build an inflation term structure in QuantLib?

This is what I've got, but I'm getting weird results. Can you spot an error?: ...
2
votes
1answer
261 views

Quantlib CDS model

I have started working on CDS model using Quantlib and as a starting point, utilized code provided in GitHub Quantlib/Python examples with modifications in initial code as given at the end and have ...
1
vote
0answers
67 views

QuantLib - Asset Swap Cash Flow Final Period

I am comparing CFs of asset swaps in QuantLib to the asset swap screen (ASW) in Bloomberg. I noticed that the final payments of both swap legs do not include an interest payment for the final period. ...
2
votes
0answers
50 views

QuantLib XL Swap Valuation Fixing Dates

I want to rate IRS Swaps on an specific Valuation Date using QuantLibXL. Everything works fine besides the last Index Fixing before the Val Date. After using SwapLegAnalysis I saw that the Index ...
1
vote
1answer
257 views

How to compute the Carry + Roll-down of a bond with QuantLib?

I’m new using QuantLib (I have no idea how to use it) and I would like to know how to calculate the C+R of a bond, say the current 30Y. The textbook definition of C+R is the P&L due to the ...
1
vote
0answers
167 views

Calculating YTM, OAS, etc. in QuantLib with given bond price [duplicate]

I am attempting to use QuantLib to calculate several bond metrics such as yield to maturity, option-adjusted spread, etc. The catch is that I am already given a market price and thus have no need to ...
1
vote
0answers
405 views

Calibration of Theta, A(t) and B(t) of Hull White 1Factor model

I’m simulating interest rates via the HullWhite One factor model. To simulate the short rate I’m using the code from the Quantlib Python Cookbook, chapter 15 and beyond (By Goutham Balaraman and Luigi ...
1
vote
2answers
569 views

CDS ISDA model/Bloomberg

I am becoming more acquainted with QuantLib as a platform. I've been using both the python implementation and QuantLib XL. As I have started to look at CDS, I would like to know if there is a ...
3
votes
1answer
782 views

Quantlib-Python: use zero rates to get the originally bootstrapped curve

Let's say I am trying to build a curve using deposits, future and swaps with one of the three Quantlib methods in Python as below: ...
1
vote
1answer
88 views

Calculating QuantLib IborCoupon with / from given index fixing

How can I calc with QuantLib the coupon amount of a floating rate IborCoupon on the 3M Euribor Index with a given 3M Euribor Index Fixing? If I try the following Python code: ...
0
votes
0answers
38 views

QuantLib - Discreet Dividend Binomial Two Rate Option Implementation

Can anyone point me in the direction of an implementation example in python of a two rate, discreet dividend binomial option model?
2
votes
0answers
417 views

Using QuantLib Python to value FX options using stochastic volatility

I would like to use QuantLib (and in particular the python wrapper) to value FX option using the Heston model. Thanks to http://gouthamanbalaraman.com and all of the articles therein : in particular ...
0
votes
1answer
251 views

Basic fixed rate bond pricing issue in Quantlib

I'm trying to price a fixed rate bond in Quantlib but the result comes out wrong. I'm trying to price 1Y fixed rate bond: ...
1
vote
0answers
253 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 ...
0
votes
0answers
92 views

QuantLib FuturesRateHelper how do I input Future type = 'ASX', the 'IMM' date check is causing Runtime Error

How do I input Future type = 'ASX', the 'IMM' date check is causing Runtime Error future_maturities 1 2019-06-14 2 2019-09-13 3 2019-12-13 4 2020-03-13 5 2020-06-12 6 2020-09-11 ...
3
votes
1answer
164 views

forward + displacement

I I am trying to price a cap/floor using Quantlib in Python. the initial code from from this website: http://gouthamanbalaraman.com/blog/interest-rate-cap-floor-valuation-quantlib-python.html Here is ...
1
vote
0answers
65 views

Error in QuantLib-Python when I use function “Bond”

I am using the "Bond" function in QuantLib-Python 1.14. I am planning to use it in this way: ...
1
vote
0answers
106 views

QuantLibXL no intraday pricing, even with QL_HIGH_RESOLUTION_DATE enabled while compiling

I built QuantLibXL myself following the instruction here: https://www.quantlib.org/quantlibaddin/build_qlxl.html And in the QuantLib code, I turned on the QL_HIGH_RESOLUTION_DATE flag, before I run ...
2
votes
1answer
254 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
59 views

SquareRootProcess in QuantLib - Python

I would like to price an American put option using the SquareRootProcess class in QuantLib - Python but it seems that it does not exist. As the underlying follows the following model : $$\rm{d}S_t=...
3
votes
1answer
160 views

Why Quantlib Option NPV does not change when repricing?

Trying to learn Quantlib with Python, please have a look at below code: ...
2
votes
0answers
125 views

QuantLib - Synthetic deposit/FRA rates in yield curve

In my flat forwards dollar curve implemented in QuantLib I would like to add the following instrument: Today is 12/28/2018 Pillar quote is 1% p.a. (ACT/360) Pillar start is 1/30/2019 (specific ...