Questions tagged [quantlib]

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

Filter by
Sorted by
Tagged with
-1 votes
2 answers
547 views

Easier way than using QuantLib to compute the price and Greeks of a vanilla European option?

I'm using the following to compute the price and Greeks a vanilla European option: ...
0 votes
1 answer
142 views

Error in class when pricing vanilla European options using QuantLib

I'm brand new to QuantLib and have the following class that I'm using to price European options: ...
0 votes
1 answer
209 views

equivalentRate not matching for compounding cashflows

I am calculating equivalentrate between two days in quantlib python using following functions but the output is not matching with the manual calculation. ...
8 votes
1 answer
6k views

Use QuantLib Python to calculate Swap DV01

I would want to use QuantLib Python to calculate DV01 of an interest rate swap. Initially I was thinking of calculating the fixed leg DV01 and floating leg DV01 separately, then add both legs DV01 ...
8 votes
0 answers
3k views

Replicating Bloomberg Swap Prices with QuantLib

I'm trying to learn more about the QuantLib python package and as an exercise I'm trying to replicate some swaps on Bloomberg. However, when I do so, it seems like my swaps are consistently ...
0 votes
0 answers
193 views

Price of a forward delivery bond - Quantlib python

I would like to find the bond price today which has already been issued but delivered later. Basically, the price won't include some of the coupons till the delivery date. Let's say 10 year bond ...
1 vote
2 answers
2k 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 ...
9 votes
3 answers
11k views

What is the best alternative of Quantlib library

We need to build a Fixed Income Portfolio Risk Analytics solution. Somehow due to administrative reason we can't use Quantlib which is written in C++, even call it through SWIG via JNI. We have tried ...
1 vote
0 answers
809 views

Quantlib : Valuation of inflation swaps of EUR-RPI using quantlib python?

Below is the sample code to compute the inflation swaps. I have referred the Quantlib cookbook to get the flavor of Inflation swaps. But I feel that the term structure and final NPV is not accurate ...
1 vote
1 answer
228 views

QuantLib: How to import indexes from QuantLib?

I am trying to import indexes from QuantLib for my further analysis and term structures. But below code is not working and giving me 'ModuleNotFoundError'. Please suggest if this the correct way of ...
0 votes
2 answers
674 views

How to make futuresHelpers in Quantlib work with monday settlement day not IMM?

My EuroDollar futures have monday of third week expiration and settlement date from CME exchange how ever Python Quantlib doesn't seem to like it. Anyway I can get away with IMM check? futures = { ql....
2 votes
1 answer
566 views

Quantlib: How to print the maturity dates or pillars from the helpers in Quantlib python?

I am trying to value inflation swaps using necessary functions from quantlib and successfully completed the valuation. Underneath helper function is working well for most of the swaps. But few swaps ...
0 votes
1 answer
177 views

Evaluating swaptions with negative interest rates

Does anyone know if it is possible to evaluate swaptions with negative interest rates with Quantlib? ...
1 vote
2 answers
747 views

QuantLib: ImportError: DLL load failed:

I intalled quantlib using "pip install QuantLib" and now I'm getting the below error. I'm using windows 10 and Spyder IDE. I don't see any dll file called _QuantLib, only _QuantLib.cp37-...
1 vote
1 answer
196 views

Quantlib endOfMonth bool

my question is two fold and if the legend Luigi answers this question it would make my day. what is the purpose of this endofMonth boolean in the depoit or fra or swap helper functions. what is the ...
1 vote
1 answer
281 views

Quantlib match clean price with bbg clean price

I'm trying to match QL clean price with BBG clean price for POLGB 2.75 10/25/29 1029 priced for 15th of October 2021 for 2.5% yield. I'm not sure if my setup of bond is wrong or if there is a problem ...
2 votes
1 answer
538 views

Quantlib HW 1f model calibration not fitting to market normal vol quotes

