Questions tagged [quantlib]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
16 views

Python Quantlib : How to deal with RuntimeError 'addFixing(date, value)'

for t_ccy in rate_dates.keys(): libor_base = ql.AUDLibor(ql.Period(3,ql.Months),ql.YieldTermStructureHandle(term_structure[t_ccy])) libor_up = ql.AUDLibor(ql.Period(3,ql.Months),ql....
0
votes
0answers
47 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
23 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
47 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
19 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
32 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
74 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
35 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
108 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
152 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
50 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
79 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
71 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
59 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
226 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
92 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
78 views

Fixed rate bond pricing issue in Quantlib

I cannot retrieve the same price for a fixed bond using quantlib. ...
2
votes
0answers
132 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
127 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
185 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
56 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
236 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
58 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
134 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
98 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
150 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
38 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
319 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
253 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
90 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 ...
2
votes
1answer
88 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
102 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
2answers
101 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
184 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
62 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
200 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
176 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
320 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
83 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
51 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
286 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
215 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
1answer
484 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
667 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
926 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
106 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
39 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
464 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
284 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: ...