Questions tagged [quantlib]

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

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

Quantlib-SWIG Python: impliedHazardRate requires “warm” discountcurve

I am getting different results from the CreditDefaultSwap().impliedHazardRate() method, depending on whether the discount curve passed is "cold" i.e. just created ...
0
votes
2answers
32 views

Value a Swap with Custom Coupons with QuantLib

I'd like to valuate a custom Libor3M - Fix swap with QuantLib in Python. With custom I mean, custom starting/end/payment dates for every coupon, a fixed coupon in the float leg (starting_date < ...
0
votes
0answers
16 views

Swaptions vols,object using quantlib xl

How can I build a good vol surface using QuantlibXl? My goal is to price a swaption 5 year with option maturity 1Y1M. The data are:
0
votes
1answer
15 views

Valuating Custom Amortization Schedule Libor IRS with QuantLib

I got to bootstrap the OIS and Libor 3M swap curves, and now I'd like to valuate some simple Libor3M - Fix IRS with QuantLib (in python). My problem is that some of the instruments I have to valuate ...
0
votes
1answer
14 views

Which object in DateGeneration object when there are two short, long or combination in Schedule object for py QuantLib?

I'm pricing a vanilla swap. I have two stubs, front and back, and they can be short, long or a combination. In this case, what do I use in ql.Schedule object for <...
0
votes
1answer
16 views

How to make the effective date to start on a holiday/weekend in py QuantLib?

I'm trying to price a non-standard swap. However, my schedule is not returning the correct dates. In particular, the effective date starts on a Saturday but the schedule returns the next biz date ...
1
vote
1answer
41 views

How can I extract the strike price from a Quantlib option object?

I am trying to write a Python function that performs some calculations using a list of Quantlib options, and I would like to pass only that list without other information. In particular, the strike of ...
0
votes
0answers
34 views

Digital Caps/Floors in Quantlib Python

Am I missing something or is there currently no way to price digital libor Caps/Floors in Quantlib Python? It seems there's no mention of DigitalIborCoupon in the cashflows SWIG interface.
0
votes
1answer
78 views

Monotonic Cubic Spline interpolation QuantLib python

I am new to QuantLib-Python and I am trying to replicate the implementation of a Dual Curve bootstrap using QuantLib-Python. I have followed the steps in Chapter 9 of the QuantLib Python Cookbook. ...
0
votes
1answer
31 views

Removing/Purging QuantLib/Boost

I recently updated to Ubuntu 20.04, as well as to R v4. When updating packages, I ran into an issue with QuantLib. I tried removing/reinstalling, but the reinstall was a different version. RQuantLib ...
1
vote
1answer
51 views

QuantLib 1.17 C++ does not contain some YieldTermStructure classes while QuantLib-Swig contains

I want to port some QuantLib-Swig dependent code written in Python to C++ with QuanLib-1.17. However some YieldTermStructure classes (PiecewiseLogCubicDiscount, PiecewiseLinearZero and ...
1
vote
0answers
41 views

How to use quantlib Excel for valuation of european swaption with vol surface to calibrate?

I would like to replicate the following Bloomberg pricer in quantlib using Quantlib xl. Is it possible? Thanks
0
votes
0answers
20 views

Missing functions in QuantLibXL

I have been using the open source addin QuantLibXL extensively. This provides an easy way to use the QuantLib library in a simple Excel environment. However, there are a few of the more recent ...
1
vote
0answers
29 views

monotone convex interpolation using QuantLib

I have one yield curves for EUR6M and I want to produce EUR3M using a parallel shift to EUR6M curve. I can just add spread in 6M curve. I am facing problem that my EUR3M curve will have many more ...
1
vote
0answers
30 views

Quantlib ZeroCurve interpolation

I'd like to check how QuantLib does interpolation on rates if I use ZeroCurve constructor. As it was mentioned here, by using curve.nodes() you can get a list of ...
0
votes
1answer
56 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 ...
0
votes
1answer
32 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
67 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
1answer
77 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
44 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
61 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
78 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
65 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
132 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
44 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
2answers
67 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
49 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
57 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
68 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
173 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
128 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
61 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
22 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
154 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
62 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 ...
1
vote
0answers
115 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
62 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
56 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
44 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
43 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
153 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
59 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
271 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
335 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
102 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
159 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
109 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
2 3 4 5