I am using Quantlib python to calibrate HW 1f model parameters from normal swaption vols quoted in the market (following the code in the cookbook - I fit both the mean-reversion & vol to market ...
1 vote
1 answer
839 views

QuantLib Inaccurate - American Put Option with Discrete Dividends

I'm trying to use the QuantLib library to price American options that pay discrete dividends. The call options are priced with good accuracy (generally <0.1% error), however the same inputs for a ...
3 votes
1 answer
2k 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: ...
1 vote
0 answers
194 views

Pricing Asian and barrier option using Quantlib

I am exploring to use the ql.FdBlackScholesAsianEngine and ql.FdBlackScholesBarrierEngine using python code to price commodity options with implied volatility from traded European or American options. ...
0 votes
1 answer
663 views

Specify fixing days for floating leg in Interest Rate Swap valuation using QuantLib Python

I am trying to price an Interest Rate Swap using QuantLib Python, and everything seems to be fine. However, I can't seem to understand where I can specify the number of fixing days. Below are my codes....
0 votes
1 answer
841 views

How to make a schedule for amortizing bonds in python quantlib?

I am trying to make a schedule for amortizing bonds in quantlib, but have no idea how to include amortization in this schedule. I have the following bond: ...
0 votes
2 answers
828 views

question on QuantLib schedule to get bond coupon payment dates - python

sorry the original question was answered by an expert but somehow I cannot edit the original question and add comments. so posting it again with some follow up questions: i have a number of bonds that ...
0 votes
0 answers
243 views

QuantLib - Help buiding a simple T-Bond (Mischievous Pricing Conventions)

Im having a problem getting the right price for a simple T-Bond, maybe a Mischievous Pricing Conventions like Luigi says in his book. Im tying to price "912810SZ Govt" ...
1 vote
1 answer
253 views

30E/360 bond payment schedule

I have a bond that was issued on the 30th of April with 30/360 European day convention basis and semiannual compounding. As far as I understand payments should be every 180 days according to the day ...
0 votes
0 answers
534 views

Pricing an OIS referencing SONIA with fixing lag

I'm trying to price an Overnight Index Swap referencing SONIA. The swap will have a 5 day fixing lag (i.e using compounded SONIA over the current interest period but with the last rate set 5 days ...
4 votes
1 answer
896 views

Bootstrapping discount and forward curve (using ESRA) and price a vanilla swap

I am just starting to use Quantlib, and want to try and replicate the SWPM-functionality in Bloomberg, and price a vanilla 5Y EUR OIS. Below is the overall swap data used in BBG: Overall settings ...
10 votes
1 answer
5k 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 ...
3 votes
0 answers
109 views

Manual Computation of Python QuantLib's NPV for Pricing of a Forward Rate Agreement

Following the question that I have asked on this link and response obtained, I have managed to price a 3x6 FRA using QuantLib Python, using the following codes: ...
2 votes
1 answer
845 views

Pricing a Forward Rate Agreement using QuantLib Python

Can someone please help with the pricing of the following forward rate agreement using QuantLib Python? A 3x6 forward rate agreement, with a notional of $100,000, the FRA rate being 6%, The FRA ...
0 votes
1 answer
1k views

Is it possible to price a plain vanilla interest rate swap in Python and simulate the price using Hull White 1 Factor Model simultaneously?

I am trying to price plain vanilla interest rate swap (IRS) using QuantLib. What I am trying to do is to generate a path of simulated IRS price by simulating the interest rates using HW 1 Factor model....
0 votes
1 answer
200 views

quantlib: make AmortizingFixedRateBond coupon payments equal

I found some unexpected result when trying to call AmortizingFixedRateBond wiht daily coupon payments, but starting in the last day of the month. ...
0 votes
2 answers
368 views

Generating a PAR curve from Bond Price Inputs

I am a brand new user to QuantLib and I am running it in Python. I am attempting to generate a PAR yield curve from time to maturity and price input as shown here 'time to maturity': ['30-03-2020','...
0 votes
0 answers
137 views

Incorporate Transaction Date to Price Fixed Rate Bond using Quantlib Python

I am trying to use QuantLib Python to price a fixed rate bond, based on the following data: Issue date is 28 September 2017 (issueDate), maturity date is 28 ...
0 votes
1 answer
1k views

Struggling with Modeling Convertible Bond using Python

I am trying to price Convertible bond with the following data: price = 5.11 coupon = 0.0575 frequency = semi-annual risk free rate = 0.02347 conversion Ratio = 3.8095 Conversion Price = 26.25 ...
-1 votes
1 answer
1k views

Difference arising between Dirty Price and NPV using QuantLib Python

I have used QuantLib Python to price a fixed rate bond. My codes are as follows: ...
0 votes
1 answer
691 views

Fixed Rate Bond Pricing using QuantLib Python

I have tried to price a fixed rate bond using Python QuantLib and I verified my answer using a DCF model. Below are my codes for the pricing of the fixed rate bond using Python QuantLib: ...
2 votes
1 answer
1k views

Explanation for Different Piecewise Yield Term Structures from QuantLib Python

I am new to QuantLib on Python, but as far as I understand, there are different types of piecewise yield term structures which exist on QuantLib which are bootstrapped on a number of interest rate ...
0 votes
1 answer
248 views

quantlib: add handle to iborindex

I think this might be a very trivial question, but since I am pretty unfamiliar with C, this is a bit of a problem for me. I have created IborIndex somewhere (it is correctly working): ...
0 votes
1 answer
1k views

Zero Rates for Deposits using Quantlib Python

I have used QuantLib Python to construct a zero curve from deposits and bonds. Below are my codes: ...
0 votes
1 answer
709 views

Quantlib: loan cash flow

Situation: I would like to make a small script which prices loans (fe annuities or fixed payment) for the ALM purposes. However, I am stuck in the amount of classes existing in Quantlib and would like ...
1 vote
1 answer
354 views

In Python QuantLib how to identify Principal and Interest cashflows?

I am fairly new to QuantLib Python. I have generated the following cashflows from one AmortizingFloatingBond from QuantLib Python. But I am not able to identify which ones are Interest payments and ...
0 votes
1 answer
244 views

NPV of Interest Rate Swap not coming to be 0 at initiation

I am using the iPython notebook published by Gouthaman Balaraman at [http://gouthamanbalaraman.com/blog/interest-rate-swap-quantlib-python.html][1] This is to value the Interest Rate Swap. I am ...
0 votes
1 answer
321 views

How To Properly use QuantLib to Replicate Excel's MDURATION Function

just wanted to ask how to use Quantlib on replicating Excel's MDURATION. Given the following parameters, I was able to get a value of 4.478837 via MS Excel's MDURATION Function. ...
0 votes
0 answers
378 views

Using QuantLib for bonds with irregular coupon payments

Could you please help properly use QuantLib python library to estimate different metrics of bond with uncommon coupon payment periods? For example, I have a bond, which pays coupon each 182 day (26 ...
0 votes
1 answer
445 views

How to compute NPV of Latin American swap CLP-TNA (chilean) using quantlib?

I am trying to value the Latin Americans swaps. But CLP-TNA valuation is far off from the actual valuation. Please suggest, what I am missing in below methodology to compute NPV. ...
0 votes
0 answers
3k views

Nelson-Siegel-Svensson Yield Curve Estimation From Zero-rates Using QuantLib (Python)

I am using QuantLib in Python to estimate yield curves using the Nelson-Siegel-Svensson (NSS) model with zero-rates as input. Since the NSS model in QuantLib uses the discount function to estimate the ...
0 votes
0 answers
255 views

Plotting a CSA curve in QuantLib

IRS under a CSA Let's consider an example of Interest Rate Swap under a CSA. To calculate discount factors that can be used to discount cashflows in one currency, $C_{1}$, collateralized in another ...
1 vote
2 answers
223 views

Problem with bond.bondYield Quantlib

I'm having issues with a simple FixedRateBond bond yield calculation using QuantLib: ...
3 votes
1 answer
4k 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 2 3
4
5
10