Questions tagged [quantlib]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
18 views

Pricing Compound Options using QuantLib

I am trying to price Compound Options using QuantLib on Python. I've looked around but am unable to find any sample code. I believe that the CompoundOption Class ...
1
vote
1answer
58 views

How do I create a term structure of a bond using QuantLib?

Has anyone used QuantLib to create term structure (i.e bootstrapping process to produce spots) in python? I have been using the below example http://gouthamanbalaraman.com/blog/quantlib-term-structure-...
0
votes
0answers
17 views

Heston volatility surface in Python QuantLib

Does anyone have experience with the Python QuantLib function HestonBlackVolSurface? I'm trying to produce a 3D plot of the volatility surface as done in the ...
0
votes
0answers
28 views

Quantlib : How does interpolation technique in zero curve improve the valuation of interest rate swaps?

I am working on building zero curve using interpolation = ql.Linear(). I know that this method is very popular to build short and long end curve. But am wondering if there is any another way of ...
0
votes
1answer
38 views

Zero Curve from a par curve curve QuantLib

I'm trying to understand why pricing a par bond with zero curve, contracted from par bonds themselves doesn't give me par. (Based on examples here) ...
3
votes
1answer
69 views

Quantlib - exercise probability function?

I am using Quantlib to obtain the option value embedded in a convertible bond. I create an american option as follows: ...
1
vote
1answer
43 views

Interpolation for discount curve building QuantLib for bonds

I'm trying to figure out how to build a discount curve to price bonds from spot rates using some advance interpolation methods like PiecewiseLogCubicDiscount. I know I can build this curve with ...
1
vote
1answer
55 views

Using Discount Rates and Zero rate curve from Bloomberg in Quantlib

I'd like to use the Discount Rates and Zero rate curve from Bloomberg instead of deriving the rates from the yield curve. Can someone share a sample code to use these rates directly in VanillaSwap or ...
0
votes
1answer
39 views

How to use QuantLib.IborIndex in python?

QuantLib users. I'm trying to use ql.IborIndex(...) using this example but for USD currency. However, I receive a type error of the following. How can I use this ...
1
vote
1answer
25 views

QuantLib : How to get the 'last' and 'next' cash flow date and amount from the date of valuation in plain vanilla interest rate swap in Python?

Do we have any direct method to get the 'last' and 'next' cash flow date and amount from the date of valuation in Quantlib Python using fixed leg amt or floating leg amt, day counter,valuation date , ...
0
votes
1answer
45 views

How to use G2Process in Py QuantLib

I'm trying to do MC using G2Process object. The example I'm trying to mimic is in this link. Below is a code snippet of what I did. Please will someone guide me on ...
0
votes
0answers
35 views

QuantLib (Python) Heston model delta

is it possible to obtain the delta for Heston model with QuantLib-python? I am using AnalyticHestonEngine and simple European option/payoff. I am aware of the possibility of calculating numerical ...
0
votes
1answer
56 views

Zero Rates to Piecewise linear forward rates in Py QuantLib

How can I extract the piecewise linear forward rates given a term structure of zero rates for a given trade date in Py QuantLib. This is used to price an ir swap. My attempt is to create a ZeroCurve ...
0
votes
1answer
74 views

Python Quantlib : How to value the Non Deliverable currency Interest Rate Swaps?

I followed all the procedure in Quantlib to process interest rate swap valuation through Python Quantlib. I valued more than a million records. All the valuation is almost the expected amount. But '...
0
votes
1answer
84 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 ...
0
votes
1answer
58 views

QuantLib Error “=negative probability”

I am trying to calculate the price of an american option. The code works fine for some options but for an deep out of the money call, I get the above error. Below is my code that I am trying to run. ...
0
votes
0answers
18 views

Why Quantlib CreditDefaultSwap::ISDA fail on roll dates: 1st iteration: failed at 1st alive instrument, pillar

I am experimenting with Quantlib CDS engine, I create a piecwise hzard rate based on CDSHelpers and try to compute default probability with it and then some specific upfront. I managed to match BBG ...
1
vote
1answer
142 views

QuantLib returns slightly different bondYield when backtested

I am just starting to get familiar with QuantLib (in particular, fixed rate bond pricing functions). I read a number of examples, from which I am able to calculate bond price and bond yield. The ...
0
votes
0answers
43 views

Quantlib - Duration of a Floating Rate Bond with Spread

I've used Luigi Ballabio's workaround to calculate the duration/modified duration of a floating rate bond (which you can find here: https://www.youtube.com/watch?v=r_1wSd0hnN4). However, if I add a ...
0
votes
0answers
82 views

Simulation of Heston process Quantlib-Python

I am wondering weather there exists some method such that one can simulate sample paths for the Heston model in Quantlib-Python. I am currently working on a project that require simulations with the ...
0
votes
0answers
40 views

Is callable bond pricing available in Quantlib XL?

I am able to find documentation for pricing callable bonds in Quantlib Python or C++, however, I am struggling to locate it for Quantlib XL. Is there a way to price callable fixed-rate bonds in ...
1
vote
1answer
55 views

Quantlib specify contract duration instead of dates

I use the following code in Python to price American put/call options. It's simple code since I'm new to using Quantlib. I would like to specify the contract duration (i.e. ...
0
votes
1answer
37 views

Why does changing the evaluationDate multiple times lead to a performance lag?

I am simulating an swaption strategy through time. Following the examples in the Python Quantlib cookbook, as I progress through time I am updating the internal evaluation date ...
1
vote
0answers
37 views

quantlib isda cds time-series

I am trying to use quantlib from python to work with time series of cds quote, e.g I would like to evaluate the PV or PUF or other metrics on many different days. Each day has an associated yield ...
1
vote
1answer
104 views

Question regarding fitting Euribor curve using different basis quotes using Quantlib Python

I am trying to fit a EUR curve based on the following instruments:- EONIA quotes 1m vs 6m basis quotes 3m (outright) quotes 6m (outright) quotes 6m vs 12m quotes (1) , (3) & (4) are simply ...
0
votes
0answers
45 views

Quantlib for Amortizing securitized loans with option for prepayment

I have not had much experience with QuantLib, but from a brief look through the docs it doesn't necessarily seem suited to my task. Consider a mortgage backed loan. There are various options on ...
1
vote
1answer
187 views

Quantlib Natural Cubic spline yield curve

Is there an example to use Natural Cubic spline interpolation for yield curves in Quantlib python? I can see from the SWIG file that the interpolation is exposed but not sure how to use it. I can ...
4
votes
1answer
224 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
1answer
75 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
114 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
1answer
92 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
1answer
77 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
302 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
125 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. ...
2
votes
1answer
89 views

Fixed rate bond pricing issue in Quantlib

I cannot retrieve the same price for a fixed bond using quantlib. ...
2
votes
0answers
147 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
143 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
292 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
62 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
2answers
294 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
72 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
1answer
183 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
132 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
207 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
48 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
417 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
320 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
103 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 ...

1
2 3 4 5